示例#1
0
        private void button1_Click(object sender, EventArgs e)  // klik na gumb Shrani
        {
            switch (resolutionList.SelectedIndex)
            {
            case 0: MainScreen.resolution = "720";
                break;

            case 1: MainScreen.resolution = "1080";
                break;

            case 2: MainScreen.resolution = "4k";
                break;

            default: MainScreen.resolution = "720";
                break;
            }
            if (fpsBox.Text != "")
            {
                try { MainScreen.fps = Convert.ToInt32(fpsBox.Text); }
                catch { MessageBox.Show("Napaka pri vnosu FPS parametra. Vnesite primerno številko."); }
            }
            if (widthField.Text != "")
            {
                try { MainScreen.widthRes = Convert.ToInt32(widthField.Text); }
                catch { MessageBox.Show("Napaka pri vnosu Širina videa parametra. Vnesite primerno številko."); }
            }
            if (heightField.Text != "")
            {
                try { MainScreen.heightRes = Convert.ToInt32(heightField.Text); }
                catch { MessageBox.Show("Napaka pri vnosu Višina videa parametra. Vnesite primerno številko."); }
            }
            if (bitrate.Text != "")
            {
                try { MainScreen.bitrate = Convert.ToInt32(bitrate.Text); }
                catch { MessageBox.Show("Napaka pri vnosu bitrate parametra. Vnesite primerno številko."); }
            }
            if (packetsize.Text != "")
            {
                try { MainScreen.packetsize = Convert.ToInt32(packetsize.Text); }
                catch { MessageBox.Show("Napaka pri vnosu packetsize parametra. Vnesite primerno številko."); }
            }
            MainScreen.codec       = codecList.SelectedItem.ToString();
            MainScreen.localAudio  = localAudio.Checked;
            MainScreen.sorround    = sorround.Checked;
            MainScreen.nosops      = nosops.Checked;
            MainScreen.remote      = remote.Checked;
            MainScreen.unsupported = unsupported.Checked;
            MainScreen.platform    = platformList.SelectedItem.ToString();
            MainScreen.windowed    = windowed.Checked;
            MainScreen.gamePics    = gamePics.Checked;

            MainScreen.SaveSettingsFile();
            Close();
        }
示例#2
0
 private void Connect()  // prenesi podatke v glavno okno in se poveži z napravo
 {
     deviceIp       = textBox1.Text;
     deviceUsername = textBox3.Text;
     devicePassword = textBox4.Text;
     if (deviceIp == "" || deviceUsername == "" || devicePassword == "")
     {
         MessageBox.Show("Vnesite vse potrebne podatke!");
     }
     else
     {
         MainScreen.deviceIp       = deviceIp;
         MainScreen.deviceUsername = deviceUsername;
         MainScreen.devicePassword = new NetworkCredential("", devicePassword).SecurePassword;
         MainScreen.SaveSettingsFile();
         label5.Visible = true;
         Close();
     }
 }
示例#3
0
 private void button3_Click(object sender, EventArgs e)  // klik na gumb Ponastavi
 {
     MainScreen.LoadDefaultParameters();
     LoadSettings();
 }