public RatingController(RatingControl ratingControl, TasksListController tasksListController)
 {
     this.control = ratingControl;
     this.control.TrackBarControl.Scroll       += this.trackBar_Scroll;
     this.tasksListController                   = tasksListController;
     this.tasksListController.SelectionChanged += this.tasksListController_SelectionChanged;
 }
 public RatingController(RatingControl ratingControl, TasksListController tasksListController)
 {
     this.control = ratingControl;
     this.control.TrackBarControl.Scroll += this.trackBar_Scroll;
     this.tasksListController = tasksListController;
     this.tasksListController.SelectionChanged += this.tasksListController_SelectionChanged;
 }
Beispiel #3
0
        public ActivityGraphController(ActivityGraphControl control, TasksListController tasksController)
        {
            this.control         = control;
            this.tasksController = tasksController;
            this.chartRenderer   = new ChartRenderer();

            this.control.Resize      += this.ControlResized;
            this.control.Panel.Paint += this.PaintPanel;
            this.tasksController.SelectionChanged += this.tasksController_SelectionChanged;
        }
        public ActivityGraphController(ActivityGraphControl control, TasksListController tasksController)
        {
            this.control = control;
            this.tasksController = tasksController;
            this.chartRenderer = new ChartRenderer();

            this.control.Resize += this.ControlResized;
            this.control.Panel.Paint += this.PaintPanel;
            this.tasksController.SelectionChanged += this.tasksController_SelectionChanged;
        }
        public PomodoroEvaluationForm(PluginRepository pluginRepository)
        {
            this.pluginRepository = pluginRepository;

            this.InitializeComponent();

            this.tasksController = new TasksListController(this.tasksListControl);
            this.graphController = new ActivityGraphController(this.activityGraphControl, this.tasksController);
            this.ratingController = new RatingController(this.ratingControl, this.tasksController);
            this.taggingController = new TaggingController(this.taggingControl, this);
            this.reminderController = new OutOfPomodoroReminderController(
                this.outOfPomodoroReminderControl,
                this.pluginRepository);

            if (!(bool)this.pluginRepository.CherryCommands["Is User Activity Sensor Enabled"].Do(null))
            {
                this.OverlapGraphWithTasksList();
            }

            // Create a handle to allow invoke(show).
            this.CreateHandle();
        }
        public PomodoroEvaluationForm(PluginRepository pluginRepository)
        {
            this.pluginRepository = pluginRepository;

            this.InitializeComponent();

            this.tasksController    = new TasksListController(this.tasksListControl);
            this.graphController    = new ActivityGraphController(this.activityGraphControl, this.tasksController);
            this.ratingController   = new RatingController(this.ratingControl, this.tasksController);
            this.taggingController  = new TaggingController(this.taggingControl, this);
            this.reminderController = new OutOfPomodoroReminderController(
                this.outOfPomodoroReminderControl,
                this.pluginRepository);

            if (!(bool)this.pluginRepository.CherryCommands["Is User Activity Sensor Enabled"].Do(null))
            {
                this.OverlapGraphWithTasksList();
            }

            // Create a handle to allow invoke(show).
            this.CreateHandle();
        }
        public void DurationFormettingTest()
        {
            var tlc = new TasksListController(null);
            tlc.SetData(new CompletedPomodoro()
                {
                    Duration = TimeSpan.FromMinutes(25),
                    //Start = DateTime.Now,
                    //TaskRegistrations = new List<TaskRegistration>()
                    //{
                    //    new TaskRegistration()
                    //    {
                    //        Duration = TimeSpan.FromSeconds(61),
                    //        ProcessName = "process",
                    //        TaskName = "task",
                    //        TimeStamp = DateTime.Now.AddMinutes(-1),
                    //    }
                    //}
                });

            var durationString = tlc.GetFormattedDuration(TimeSpan.FromSeconds(61));
            Assert.AreEqual("4% (01:01)", durationString);
        }