private LaunchProfileViewModel CreateNewProfile() { var profile = new LaunchProfileViewModel(new LaunchProfile(), this.DeveloperMode, this.EditMode) { IsModified = this.EditMode }; return(profile); }
public void DuplicateProfile() { if (this.SelectedProfile == null) { return; } var clone = new LaunchProfileViewModel(this.SelectedProfile.Profile.Clone(), this.DeveloperMode, this.EditMode) { IsModified = this.EditMode }; this.Profiles.Add(clone); this.SelectedProfile = clone; App.ReportStatus("Profile duplicated."); }
private void OnSelectedProfileChanged(LaunchProfileViewModel oldProfile, LaunchProfileViewModel newProfile) { this.RaisePropertyChanged(nameof(this.ReleaseVersion)); this.RaisePropertyChanged(nameof(this.ServerPingBrush)); this.RaisePropertyChanged(nameof(this.ShowServerPing)); this.RaisePropertyChanged(nameof(this.ServerPingTitleText)); this.ServerPing = "<pinging...>"; if (oldProfile != null) { newProfile.UrlChanged -= this.Profile_UrlChanged; newProfile.SelectedExecutableFileChanged -= this.Profile_SelectedExecutableFileChanged; newProfile.OpenModeChanged -= this.Profile_OpenModeChanged; } if (newProfile != null) { newProfile.UrlChanged += this.Profile_UrlChanged; newProfile.SelectedExecutableFileChanged += this.Profile_SelectedExecutableFileChanged; newProfile.OpenModeChanged += this.Profile_OpenModeChanged; } }
public void LaunchProfile(LaunchProfileViewModel profile = null) { (profile ?? this.SelectedProfile).Launch(this.AttachDebugger ? this.SelectedDebugger : null); }