private void B_update_set_Click(object sender, RoutedEventArgs e) { if (lv_records.SelectedIndex >= 0) { records[lv_records.SelectedIndex].ss = (double)l_ss.Content; records[lv_records.SelectedIndex].hfov = (double)l_hfov.Content; records[lv_records.SelectedIndex].vfov = (double)l_vfov.Content; records[lv_records.SelectedIndex].bitrate = (int)sl_bitrate.Value; records[lv_records.SelectedIndex].asw = cb_ASW.SelectedIndex; CfgTools.WriteCfg(records, cfg_file); } }
private void B_add_exe_Click(object sender, RoutedEventArgs e) { Microsoft.Win32.OpenFileDialog ofd = new Microsoft.Win32.OpenFileDialog(); ofd.Title = "Select App Exe"; ofd.DefaultExt = "*.exe"; ofd.Filter = "*.exe |*.exe"; ofd.InitialDirectory = AppDomain.CurrentDomain.BaseDirectory; if (ofd.ShowDialog() == false) { return; } Record rec = new Record(ofd.FileName, ss, cb_ASW.SelectedIndex, cb_debugHUD.SelectedIndex, (int)sl_bitrate.Value, hfov, vfov); records.Add(rec); CfgTools.WriteCfg(records, cfg_file); }