Ejemplo n.º 1
0
        private void Window_Loaded(object sender, RoutedEventArgs e)
        {
            // Load settings
            // TODO: Verify that settings object is okay
            s = new SettingsManager();
            s.LoadSettings();

            PomLengthTextBox.Text = (s.settings.PomodoroLength/60).ToString();
            SBLengthTextBox.Text = (s.settings.ShortBreakLength/60).ToString();
            LBLengthTextBox.Text = (s.settings.LongBreakLength/60).ToString();
            PomCountTextBox.Text = s.settings.PomodoroCount.ToString();
        }
Ejemplo n.º 2
0
        // Position the Window in the bottom right of the main screen
        // Uses WorkingArea to avoid the taskbar if it's along the bottom or right.
        private void Window_Loaded(object sender, RoutedEventArgs e)
        {
            // TODO: Load Window position from settings
            Left = Screen.PrimaryScreen.WorkingArea.Right - Width;
            Top = Screen.PrimaryScreen.WorkingArea.Bottom - Height;

            var s = new SettingsManager();
            s.LoadSettings();
            settings = s.settings;

            currentTimerProgress = settings.PomodoroLength;
            UpdateDisplay();
        }