예제 #1
0
        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();
        }
예제 #2
0
        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();

            //
            // 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();
        }