/// <summary> /// Constructor for the SettingsModelView /// </summary> /// <param name="i_window"></param> /// <param name="i_common_data"></param> /// <param name="i_sm"></param> public SettingsModelView(CommonModelView i_common_data, SettingsModel i_sm) { common_data = i_common_data; sm = i_sm; common_data.PropertyChanged += Exterior_PropertyChanged; }
private void Window_Loaded(object sender, RoutedEventArgs e) { SettingsModel settings_model = new SettingsModel(); common_modelview = new CommonModelView(); settings_modelview = new SettingsModelView(common_modelview, settings_model); resp_modelview = new RespiratoryModelView(settings_modelview); eeg_modelview = new EEGModelView(settings_modelview); cohere_modelview = new CoherenceModelView(settings_modelview); preview_modelview = new PreviewModelView(settings_modelview); this.DataContext = common_modelview; this.TabItem_Preview.DataContext = preview_modelview; this.TabItem_Respiratory.DataContext = resp_modelview; this.grid_SettingsRespiratory.DataContext = resp_modelview; this.TabItem_EEG.DataContext = eeg_modelview; this.TabItem_Coherence.DataContext = cohere_modelview; this.Flyout_Settings.DataContext = settings_modelview; this.grid_SettingsMainMenu.DataContext = settings_modelview; this.grid_SettingsPersonalization.DataContext = settings_modelview; settings_modelview.RecentFiles_Changed += LoadRecent; settings_modelview.Theme_Changed += UpdateThemeColor; common_modelview.EDF_Loading_Finished += EDFFinishedLoading; LoadRecent(); settings_modelview.LoadAppSettings(); }