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(); } }
public ProfileEditViewModel(Profile profile) { this.Profile = profile; }
public ProfileEditWindow(Profile profile) { InitializeComponent(); PEditViewModel = new ProfileEditViewModel(profile); }
public static bool UpdateProfile(Profile newProfile) { // Return true for success, false for fail return true; }