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]); } }
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(); } }