Example #1
0
        private void Execut_LoadActiveProfile()
        {
            View.LoadProfileDialog newDialog = new View.LoadProfileDialog();
            LoadProfileDiagViewModel diagVM = new LoadProfileDiagViewModel(newDialog);
            newDialog.DataContext = diagVM;

            if (newDialog.ShowDialog() == true && diagVM.ProfilList_SelectedIndex >= 0)
            {
                this.ActiveProfile = Profile.LoadProfileFromFile(diagVM.ProfileList[diagVM.ProfilList_SelectedIndex]);
            }
        }
Example #2
0
        private void Execute_LoadProfile()
        {
            View.LoadProfileDialog   newDialog = new View.LoadProfileDialog();
            LoadProfileDiagViewModel diagVM    = new LoadProfileDiagViewModel(newDialog);

            newDialog.DataContext = diagVM;

            if (newDialog.ShowDialog() == true && diagVM.ProfilList_SelectedIndex >= 0)
            {
                this.CPmodel.LoadProfile(diagVM.ProfileList[diagVM.ProfilList_SelectedIndex]);
                this.RefreshView();
            }
        }
Example #3
0
 private void Execute_DialogCancel(View.LoadProfileDialog dialog)
 {
     dialog.DialogResult = false;
 }
Example #4
0
 private void Execute_DialogLoad(View.LoadProfileDialog dialog)
 {
     dialog.DialogResult = true;
 }
Example #5
0
 public LoadProfileDiagViewModel(View.LoadProfileDialog newDialog)
 {
     this.Command_DialogLoad       = new DelegateCommand(x => this.Execute_DialogLoad(newDialog));
     this.Command_DialogCancel     = new DelegateCommand(x => this.Execute_DialogCancel(newDialog));
     this.ProfilList_SelectedIndex = -1;
 }