Ejemplo n.º 1
0
        private void Form1_Load(object sender, EventArgs e)
        {
            if (Properties.Settings.Default.WindowLocation != null)
            {
                this.Location = Properties.Settings.Default.WindowLocation;
            }
            // getting all port names
            string[] names = SerialPort.GetPortNames();
            for (int i = 0; i < names.Length; i++)
            {
                cbComport.Items.Add(names[i]);
                Debug.WriteLine(names[i]);
            }
            arduinoCom = new ArduinoCom();

            String comportString = Properties.Settings.Default.Comport;

            Debug.WriteLine(comportString);
            if (comportString != null)
            {
                cbComport.Text = comportString;
                arduinoCom.setComPort(cbComport.Text);
            }

            timeBrightness.Value = Properties.Settings.Default.Time_Brightness;

            ColorRed          = Properties.Settings.Default.ColorRed;
            ColorYellow       = Properties.Settings.Default.ColorYellow;
            ColorGreen        = Properties.Settings.Default.ColorGreen;
            ColorBlue         = Properties.Settings.Default.ColorBlue;
            ColorWhite        = Properties.Settings.Default.ColorWhite;
            ColorBlack        = Properties.Settings.Default.ColorBlack;
            ColorError        = Properties.Settings.Default.ColorError;
            checkBox1.Checked = Properties.Settings.Default.Show_Date;

            timer1.Enabled = true;

            rbBlack.Checked = true;
            cbBlink.Checked = false;
            lastColor       = Color.Black;
            connectSkype();
        }
Ejemplo n.º 2
0
 private void cbComport_SelectedIndexChanged(object sender, EventArgs e)
 {
     arduinoCom.setComPort(cbComport.Text);
     Properties.Settings.Default.Comport = cbComport.Text;
     Properties.Settings.Default.Save();
 }
Ejemplo n.º 3
0
        private void Form1_Load(object sender, EventArgs e)
        {
            if (Properties.Settings.Default.WindowLocation != null)
            {
                this.Location = Properties.Settings.Default.WindowLocation;
            }
            // getting all port names
            string[] names = SerialPort.GetPortNames();
            for (int i = 0; i < names.Length; i++)
            {
                cbComport.Items.Add(names[i]);
                Debug.WriteLine(names[i]);
            }
            arduinoCom = new ArduinoCom();

            String comportString = Properties.Settings.Default.Comport;
            Debug.WriteLine(comportString);
            if (comportString != null)
            {
                cbComport.Text = comportString;
                arduinoCom.setComPort(cbComport.Text);
            }

            timeBrightness.Value = Properties.Settings.Default.Time_Brightness;

            ColorRed = Properties.Settings.Default.ColorRed;
            ColorYellow = Properties.Settings.Default.ColorYellow;
            ColorGreen = Properties.Settings.Default.ColorGreen;
            ColorBlue = Properties.Settings.Default.ColorBlue;
            ColorWhite = Properties.Settings.Default.ColorWhite;
            ColorBlack = Properties.Settings.Default.ColorBlack;
            ColorError = Properties.Settings.Default.ColorError;
            checkBox1.Checked = Properties.Settings.Default.Show_Date;

            timer1.Enabled = true;

            rbBlack.Checked = true;
            cbBlink.Checked = false;
            lastColor = Color.Black;
            connectSkype();
        }