void EditSelectedProfileExecuted() { if (newProfileWindow != null) { newProfileWindow.Close(); } newProfileWindow = new ProfileEditWindow(SelectedProfile); newProfileWindow.Show(); }
private void btnEditProfile_Click(object sender, EventArgs e) { try { ProfileEditWindow dlg = new ProfileEditWindow(); if (dlg.ShowDialog() == System.Windows.Forms.DialogResult.OK) { //Text = string.Format(ApplicationStrings.MainWindowTitle, Constants.ApplicationName, UserContext.CurrentProfile.UserName); } } catch (Exception ex) { ExceptionHandler.Default.Process(ex, ApplicationStrings.ErrorLoadProfile, ErrorWindow.EMailReport); } }
void AddNewProfileExecuted() { //Create the new profile and if success, open the profile in a new window to edit var newProfile = new Profile() { ProfileName = "Empty Profile", DateCreated = DateTime.Now, }; if (HostLists.HostLists.AddNewProfile(newProfile)) { if (newProfileWindow != null) newProfileWindow.Close(); newProfileWindow = new ProfileEditWindow(newProfile); newProfileWindow.Show(); } }
void AddNewProfileExecuted() { //Create the new profile and if success, open the profile in a new window to edit var newProfile = new Profile() { ProfileName = "Empty Profile", DateCreated = DateTime.Now, }; if (HostLists.HostLists.AddNewProfile(newProfile)) { if (newProfileWindow != null) { newProfileWindow.Close(); } newProfileWindow = new ProfileEditWindow(newProfile); newProfileWindow.Show(); } }
void EditSelectedProfileExecuted() { if (newProfileWindow != null) newProfileWindow.Close(); newProfileWindow = new ProfileEditWindow(SelectedProfile); newProfileWindow.Show(); }