コード例 #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
ファイル: TaskbarGui.cs プロジェクト: voltura/WeekNumber
        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
ファイル: TaskbarGui.cs プロジェクト: MadManLabs/VolturaTools
 internal TaskbarGui(int week = 1)
 {
     _contextMenu = new WeekNumberContextMenu();
     _notifyIcon  = GetNotifyIcon(_contextMenu.ContextMenu);
     UpdateIcon(week, ref _notifyIcon);
 }