public OverrideSetting(MainWindow mainWindow, AppRegInfo appReg, Hashtable inGameAxis, DeviceControl deviceControl, KeyFile keyFile, VisualAcuity visualAcuity) { this.mainWindow = mainWindow; this.appReg = appReg; this.inGameAxis = inGameAxis; this.deviceControl = deviceControl; this.keyFile = keyFile; this.visualAcuity = visualAcuity; if (!System.IO.Directory.Exists(appReg.GetInstallDir() + "/User/Config/Backup/")) { System.IO.Directory.CreateDirectory(appReg.GetInstallDir() + "/User/Config/Backup/"); } SaveAxisMapping(); SaveJoystickCal(); SaveDeviceSorting(); SaveConfigfile(); SaveKeyMapping(); SaveJoyAssignStatus(); }
/// <summary> /// Execute when launching this app. /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void Window_Loaded(object sender, RoutedEventArgs e) { try { // Load UI Properties(Like Button Status). this.appProperties = new AppProperties(this); // Read Registry appReg = new AppRegInfo(this); // Read Theater List TheaterList theaterlist = new TheaterList(appReg, this.Dropdown_TheaterList); // Get Devices deviceControl = new DeviceControl(appReg); neutralButtons = new NeutralButtons[deviceControl.devList.Count]; // Aquire joySticks AquireAll(true); // Reset All Axis Settings foreach (AxisName nme in axisNameList) { inGameAxis[nme.ToString()] = new InGameAxAssgn(); } joyAssign_2_inGameAxis(); ResetAssgnWindow(); // Read BMS-FULL.key string fname = appReg.GetInstallDir() + "\\User\\Config\\BMS - Full.key"; keyFile = new KeyFile(fname, appReg); // Write Data Grid WriteDataGrid(); // Set Timer AxisMovingTimer.Tick += AxisMovingTimer_Tick; AxisMovingTimer.Interval = new TimeSpan(0, 0, 0, 0, 16); KeyMappingTimer.Tick += KeyMappingTimer_Tick; KeyMappingTimer.Interval = new TimeSpan(0, 0, 0, 0, 16); // Set VisualAcuity page graph and results. this.visualAcuity = new VisualAcuity(this); //System.Diagnostics.PresentationTraceSources.DataBindingSource.Switch.Level = System.Diagnostics.SourceLevels.Critical; } catch (System.IO.FileNotFoundException ex) { System.Console.WriteLine(ex.Message); System.IO.StreamWriter sw = new System.IO.StreamWriter(appReg.GetInstallDir() + "\\Error.txt", false, System.Text.Encoding.GetEncoding("shift_jis")); sw.Write(ex.Message); sw.Close(); this.Close(); } // YAME 64 VERSION if (FLG_YAME64 == true) { LargeTab.SelectedIndex = 1; Tab_Launcher.Visibility = Visibility.Collapsed; Tab_VisualAcuity.Visibility = Visibility.Collapsed; Misc_SmartScalingOverride.IsChecked = false; this.Background = new SolidColorBrush(Color.FromArgb(255, 240, 240, 240)); BackGroundBox1.Background = new SolidColorBrush(Color.FromArgb(255, 240, 240, 240)); BackGroundBox2.Background = new SolidColorBrush(Color.FromArgb(255, 240, 240, 240)); BackGroundImage.Opacity = 0; } else { Button_Apply_YAME64.Visibility = Visibility.Hidden; } }