private void ButtonSetTarget_Click(object sender, RoutedEventArgs e) { this.cbTarget.SelectedValue = null; var dataContext = this.DataContext as PublishProfileEditorResources; if (dataContext == null) { throw new InvalidOperationException("DataContext is not a valid PublishProfileEditorResources"); } var loginForm = new LogOnForm(Application.Current.MainWindow); var result = loginForm.ShowDialog(); if (result == true) { var target = loginForm.CloudTarget; dataContext.LoggedIn = true; dataContext.SelectedPublishProfile.User = loginForm.Credentials.User; dataContext.SelectedPublishProfile.Password = loginForm.Credentials.Password; this.cbTarget.SelectedValue = target; } }
private void FormMain_Load(object sender, EventArgs e) { m_bIsLogIn = false; m_LoginForm = new LogOnForm(Connect, Reconnect); m_LoginForm.ShowDialog(); if (m_bIsLogIn == false) { Close(); } }
private void btnLogin_Click(object sender, EventArgs e) { this.DisableUI(); try { using (LogOnForm f = new LogOnForm()) { f.ManagerFactory = this.currentManagerFactory; f.ShowDialog(); this.currentUserToken = f.UserIdToken; } } finally { this.RefreshActivationStorageInformation(); this.RefreshLogOnInformation(); this.RefreshUI(); } }
private void ButtonSetTarget_Click(object sender, RoutedEventArgs e) { var dataContext = this.DataContext as PublishProfileEditorResources; if (dataContext == null) { throw new InvalidOperationException("DataContext is not a valid PublishProfileEditorResources"); } var loginForm = new LogOnForm(); var result = loginForm.ShowDialog(); if (result == true) { var target = loginForm.CloudTarget; this.cbTarget.SelectedValue = target; } }
private void AddTargetButton_Click(object sender, RoutedEventArgs e) { var loginForm = new LogOnForm(); var result = loginForm.ShowDialog(); if (result == true) { var target = loginForm.CloudTarget; if (target != null) { CloudTargetManager.SaveTarget(target); CloudCredentialsManager.Save(target.TargetUrl, target.Email, loginForm.Credentials.Password); this.ReloadTargets(); } } }