private void Tool_Click(object sender, RoutedEventArgs e) { var settingWindow = new SettingMaker(); settingWindow.ShowDialog(); if (settingWindow.FilePath != null) { ProgramSetting.SensorConfPath = settingWindow.FilePath; ConfPath.GetBindingExpression(System.Windows.Controls.TextBox.TextProperty).UpdateTarget(); } }
private void SensorSettingBrowse_Click(object sender, RoutedEventArgs e) { OpenFileDialog openFileDialog = new OpenFileDialog { Filter = "Setting files (*.json)|*.json" }; if (openFileDialog.ShowDialog() == System.Windows.Forms.DialogResult.OK) { string SensorInfoString = File.ReadAllText(openFileDialog.FileName); try { List <SensorInfo> sensorInfos = JsonConvert.DeserializeObject <List <SensorInfo> >(SensorInfoString); } catch (JsonSerializationException) { System.Windows.MessageBox.Show("Can not read setting file. Please choose correct file."); return; } ProgramSetting.SensorConfPath = openFileDialog.FileName; ConfPath.GetBindingExpression(System.Windows.Controls.TextBox.TextProperty).UpdateTarget(); } }
public MediaResolver(ConfPath config) { this.config = config; }
public MediaFactory(ConfPath config) { this.config = config; }