コード例 #1
0
        private LaunchProfileViewModel CreateNewProfile()
        {
            var profile = new LaunchProfileViewModel(new LaunchProfile(), this.DeveloperMode, this.EditMode)
            {
                IsModified = this.EditMode
            };

            return(profile);
        }
コード例 #2
0
        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.");
        }
コード例 #3
0
        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;
            }
        }
コード例 #4
0
 public void LaunchProfile(LaunchProfileViewModel profile = null)
 {
     (profile ?? this.SelectedProfile).Launch(this.AttachDebugger ? this.SelectedDebugger : null);
 }