示例#1
0
        public static void choosePlan(Subject sub)
        {
            Clear();
            WriteLine("Select an option:" +
                      "\n \t 1.- Short Break" +
                      "\n \t 2.- Long Break" +
                      "\n \t 3.- Keep studying (not recomended)" +
                      "\n \t 4.- Change Subject" +
                      "\n \t 5.- Back to menu");

            ConsoleKeyInfo ck = ReadKey();

            if (ck.Key == ConsoleKey.NumPad1 || ck.Key == ConsoleKey.D1)
            {
                actualPm = new Pomodoro(shortBreakTime, false, sub);
            }
            if (ck.Key == ConsoleKey.NumPad2 || ck.Key == ConsoleKey.D2)
            {
                actualPm = new Pomodoro(shortBreakTime, false, sub);
            }
            if (ck.Key == ConsoleKey.NumPad3 || ck.Key == ConsoleKey.D3)
            {
            }
            if (ck.Key == ConsoleKey.NumPad4 || ck.Key == ConsoleKey.D4)
            {
            }
            if (ck.Key == ConsoleKey.NumPad5 || ck.Key == ConsoleKey.D5)
            {
            }
        }
示例#2
0
        public PomodoroNotifyIcon(NotifyIcon notifyIcon, Pomodoro pomodoro)
        {
            this.notifyIcon = notifyIcon;
            this.pomodoro   = pomodoro;

            this.notifyIcon.ContextMenuStrip = new System.Windows.Forms.ContextMenuStrip();
            this.notifyIcon.ContextMenuStrip.Items.Add("Exit", null, pomodoro.Exit);
            this.notifyIcon.MouseDoubleClick += MouseDoubleClick;
        }
示例#3
0
        public TimeoutScreen(Pomodoro pomodoro)
        {
            Instance = this;

            this.pomodoro = pomodoro;
            InitializeComponent();
            time = timeLabel;

            pomodoro.Visible = false;
        }
示例#4
0
        public static void changePomodoro(Pomodoro pm)
        {
            if (lastPomodoros[0].Study && !lastPomodoros[1].Study)
            {
                lastPomodoros[1].Subject.TimeToday += lastPomodoros[1].Min;
            }

            for (int i = 0; i < lastPomodoros.Length - 1; i++)
            {
                lastPomodoros[i] = lastPomodoros[i + 1];
            }
        }
示例#5
0
        public PomodoroTimer(Pomodoro pomodoro)
        {
            this.pomodoro = pomodoro;

            pomodoroNavigation = new PomodoroNavigation(this.pomodoro.BottomPanel, this);
        }
示例#6
0
 private void StartNewPomodoro(string desc)
 {
     if (pomodoro != null)
     {
         pomodoro.Reset();
     }
     pomodoro = new Pomodoro(desc);
     pomodoro.PomodoroTimeElapsed += this.PomodoroTimeElapsedHandler;
     pomodoro.BreakTimeElapsed += this.BreakTimeElapsedHandler;
     pomodoro.PomodoroEnded += this.PomodoroEndedHandler;
     pomodoro.BreakEnded += this.BreakEndedHandler;
     pomodoro.PomodoroReset += this.PomodoroResetHandler;
     pomodoro.Start();
     notifyIcon1.BalloonTipText = "Have a nice Pomodoro";
     notifyIcon1.ShowBalloonTip(2 * 1000);
     UpdateContextMenuGhosting();
 }
示例#7
0
 static void startStudy(Subject sub)
 {
     Clear();
     Write("You started studying " + sub.Name);
     Pomodoro pom = new Pomodoro(pomodoroTime, true, sub);
 }