public InitializeToAccount ( VATRP.Core.Model.VATRPAccount account ) : void | ||
account | VATRP.Core.Model.VATRPAccount | |
return | void |
public void InitializeMainWindow() { // this method does not take into account the two checkboxes that allow the user to select whether or not to // remember the password and whether or not to automatically login. ServiceManager.Instance.UpdateLoggedinContact(); if (App.CurrentAccount == null || !App.CurrentAccount.Username.NotBlank()) { if (_mainViewModel.ActivateWizardPage) OnVideoRelaySelect(this, null); } else { bool autoLogin = ServiceManager.Instance.ConfigurationService.Get(Configuration.ConfSection.GENERAL, Configuration.ConfEntry.AUTO_LOGIN, false); // if autologin && account exists, try to load the password. if (autoLogin && (App.CurrentAccount != null)) { App.CurrentAccount.ReadPassword(ServiceManager.Instance.GetPWFile()); } if (!autoLogin || string.IsNullOrEmpty(App.CurrentAccount.Password)) { var wizardPage = new ProviderLoginScreen(this); wizardPage.InitializeToAccount(App.CurrentAccount); ChangeWizardPage(wizardPage); } else { // if the user has selected not to log in automatically, make sure that we move to the ServiceManager.Instance.StartupLinphoneCore(); } } }
private void Wizard_HandleLogout() { // in this case we want to show the login page of the wizard without clearing the account VATRPAccount currentAccount = App.CurrentAccount; if (currentAccount != null) { ProviderLoginScreen wizardPage = new ProviderLoginScreen(this); currentAccount.Password = ""; // clear password for logout ServiceManager.Instance.AccountService.Save(); wizardPage.InitializeToAccount(currentAccount); ChangeWizardPage(wizardPage); } // else let it go to the front by default to set up a new account with new service selection }