Esempio n. 1
0
        private LaunchProfileViewModel CreateNewProfile()
        {
            var profile = new LaunchProfileViewModel(new LaunchProfile(), this.DeveloperMode, this.EditMode)
            {
                IsModified = this.EditMode
            };

            return(profile);
        }
Esempio n. 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.");
        }
Esempio n. 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;
            }
        }
Esempio n. 4
0
 public void LaunchProfile(LaunchProfileViewModel profile = null)
 {
     (profile ?? this.SelectedProfile).Launch(this.AttachDebugger ? this.SelectedDebugger : null);
 }