Ejemplo n.º 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]);
            }
        }
Ejemplo n.º 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();
            }
        }