示例#1
0
 internal TaskbarGui(int week = 1)
 {
     _speak             = new Speak();
     _contextMenu       = new WeekNumberContextMenu(ref _speak);
     _notifyIcon        = GetNotifyIcon(_contextMenu.ContextMenu);
     _notifyIcon.Click += NotifyIcon_Click;
     UpdateIcon(week, ref _notifyIcon);
     SayWeek();
 }
示例#2
0
        internal TaskbarGui(int week, int iconResolution = (int)IconSize.Icon256)
        {
            Log.LogCaller();
            _latestWeek  = week;
            _contextMenu = new WeekNumberContextMenu();
            _notifyIcon  = GetNotifyIcon(_contextMenu.ContextMenu);
            UpdateIcon(week, ref _notifyIcon, iconResolution);
            _notifyIcon.DoubleClick += NotifyIcon_DoubleClick;

            #region Test code

            /* test code
             * Rectangle rect =NotifyIconHelper.GetIconRect(_notifyIcon);*/
            #endregion Test code

            if (Settings.SettingIsValue(Resources.DisplayStartupNotification, "True"))
            {
                DisplayUserInfoBalloonTip($"{_notifyIcon.Text}\r\n{Resources.StartupMessageText}");
            }
            _contextMenu.SettingsChangedHandler += OnSettingsChange;
        }
示例#3
0
 internal TaskbarGui(int week = 1)
 {
     _contextMenu = new WeekNumberContextMenu();
     _notifyIcon  = GetNotifyIcon(_contextMenu.ContextMenu);
     UpdateIcon(week, ref _notifyIcon);
 }