Example #1
0
            public StandUpReminderApplicationContext()
            {
                InitMenus();

                //ExitHandler
                Application.ApplicationExit += (s, e) =>
                {
                    this._notifyIcon.Visible = false;
                    this._notifyIcon.Dispose();
                };
                _timerClass            = TimerClass.Instance;
                _timerClass.TimeEvent += OnTimeEvent;

                _stretchingLogic = new StretchingLogic()
                {
                    Enabled = Settings.Default.StretchingReminderEnabled
                };
                StartTask();
            }
Example #2
0
        public StretchingForm(StretchingLogic stretchingLogic)
        {
            stretchingLogic.PropertyChanged += OnPropertyChanged;
            InitializeComponent();
            //BackgroundColor

            SetStyle(ControlStyles.SupportsTransparentBackColor, true);
            this.BackColor       = Color.Transparent;
            this.TransparencyKey = Color.Transparent;


            System.Drawing.Drawing2D.GraphicsPath gp = new System.Drawing.Drawing2D.GraphicsPath();
            gp.AddEllipse(0, 0, pictureBox.Width - 1, pictureBox.Height - 1);
            pictureBox.Region    = new Region(gp);
            pictureBox.BackColor = Color.DarkGray;
            this.Icon            = Resources.Stretching;

            this._strechtingLogic = stretchingLogic;
            progressBar.Maximum   = Settings.Default.StretchingShowDuration;


            this.CenterToScreen();
        }