예제 #1
0
        /// <summary>
        /// Get activities from current view
        /// </summary>
        /// <param name="all">Get All activities if True, or just selected activities if False.
        /// NOTE: This only applies to Reports View.</param>
        /// <returns>Activities from this page's associated view (defined in constructor)</returns>
        internal IEnumerable <IActivity> GetActivities(bool all)
        {
            IList <IActivity> activities = new List <IActivity>();

            // Prevent null ref error during startup
            if (PluginMain.GetApplication().Logbook == null ||
                PluginMain.GetApplication().ActiveView == null)
            {
                return(activities);
            }

            IView view = PluginMain.GetApplication().ActiveView;

            if (view != null && IsDailyActivityView)
            {
                IDailyActivityView activityView = view as IDailyActivityView;
                activities = CollectionUtils.GetAllContainedItemsOfType <IActivity>(activityView.SelectionProvider.SelectedItems);
            }
            else if (view != null && IsReportView)
            {
                IActivityReportsView reportsView = view as IActivityReportsView;

                if (all)
                {
                    activities = reportsView.ActiveReport.Activities;
                }
                else
                {
                    activities = CollectionUtils.GetAllContainedItemsOfType <IActivity>(reportsView.SelectionProvider.SelectedItems);
                }
            }

            return(activities);
        }
예제 #2
0
 public ActivityComparerDetail(IActivityReportsView view)
 {
     this.reportView = view;
     view.SelectionProvider.SelectedItemsChanged += new EventHandler(OnReportViewSelectedItemsChanged);
     //view.SelectionProvider.SelectedItemsChanged += new EventHandler(OnViewSelectedItemsChanged);
     instance = this;
 }
예제 #3
0
        public IList<IAction> GetActions(IActivityReportsView view, ExtendViewActions.Location location)
        {
            if (location == ExtendViewActions.Location.EditMenu)
            {
                return new IAction[] { new CalculateFieldsAction(view), new ClearFieldsAction(view) };
            }

            return new IAction[0];
        }
예제 #4
0
 public IList<IAction> GetActions(IActivityReportsView view,
                                  ExtendViewActions.Location location)
 {
     if (location == ExtendViewActions.Location.ExportMenu)
     {
         return new IAction[] { new TransferActivity(view) };
     }
     else return new IAction[0];
 }
 public IList<IAction> GetActions(IActivityReportsView view,
                                  ExtendViewActions.Location location)
 {
     if (location == ExtendViewActions.Location.AnalyzeMenu)
     {
         return new IAction[] { new PerformancePredictorAction(view) };
     }
     else return new IAction[0];
 }
 public IList<IAction> GetActions(IActivityReportsView view,
                                  ExtendViewActions.Location location)
 {
     if (location == ExtendViewActions.Location.AnalyzeMenu)
     {
         return new IAction[] { new AccumulatedSummaryAction(view) };
     }
     else return new IAction[0];
 }
예제 #7
0
 public IList <IAction> GetActions(IActivityReportsView view,
                                   ExtendViewActions.Location location)
 {
     //if (location == ExtendViewActions.Location.AnalyzeMenu)
     //{
     //    return new IAction[] { new UI.Actions.Action(view) };
     //}
     //else
     return(new IAction[0]);
 }
예제 #8
0
 public IList <IAction> GetActions(IActivityReportsView view,
                                   ExtendViewActions.Location location)
 {
     /* IActivityReportsView do not have Selection provider, cannot be used
      * if (location == ExtendViewActions.Location.AnalyzeMenu)
      * {
      *  return new IAction[] { new TrailsAction(view) };
      * }
      * else
      */
     return(new IAction[0]);
 }
예제 #9
0
        public bool HidePage()
        {
            // Active view has changed by the time this is called so we need to use the view
            //  that is assigned to us via the constructor.
            if (view != null && Id == GUIDs.MeanMaxDetail)
            {
                IDailyActivityView activityView = view as IDailyActivityView;
                activityView.SelectionProvider.SelectedItemsChanged -= OnViewSelectedItemsChanged;
            }
            else if (view != null && Id == GUIDs.MeanMaxReport)
            {
                IActivityReportsView reportsView = view as IActivityReportsView;
                reportsView.SelectionProvider.SelectedItemsChanged -= OnViewSelectedItemsChanged;
                reportsView.PropertyChanged -= ActiveReport_PropertyChanged;
            }

            CreatePageControl();
            control.Maximize -= control_Maximize;

            control.IsVisible = false;
            return(true);
        }
 internal PerformancePredictorControl(IActivityReportsView view)
     : this(true)
 {
     m_layer = TrailPointsLayer.Instance((IView)view);
     this.predictorView.InitControls(m_DetailPage, m_view, m_layer, this);
     this.trainingView.InitControls(m_DetailPage, m_view, m_layer, this);
     this.extrapolateView.InitControls(m_DetailPage, m_view, m_layer, this);
 }
 public AccumulatedSummaryAction(IActivityReportsView view)
 {
     this.m_reportView = view;
 }
예제 #12
0
 public TrailsAction(IActivityReportsView view)
 {
     this.m_reportView = view;
 }
 public PerformancePredictorControl(IList<IActivity> activities, IActivityReportsView view)
     : this(view)
 {
     this.Activities = activities;
     ShowPage("");
 }
예제 #14
0
 public OverlayAction(IActivityReportsView view)
 {
     this.m_reportView = view;
 }
예제 #15
0
 internal HighScoreViewer(IActivityReportsView view)
     : this(true)
 {
     m_layer = TrailPointsLayer.Instance((IView)view);
     this.ShowPage("");
 }
예제 #16
0
 public TRIMPAction(IActivityReportsView view)
 {
     this.reportView = view;
 }
예제 #17
0
 public IList <IDetailPage> GetReportPages(IActivityReportsView view, ExtendViewDetailPages.Location location)
 {
     return(new List <IDetailPage> {
         new ReportView.MeanMaxReport()
     });
 }
예제 #18
0
 public HighScoreAction(IActivityReportsView view)
 {
     this.m_reportView = view;
 }
 public AccumulatedSummaryView(IList<IActivity> activities, IActivityReportsView view)
     : this(activities)
 {
     //m_layer = TrailPointsLayer.Instance((IView)view);
 }
예제 #20
0
 public HighScoreViewer(IList<IActivity> activities, IActivityReportsView view)
     : this(view)
 {
     this.Activities = activities;
 }
 public PerformancePredictorAction(IActivityReportsView view)
 {
     this.m_reportView = view;
 }
예제 #22
0
 public TransferActivity(IActivityReportsView view)
 {
     this.reportView = view;
 }