private void Launcher_Load(object sender, EventArgs e) { SetFileVersion(); var list = SoundDevice.GetSoundDeviceList(); foreach (var device in list) { soundDeviceComboBox.Items.Add(device); } LoadSettings(); config.Save(); UpdateEnableControllerState(); UpdateSoundCheckboxState(); DriverInstaller.RemoveOtherDriverInstallations(); CheckDriverInstallStatus(); metroTabControl1.SelectedTab = serverTab; UpdateServerStatus(); messageLabel.Text = "Checking server status. Please wait..."; ShowMessagePanel(); socket.Update(); SoundDevice.GetSoundDeviceList(); timer1.Start(); }
private void Launcher_Load(object sender, EventArgs e) { SetFileVersion(); LoadSettings(); config.Save(); UpdateEnableControllerState(); CheckDriverInstallStatus(); metroTabControl1.SelectedTab = serverTab; UpdateServerStatus(); messageLabel.Text = "Checking server status. Please wait..."; ShowMessagePanel(); socket.Update(); timer1.Start(); }
private void Launcher_Load(object sender, EventArgs e) { // Set version label SetFileVersion(); // // Get sound devices // try { var list = SoundDevice.GetSoundDeviceList(); foreach (var device in list) { soundDeviceComboBox.Items.Add(device); } } catch (Exception e2) { Application.Exit(); return; } // // Load config and create memory mapped object // codecComboBox.Items.AddRange(ServerConfig.supportedCodecs); LoadSettings(); config.Save(); // // Set UI state // UpdateEnableControllerState(); UpdateSoundCheckboxState(); // // Driver check // DriverInstaller.CheckDriverPath(); DriverInstaller.RemoveOtherDriverInstallations(); CheckDriverInstallStatus(); // // Open server tab // metroTabControl1.SelectedTab = serverTab; // // Update UI // UpdateServerStatus(); messageLabel.Text = "Checking server status. Please wait..."; ShowMessagePanel(); socket.Update(); timer1.Start(); }
private void Launcher_Load(object sender, EventArgs e) { // Set version label SetFileVersion(); // // Get sound devices // try { soundDevices = DeviceQuery.GetSoundDeviceList(); int i = 0; foreach (var device in soundDevices) { string text = device.name; if (device.isDefault) { defaultSoundDeviceIndex = i; text = "(Default) " + text; } soundDeviceComboBox.Items.Add(text); i++; } } catch (Exception) { Application.Exit(); return; } // // Load config and create memory mapped object // codecComboBox.Items.AddRange(ServerConfig.supportedCodecs); LoadSettings(); config.Save(null); // // Set UI state // UpdateEnableControllerState(); UpdateSoundCheckboxState(); // // Driver check // try { DriverInstaller.CheckDriverPath(); DriverInstaller.RemoveOtherDriverInstallations(); CheckDriverInstallStatus(); } catch (Exception e2) { MessageBox.Show("No SteamVR installation found. Please check installation of SteamVR.\r\n" + e2.Message, "ALVR Fatal Error", MessageBoxButtons.OK, MessageBoxIcon.Error); Application.Exit(); } // // Open server tab // metroTabControl1.SelectedTab = serverTab; // // Update UI // UpdateServerStatus(); socket.Update(); timer1.Start(); clientList.StartListening(); ShowFindingPanel(); UpdateClients(); }
private void Launcher_Load(object sender, EventArgs e) { SetFileVersion(); if (!config.Load()) { Application.Exit(); return; } foreach (var width in ServerConfig.supportedWidth) { int i = resolutionComboBox.Items.Add(width + " x " + (width / 2)); if (config.renderWidth == width) { resolutionComboBox.SelectedItem = resolutionComboBox.Items[i]; } } for (int i = 0; i < ServerConfig.supportedButtons.Length; i++) { var item = new ComboBoxCustomItem(ServerConfig.supportedButtons[i], ServerConfig.supportedButtonId[i]); int index = triggerComboBox.Items.Add(item); if (ServerConfig.supportedButtonId[i] == config.controllerTriggerMode) { triggerComboBox.SelectedIndex = index; } index = trackpadClickComboBox.Items.Add(item); if (ServerConfig.supportedButtonId[i] == config.controllerTrackpadClickMode) { trackpadClickComboBox.SelectedIndex = index; } } for (int i = 0; i < ServerConfig.supportedRecenterButton.Length; i++) { var item = new ComboBoxCustomItem(ServerConfig.supportedRecenterButton[i], i); int index = recenterButtonComboBox.Items.Add(item); if (i == config.controllerRecenterButton) { recenterButtonComboBox.SelectedIndex = index; } } bitrateTrackBar.Value = config.bitrate; SetBufferSizeBytes(config.bufferSize); CheckDriverInstallStatus(); metroTabControl1.SelectedTab = serverTab; UpdateServerStatus(); messageLabel.Text = "Checking server status. Please wait..."; messagePanel.Show(); findingPanel.Hide(); socket.Update(); timer1.Start(); }