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


UCC Code Repository

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

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

revision 91 by rvvs89, Mon Oct 11 06:42:56 2010 UTC revision 92 by rvvs89, Tue Oct 12 22:01:08 2010 UTC
# Line 15  namespace MetadataPlugin.Source Line 15  namespace MetadataPlugin.Source
15          private IActivity activity;          private IActivity activity;
16          private IDailyActivityView view;          private IDailyActivityView view;
17          private IList<string> menuPath = new List<string> { "Metadata" };          private IList<string> menuPath = new List<string> { "Metadata" };
18            private DateTime start;
19            private DateTime end;
20    
21          public AddToRangeAction(IDailyActivityView view)          public AddToRangeAction(IDailyActivityView view)
22          {          {
# Line 26  namespace MetadataPlugin.Source Line 28  namespace MetadataPlugin.Source
28              get              get
29              {              {
30                  Refresh();                  Refresh();
31                  // FIXME: check selected items                  return activity != null && start != end && start >= activity.StartTime;
                 // MetadataRouteControlLayer.Instances[0].Control.SelectedItems  
                 return activity != null;  
32              }              }
33          }          }
34    
# Line 50  namespace MetadataPlugin.Source Line 50  namespace MetadataPlugin.Source
50          public void Refresh()          public void Refresh()
51          {          {
52              activity = CollectionUtils.GetSingleItemOfType<IActivity>(view.SelectionProvider.SelectedItems);              activity = CollectionUtils.GetSingleItemOfType<IActivity>(view.SelectionProvider.SelectedItems);
53                MetadataRouteControlLayer.Instances[0].CalculateSelectedRegion(out start, out end);
54          }          }
55    
56          public void Run(Rectangle rectButton)          public void Run(Rectangle rectButton)
57          {          {
58              // TODO              AddMetadataDialog.Instance.Control.MetadataLocation = MetadataLocation.RANGE;
59                AddMetadataDialog.Instance.Control.Point = start;
60                AddMetadataDialog.Instance.Control.End = end;
61                AddMetadataDialog.Instance.ShowDialog();
62          }          }
63    
64          public string Title          public string Title

Legend:
Removed from v.91  
changed lines
  Added in v.92

Managed by UCC Webmasters ViewVC Help
Powered by ViewVC 1.1.26