示例#1
0
        private void OnLoadView(object sender, EventArgs e)
        {
            _view.LabelTitleTop.Text = Resources.PresenterMain_OnLoadView_Clipboard_Helper;
            InitiateFormHiding();
            _view.InitiateControls();
            _view.AddControls();
            _viewMainSplContPanelUp.ItemsSelected    += ViewMainSplContPanelUp_OnItemsSelected;
            _viewMainSplContPanelUp.NoItemsSelected  += ViewMainSplContPanelUp_OnItemsSelected_OnNoItemsSelected;
            _viewMainSplContPanelUp.NewClipboardText += ViewMainSplContPanelUpAutoShownTabs_NewClipboardText;
            _viewMin.MouseEnterLabelTitleTop         += ViewMin_MouseEnterLabelTitleTop;
            SetAppShortcutKey();
            _view.FormGetsFocus            = _settings.AppearanceFocus;
            _pasting.OnPastingActivated   += Pasting_OnPastingActivated;
            _pasting.OnPastingDeactivated += MultiPasting_Deactivated;
            List <Icon> notifyIconsDynamic;

            if (IsWindowsLightThemeActive())
            {
                notifyIconsDynamic = new List <Icon>
                {
                    _resources.DynamicIcon1ForLightTheme,
                    _resources.DynamicIcon2ForLightTheme,
                    _resources.DynamicIcon3ForLightTheme,
                    _resources.DynamicIcon4ForLightTheme,
                    _resources.DynamicIcon5ForLightTheme,
                    _resources.DynamicIcon6ForLightTheme,
                    _resources.DynamicIcon7ForLightTheme,
                    _resources.DynamicIcon8ForLightTheme
                };
                _notifyIcon.Initiate(_resources.ActivatedForLightTheme, notifyIconsDynamic, _view.SetNotifyIconImage);
            }
            else
            {
                notifyIconsDynamic = new List <Icon>
                {
                    _resources.DynamicIcon1ForDarkTheme,
                    _resources.DynamicIcon2ForDarkTheme,
                    _resources.DynamicIcon3ForDarkTheme,
                    _resources.DynamicIcon4ForDarkTheme,
                    _resources.DynamicIcon5ForDarkTheme,
                    _resources.DynamicIcon6ForDarkTheme,
                    _resources.DynamicIcon7ForDarkTheme,
                    _resources.DynamicIcon8ForDarkTheme
                };
                _notifyIcon.Initiate(_resources.ActivatedForDarkTheme, notifyIconsDynamic, _view.SetNotifyIconImage);
            }

            _viewUserSettingsButtonsDown.CancelIsClickedRestoreSettings +=
                ViewUserSettingsButtonsDown_OnCancelIsClickedRestoreSettings;
            _view.ClickToolStripMenuItemSettings   += OnClickToolStripMenuItemSettings;
            _view.ClickToolStripMenuItemVisa       += OnClickToolStripMenuItemVisa;
            _view.ClickToolStripMenuItemOm         += OnClickToolStripMenuItemOm;
            _view.ClickToolStripMenuItemEnd        += OnClickToolStripMenuItemEnd;
            _view.ClickToolStripMenuItemDeActivate += OnClickToolStripMenuItemDeactivate;
            _view.MouseUpNotifyIconProgram         += OnMouseUpNotifyIconProgram;
            _view.MouseEntersFormIcon1             += OnMouseEntersFormIcon1;
            _view.MouseLeavesFormIcon1             += OnMouseLeavesFormIcon1;
            _view.MouseClicksFormIcon1             += OnMouseClicksFormIcon1;
            _view.MouseEntersFormIcon2             += OnMouseEntersFormIcon2;
            _view.MouseLeavesFormIcon2             += OnMouseLeavesFormIcon2;
            _view.MouseClicksFormIcon2             += OnMouseClicksFormIcon2;
            _view.MouseEntersFormIcon3             += OnMouseEntersFormIcon3;
            _view.MouseLeavesFormIcon3             += OnMouseLeavesFormIcon3;
            _view.MouseClicksFormIcon3             += OnMouseClicksFormIcon3;
            _view.ResizingEnd         += OnResizingEnd;
            _settings.PropertyChanged += Settings_PropertyChanged;
            _viewUserSettingsButtonsDown.SaveIsClicked += ViewUserSettingsButtonsDown_OnSaveIsClicked;
        }