public PresenterAbout(IViewAbout viewAbout, IResourcesService resources) { _viewAbout = viewAbout; _resources = resources; //set initial form settings if (_viewAbout == null) { return; } _viewAbout.Size = new Size(660, 423); _viewAbout.StartPosition = FormStartPosition.CenterScreen; if (_resources != null) { _viewAbout.SetImageFormIcon1(_resources.Closed); } _viewAbout.VisibilityFormIcon2(false); _viewAbout.VisibilityFormIcon3(false); _viewAbout.FormResizable = false; _viewAbout.Size = new Size(449, 229); //subscribe to events _viewAbout.Load += OnLoadedViewAboutSettings; _viewAbout.MouseEntersFormIcon1 += OnMouseEntersFormIcon1; _viewAbout.MouseLeavesFormIcon1 += OnMouseLeavesFormIcon1; _viewAbout.MouseClicksFormIcon1 += OnMouseClicksFormIcon1; _viewAbout.ClickedOkButton += OnClickedOkButton; }
public PresenterMain( IViewMain viewMain, IViewMin viewMin, IViewUserSettings viewUserSettings, IViewAbout viewAbout, ISettingsService settings, IResourcesService resources, IViewMainSplContPanelUpTabs viewMainSplContPanelUp, IViewUserSettingsButtonsDown viewUserSettingsButtonsDown, Pasting pasting ) { _view = viewMain; _viewMin = viewMin; _viewAbout = viewAbout; _settings = settings; _resources = resources; _viewUserSettings = viewUserSettings; _viewMainSplContPanelUp = viewMainSplContPanelUp; _viewUserSettingsButtonsDown = viewUserSettingsButtonsDown; _pasting = pasting; //set initial form settings if (_settings != null) { if (_view != null) { _view.Size = _settings.SizeMain; _view.StartPosition = FormStartPosition.Manual; _view.Location = _settings.Location; } } if (settings != null && settings.Activated) { if (_resources != null) { _view?.SetNotifyIconImage(IsWindowsLightThemeActive() ? _resources.ActivatedForLightTheme : _resources.ActivatedForDarkTheme); } } else { if (_resources != null) { _view?.SetNotifyIconImage(IsWindowsLightThemeActive() ? _resources.DeactivatedForLightTheme : _resources.DeactivatedForDarkTheme); } } if (_view == null) { return; } _view.SetNotifyIconVisible(true); if (_resources != null) { _view.SetImageFormIcon1(settings != null && settings.Locked ? _resources.Locked : _resources.Unlocked); _view.SetImageFormIcon2(_resources.MinimizeUnselected); _view.SetImageFormIcon3(_resources.Closed); } //subscribe to events _view.Load += OnLoadView; }