private void PFPanel_Load(object sender, EventArgs e) { AppSettings.Instance.Reload( ); // Assign Size property - check if on screen, else use defaults if (IsOnScreen(new Rectangle(AppSettings.Instance.FormLocation, this.Size))) { this.Location = AppSettings.Instance.FormLocation; } string version = Application.ProductVersion; // get the version information // BETA VERSION; TODO - comment out if not longer //lblTitle.Text += " - V " + version.Substring( 0, version.IndexOf( ".", version.IndexOf( "." ) + 1 ) ); // PRODUCTION lblVersion.Text = "Version: " + version + " beta"; // BETA string s = AppSettings.Instance.ConfigFile; if (!string.IsNullOrEmpty(s) && File.Exists(s)) { txConfigFile.Text = s; } btStopService.Enabled = false; // vJoy DLL cbxJoystick.Items.Clear( ); lblVJoy.Text = "not available"; if (vJoyInterfaceWrap.vJoy.isDllLoaded) { var tvJoy = new vJoyInterfaceWrap.vJoy( ); for (uint i = 1; i <= 16; i++) { if (tvJoy.isVJDExists(i)) { cbxJoystick.Items.Add($"Joystick#{i}"); } } if (cbxJoystick.Items.Count > 0) { cbxJoystick.SelectedIndex = 0; // select the one in AppSettings string[] js = AppSettings.Instance.JoystickUsed.Split(new char[] { ' ' }, StringSplitOptions.RemoveEmptyEntries); // a list for (int i = 0; i < js.Length; i++) { var idx = cbxJoystick.Items.IndexOf(js[i]); if (idx >= 0) { cbxJoystick.SetItemChecked(idx, true); } } } lblVJoy.Text = $"loaded - {cbxJoystick.Items.Count:#} device(s)"; tvJoy = null; } // Kbd DLL if (SCdxKeyboard.isDllLoaded) { lblSCdx.Text = "loaded"; cbxKBon.Enabled = true; cbxKBon.Checked = AppSettings.Instance.UseKeyboard; } else { lblSCdx.Text = "not available"; cbxKBon.Checked = false; cbxKBon.Enabled = false; } }