Пример #1
0
        public void StopPomodoroInternal(CompletedPomodoro pomodoroData)
        {
            this.AddTaskRegistration(this.processAndWindowSpy.GetActiveTask(), this.Now);
            pomodoroData.TaskRegistrations = this.PomodoroRegistrations;

            // remove the trigger as of no need
            this.removeExistingTriggerCommand.Do(new TimeTriggerCommandArgs("Quarter Second Elapsed for Active Task Sensor"));

            this.lastPoll = default(DateTime);
        }
        public void SetData(CompletedPomodoro data)
        {
            this.UpdateControl(
                () =>
            {
                this.PomodoroData = data;
                this.graphController.SetData(this.PomodoroData);
                this.tasksController.SetData(this.PomodoroData);
                this.ratingController.SetData(this.PomodoroData);
                this.taggingController.SetData(this.PomodoroData);

                this.PopulateData();
            });
        }
Пример #3
0
        public void StopPomodoroInternal(CompletedPomodoro pomodoroData)
        {
            if (!this.Enabled)
            {
                return;
            }

            this.inPomodoro = false;

            this.userActivityHook.Stop();

            pomodoroData.KeyboardActivity = this.PomodoroKeyboardActivity;
            pomodoroData.MouseActivity    = this.PomodoroMouseActivity;

            // remove the trigger as of no need
            this.removeExistingTriggerCommand.Do(new TimeTriggerCommandArgs("Second Elapsed for Flow Sensor"));
        }
Пример #4
0
        private void RunFakeEvaluation()
        {
            var mal = new List <int>();
            var kal = new List <int>();
            int max = 10;

            for (int i = 0; i < 6000; i++)
            {
                mal.Add((int)(i % max * Math.Abs(Math.Sin(i / 100)) * (i % 1000) * (i / 1000.0) / 10000.0));
                kal.Add((int)(i % max * Math.Abs(Math.Cos(i / 100)) * (i % 1000) * (i / 1000.0) / 10000.0));
            }

            CompletedPomodoro data = new CompletedPomodoro()
            {
                Start             = DateTime.Now,
                Duration          = TimeSpan.FromMinutes(25),
                MouseActivity     = mal,
                KeyboardActivity  = kal,
                TaskRegistrations = new List <TaskRegistration>()
                {
                    new TaskRegistration()
                    {
                        TaskName    = "Task 0",
                        ProcessName = "Process 0",
                        TimeStamp   = DateTime.Now,
                        Duration    = TimeSpan.FromMinutes(1),
                    },
                    new TaskRegistration()
                    {
                        TaskName    = "Task 1",
                        ProcessName = "Process 1",
                        TimeStamp   = DateTime.Now + TimeSpan.FromMinutes(1),
                        Duration    = TimeSpan.FromMinutes(9),
                    },
                    new TaskRegistration()
                    {
                        TaskName    = "Task 2",
                        ProcessName = "Process 1",
                        TimeStamp   = DateTime.Now + TimeSpan.FromMinutes(10),
                        Duration    = TimeSpan.FromMinutes(5),
                    },
                    new TaskRegistration()
                    {
                        TaskName    = "Task 3",
                        ProcessName = "Process 2",
                        TimeStamp   = DateTime.Now + TimeSpan.FromMinutes(15),
                        Duration    = TimeSpan.FromMinutes(5),
                    },
                    new TaskRegistration()
                    {
                        TaskName    = "Task 4",
                        ProcessName = "Process 2",
                        TimeStamp   = DateTime.Now + TimeSpan.FromMinutes(20),
                        Duration    = TimeSpan.FromMinutes(5),
                    },
                }
            };

            var form = new PomodoroEvaluationForm(this.plugins);

            form.SetData(data);

            this.plugins.CherryCommands["Show Window No Activate"].Do(new WindowCommandArgs(form));
        }
Пример #5
0
 public void SetData(CompletedPomodoro data)
 {
     this.pomodoroData = data;
     this.InitializeSummedData();
     this.highlights = null;
 }
Пример #6
0
 public void SetData(CompletedPomodoro data)
 {
     this.pomodoroData = data;
     this.chartRenderer.SetData(data);
 }
 public void SetData(CompletedPomodoro data)
 {
     this.pomodoroData = data;
 }