Ejemplo n.º 1
0
        protected override void OnLoad(EventArgs e)
        {
            Visible       = false;
            ShowInTaskbar = false;
            var sysTrayMenu = new ContextMenu();

            sysTrayMenu.MenuItems.Add("Restart Indicator", OnRestart);
            sysTrayMenu.MenuItems.Add("Exit", OnExit);

            _sysTrayIcon             = new NotifyIcon();
            _tooltip                 = "Chroma Indicator";
            _sysTrayIcon.Text        = _tooltip;
            _sysTrayIcon.Icon        = new Icon(Resources.Y, 40, 40);
            _sysTrayIcon.ContextMenu = sysTrayMenu;
            _sysTrayIcon.Visible     = true;

            _checkState = new CheckState
            {
                FirstAnimationNeeded  = true,
                SecondAnimationNeeded = true,
                ClearNeeded           = true,
                BaseNeeded            = true,
                CurrentStateNeeded    = true
            };

            ActivateTimed.Interval = _timeControl.CalculateTimerInterval(_checkInterval);
            ActivateTimed.Start();
            CheckChanges.Start();

            base.OnLoad(e);
        }
Ejemplo n.º 2
0
 private void OnRestart(object sender, EventArgs e)
 {
     //UserSettings settings = new UserSettings();
     //settings.ChangeBaseColorToGreen();
     _checkState = new CheckState
     {
         FirstAnimationNeeded = true,
         ClearNeeded          = true,
         BaseNeeded           = true,
         CurrentStateNeeded   = true
     };
     ActivateTimed.Start();
 }