public AboutPresenter(IAboutView aboutView, IAboutModel aboutModel) { this.aboutView = aboutView; this.aboutModel = aboutModel; this.aboutView.ViewShown += OnViewShow; this.aboutView.ViewClose += OnViewClose; }
public IAboutView CreateInstance() { if (instance == null) { instance = new AboutForm(); } return(instance); }
public AboutViewModel(IAboutView view, IApplicationInformationService applicationInformationService) { this.view = view; this.applicationInformationService = applicationInformationService; view.Model = this; CloseWindowCommand = new DelegateCommand <Window>(OnCloseWindow); }
public AboutPresenter(IAboutView _view) { this._view = _view; _view.SetVersion("v. " + Utils.GetAppVersion()); _view.Web += _view_Web; _view.Mail += _view_Mail; }
public PixelCatcherPresenter(IAboutView aboutView, IPixelCatcherView pixelCatcherView, AboutInformation aboutInformation) { this.aboutInformation = aboutInformation; this.pixelCatcherView = pixelCatcherView; singeltonAboutForm = aboutView; pixelCatcherView.ShowAboutBox += PixelCatcherView_ShowAboutBox; Application.AddMessageFilter(this); RegisterGlobalHotkey(); }
public void Execute() { if (m_Instance == null) { m_Instance = App.Resolve <IAboutView>(); m_Instance.ViewClosed += OnViewClosed; m_Instance.Show(); } else { m_Instance.Activate(); } }
public void ShowAboutForm() { if (singeltonAboutForm != null && singeltonAboutForm.IsDisposed) { singeltonAboutForm.BringToFront(); } else { singeltonAboutForm = new AboutView(); singeltonAboutForm.FormClosed += delegate { singeltonAboutForm = null; }; singeltonAboutForm.visitAboutUrl += delegate { System.Diagnostics.Process.Start(AboutInformation.websiteUrl); }; singeltonAboutForm.Show(); } }
public static void PopulateFromVersionInfo(this IAboutView view, AssemblyVersionInfo verInfo) { view.SetProgramName(verInfo.Name); view.SetVersion(verInfo.VersionBuild); view.SetDescription(verInfo.Description); view.SetCopyright(verInfo.Copyright); if (verInfo.VersionHistory != null) { view.SetVersionHistory(verInfo.VersionHistory); } }
/// <summary> /// See interface docs. /// </summary> /// <param name="view"></param> public void Initialise(IAboutView view) { _View = view; _View.OpenConfigurationFolderClicked += View_OpenConfigurationFolderClicked; var applicationInformation = Factory.Singleton.Resolve <IApplicationInformation>(); var configurationStorage = Factory.Singleton.Resolve <IConfigurationStorage>().Singleton; var runtimeEnvironment = Factory.Singleton.Resolve <IRuntimeEnvironment>().Singleton; _View.Caption = applicationInformation.ApplicationName; _View.ConfigurationFolder = configurationStorage.Folder; _View.Copyright = applicationInformation.Copyright; _View.Description = applicationInformation.Description; _View.IsMono = runtimeEnvironment.IsMono; _View.ProductName = applicationInformation.ProductName; _View.Version = applicationInformation.FullVersion; }
/// <summary> /// See interface docs. /// </summary> /// <param name="view"></param> public void Initialise(IAboutView view) { _View = view; _View.OpenConfigurationFolderClicked += View_OpenConfigurationFolderClicked; var applicationInformation = Factory.Singleton.Resolve<IApplicationInformation>(); var configurationStorage = Factory.Singleton.Resolve<IConfigurationStorage>().Singleton; var runtimeEnvironment = Factory.Singleton.Resolve<IRuntimeEnvironment>().Singleton; _View.Caption = applicationInformation.ApplicationName; _View.ConfigurationFolder = configurationStorage.Folder; _View.Copyright = applicationInformation.Copyright; _View.Description = applicationInformation.Description; _View.IsMono = runtimeEnvironment.IsMono; _View.ProductName = applicationInformation.ProductName; _View.Version = applicationInformation.FullVersion; }
/// <summary> /// See interface docs. /// </summary> /// <param name="view"></param> public void Initialise(IAboutView view) { _View = view; _View.OpenConfigurationFolderClicked += View_OpenConfigurationFolderClicked; var applicationInformation = Factory.Resolve <IApplicationInformation>(); var configurationStorage = Factory.ResolveSingleton <IConfigurationStorage>(); var runtimeEnvironment = Factory.ResolveSingleton <IRuntimeEnvironment>(); _View.BuildDate = applicationInformation.BuildDate; _View.Caption = applicationInformation.ApplicationName; _View.ConfigurationFolder = configurationStorage.Folder; _View.Copyright = applicationInformation.Copyright; _View.Description = applicationInformation.Description; _View.Is64BitProcess = runtimeEnvironment.Is64BitProcess; _View.IsMono = runtimeEnvironment.IsMono; _View.ProductName = applicationInformation.ProductName; _View.Version = applicationInformation.IsBeta ? $"{applicationInformation.ShortVersion} {Strings.Beta}" : applicationInformation.ShortVersion; }
public AboutButtonNavigator(IToolbarView toolbarView, IAboutView aboutView) { toolbarView.ButtonAboutClick += OnAboutClick; this.aboutView = aboutView; }
public ParentPresenter(IDataModel dataModel, IParentView parentView, ILoginUserView loginUserView, ICreateUserView createUserView, IWallView wallView, ISettingsView settingView, IAboutView aboutView) { serverRequest = new MyServerRequest(); this.dataModel = dataModel; this.parentView = parentView; this.parentView.InvertVisibility += this.OnInvertVisibility; this.parentView.SettingsClicked += this.OnSettingsClicked; this.parentView.AboutClicked += this.OnAboutClicked; this.parentView.ExitClicked += this.OnExitClicked; this.loginUserView = loginUserView; this.loginUserView.LoginUserClicked += this.OnLoginUserClicked; this.loginUserView.LoginUserOfflineClicked += this.OnLoginUserOfflineClicked; this.loginUserView.GoToCreateUserClicked += this.OnGoToCreateUserClicked; this.loginUserView.LoginUsernameChanged += this.OnLoginUsernameChanged; this.createUserView = createUserView; this.createUserView.CreateUserClicked += this.OnCreateUserClicked; this.createUserView.GoToLoginUserClicked += this.OnGoToLoginUserClicked; this.wallView = wallView; this.wallView.NewWallClicked += this.OnNewWallClicked; this.wallView.NewMessageClicked += this.OnNewMessageClicked; this.wallView.NewWallSelected += this.OnNewWallSelected; this.wallView.RefreshWallsClicked += this.OnRefreshWallsClicked; this.wallView.WallsAutoRefresh += this.OnRefreshWallsClicked; this.settingView = settingView; this.settingView.ShowNotificationChanged += this.OnShowNotificationChanged; this.settingView.RefreshMinutesChanged += this.OnRefreshMinutesChanged; this.settingView.RefreshSecondsChanged += this.OnRefreshSecondsChanged; this.settingView.GoToPreviousView += this.OnGoToPreviousView; this.aboutView = aboutView; this.aboutView.GoToPreviousView += this.OnGoToPreviousView; this.aboutView.AuthorWebLinkClicked += this.OnAuthorWebLinkClicked; this.aboutView.CodeWebLinkClicked += this.OnCodeWebLinkClicked; //load model data dataModel.LoadDataModel(); //set settings on loginView if (dataModel.Settings.RememberUser) { loginUserView.RememberUser = true; if (!string.IsNullOrEmpty(dataModel.User.username)) { loginUserView.Username = dataModel.User.username; loginUserView.LoginOfflineVisible = true; loginUserView.SetPasswordFocus(); } else { loginUserView.SetUsernameFocus(); } } else { loginUserView.RememberUser = false; loginUserView.SetUsernameFocus(); } //load loginUSerView parentView.CurrentChildView = this.loginUserView; }
private void Execute(IAboutView helpView) { helpView?.Show(); }
public virtual void BindAboutView(IAboutView view) { _aboutView = view; _aboutView.OnViewDestroy = (view2) => { _aboutPresenter.ViewDestroyed(); _aboutPresenter = null; _aboutView = null; }; _aboutPresenter = Bootstrapper.GetContainer().Resolve<IAboutPresenter>(); _aboutPresenter.BindView(view); }
public virtual void CreateAboutView() { if (_aboutView == null) _aboutView = Bootstrapper.GetContainer().Resolve<IAboutView>(); PushTabView(MobileNavigationTabType.More, _aboutView); }
public AboutPresenter(IAboutView view) { this.view = view; }
public void Reinit() { instance = null; CreateInstance(); }
private void OnViewClosed(object sender, EventArgs e) { m_Instance = null; }
public virtual IAboutView CreateAboutView() { // If the view is still visible, just make it the top level window if (_aboutView != null) { _aboutView.ShowView(true); return _aboutView; } // The view invokes the OnViewReady action when the view is ready. This means the presenter can be created and bound to the view. Action<IBaseView> onViewReady = (view) => { _aboutPresenter = Bootstrapper.GetContainer().Resolve<IAboutPresenter>(); _aboutPresenter.BindView((IAboutView)view); }; // Create view and manage view destruction _aboutView = Bootstrapper.GetContainer().Resolve<IAboutView>(new NamedParameterOverloads() { { "onViewReady", onViewReady } }); _aboutView.OnViewDestroy = (view) => { _aboutPresenter.ViewDestroyed(); _aboutPresenter = null; _aboutView = null; }; return _aboutView; }
public void Init() { mocks = new MockRepository(); factory = mocks.Stub<IViewFactory>(); view = mocks.DynamicMock<IAboutView>(); }
public AboutPresenter(IAboutView view, IAppDbContext dbContext) : base(dbContext) { _view = view; }
public AboutViewController(IAboutView attachedView) { _attachedView = attachedView; _attachedView.RequestOpenLink += _attachedView_RequestOpenLink; _attachedView.SetAboutLink(26, Link); }
public void SetView(IAboutView view) => _view = view;
public AboutViewModel(IAboutView view, IApplicationController appc) : base(view, appc) { Title = "About MQ Explorer Plus"; }
public AboutViewModel(IAboutView view, IApplicationController appc) : base(view, appc) { Title = $"About {ProductName}"; }