/[cits3200i]/branches/metadata-branch-rvvs89/UWAPlugins/MetadataPlugin/Source/MetadataRouteControlLayer.cs


UCC Code Repository

Diff of /branches/metadata-branch-rvvs89/UWAPlugins/MetadataPlugin/Source/MetadataRouteControlLayer.cs

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 89 by rvvs89, Mon Oct 11 21:19:18 2010 UTC revision 90 by rvvs89, Tue Oct 12 21:18:41 2010 UTC
# Line 21  namespace MetadataPlugin.Source Line 21  namespace MetadataPlugin.Source
21              this.control = control;              this.control = control;
22              instances.Add(this);              instances.Add(this);
23              control.ItemsChanged += new EventHandler(control_ItemsChanged);              control.ItemsChanged += new EventHandler(control_ItemsChanged);
24                control.MapControlChanged += new EventHandler(control_MapControlChanged);
25          }          }
26    
27          void control_ItemsChanged(object sender, EventArgs e)          private void control_MapControlChanged(object sender, EventArgs e)
28            {
29            }
30    
31            private void control_ItemsChanged(object sender, EventArgs e)
32          {          {
33              if (instances[0] == this)              if (instances[0] == this)
34              {              {
35                  IActivity selected = CollectionUtils.GetSingleItemOfType<IActivity>(MetadataActivityReportPages.View.SelectionProvider.SelectedItems);                  IActivity selected = CollectionUtils.GetSingleItemOfType<IActivity>(MetadataActivityReportPages.View.SelectionProvider.SelectedItems);
36                  if (selected != null && selected != currentActivity)                  if (selected != null && selected != currentActivity)
37                  {                  {
                     if (currentList != null)  
                     {  
                         currentList.Commit();  
                     }  
38                      currentActivity = selected;                      currentActivity = selected;
39                      currentList = MetadataList.LoadFromActivity(currentActivity);                      currentList = MetadataList.LoadFromActivity(currentActivity);
40                  }                  }
# Line 45  namespace MetadataPlugin.Source Line 46  namespace MetadataPlugin.Source
46              get { return instances; }              get { return instances; }
47          }          }
48    
49            public MetadataList CurrentList
50            {
51                get { return currentList; }
52            }
53    
54          public IRouteControl Control          public IRouteControl Control
55          {          {
56              get { return control; }              get { return control; }

Legend:
Removed from v.89  
changed lines
  Added in v.90

Managed by UCC Webmasters ViewVC Help
Powered by ViewVC 1.1.26