public Home() { bool designTime = System.ComponentModel.DesignerProperties.GetIsInDesignMode(new DependencyObject()); if (designTime == false) { this.disp = App.Current.MainWindow.Dispatcher; this.Contacts = new ObservableCollection <Contact>(); this.LoadedCMD = new RelayCommand(OnLoaded); this.OpenSettingsCMD = new RelayCommand(() => { View.Settings settings = new View.Settings(); settings.Show(); }); this.TalkCMD = new RelayCommand(() => { if (this.SelectedContact != -1) { View.Talk talk = new View.Talk(); ViewModel.Talk talkVM = new Talk(this.Login, this.Contacts[this.SelectedContact], this.netsoul); talk.DataContext = talkVM; talk.Show(); } }); this.Status = new ObservableCollection <string>(); foreach (var st in Enum.GetValues(typeof(ContactStatus))) { this.Status.Add(st.ToString()); } } }
public void OpenSettingsForm() { View.Settings S = new View.Settings(Model.Configuration.Config.GetConfig); S.SaveSettings += new View.SaveSettingsHandler(SaveSettings); S.Show(); }
public void OpenSettingsForm() { View.Settings S = new View.Settings(Model.Configuration.Config.GetConfig); S.SaveSettings += new View.SaveSettingsHandler(SaveSettings); S.Show(); }