Exemple #1
0
        public OverlayForm(Settings settings)
        {
            InitializeComponent();

            _settings = settings;

            this.TopMost = true;
            this.ShowInTaskbar = false;
            this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None;
            this.Opacity = 0.5;
            this.WindowState = FormWindowState.Maximized;
            this.DoubleBuffered = true;

            _updateCountdownLabel = (timer) => lblCountdown.Text = "Pause time: " + (new TimeSpan(0, 0, ((int)_settings.PauseTime.TotalSeconds) - timer)).ToShortString();
            _updateCountdownLabel(_CountDownTimer++);

            tmrCountdown.Start();
        }
Exemple #2
0
        public MainForm(Settings settings)
        {
            InitializeComponent();

            _settings = settings;

            this.TopMost = true;
            this.ShowInTaskbar = false;
            this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None;
            this.Opacity = 0.5;
            this.WindowState = FormWindowState.Maximized;
            this.tmrMain.Interval = (int)_settings.PauseEvery.TotalMilliseconds;

            lblCountdown.Text = "";
            tbxStatus.Text = "Stopped";

            _updateCountdownLabel = (timer) => lblCountdown.Text = "Pause time: " + (new TimeSpan(0, 0, ((int)_settings.PauseTime.TotalSeconds) - timer)).ToShortString();
        }