Exemplo n.º 1
0
        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();
        }
Exemplo n.º 2
0
 private void CheckDriverInstallStatus()
 {
     if (DriverInstaller.CheckInstalled())
     {
         driverLabel.Text  = "Driver is installed";
         driverLabel.Style = MetroFramework.MetroColorStyle.Green;
     }
     else
     {
         driverLabel.Text  = "Driver is not installed";
         driverLabel.Style = MetroFramework.MetroColorStyle.Red;
     }
 }
Exemplo n.º 3
0
        private void LaunchServer()
        {
            if (!DriverInstaller.InstallDriver())
            {
                return;
            }

            if (!SaveConfig())
            {
                return;
            }

            Process.Start("vrmonitor:");
        }
Exemplo n.º 4
0
        private void LaunchServer()
        {
            if (!DriverInstaller.InstallDriver())
            {
                CheckDriverInstallStatus();
                return;
            }
            CheckDriverInstallStatus();

            if (!SaveConfig())
            {
                return;
            }

            if (Properties.Settings.Default.onlySteamVR)
            {
                Utils.LaunchOnlySteamVR();
            }
            else
            {
                Utils.LaunchSteam();
            }
        }
Exemplo n.º 5
0
 private void listDriversButton_Click(object sender, EventArgs e)
 {
     DriverInstaller.ListDrivers();
 }
Exemplo n.º 6
0
        private void uninstallButton_Click(object sender, EventArgs e)
        {
            DriverInstaller.UninstallDriver();

            CheckDriverInstallStatus();
        }
Exemplo n.º 7
0
        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();
        }
Exemplo n.º 8
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();
        }