Exemplo n.º 1
0
 private void radioButton6_CheckedChanged(object sender, EventArgs e)
 {
     if (devices.Count != 0 && radioButton1.Checked && radioButton6.Checked)
     {
         IComputingDevice device = devices[devices.Count - 1];
         richTextBox2.Text += ((Smartphone)device).FlashlightOff() + "\n";
     }
 }
Exemplo n.º 2
0
 private void radioButton4_CheckedChanged(object sender, EventArgs e)
 {
     if (devices.Count != 0 && radioButton1.Checked && radioButton4.Checked)
     {
         IComputingDevice device = devices[devices.Count - 1];
         richTextBox2.Text += ((Laptop)device).TouchPadOff() + "\n";
     }
 }
Exemplo n.º 3
0
 private void radioButton2_CheckedChanged(object sender, EventArgs e)
 {
     if (devices.Count != 0 && radioButton2.Checked)
     {
         IComputingDevice device = devices[devices.Count - 1];
         richTextBox2.Text += ((Computer)device).DeviceOff() + "\n";
     }
 }
Exemplo n.º 4
0
 private void button2_Click(object sender, EventArgs e)
 {
     if (devices.Count != 0)
     {
         IComputingDevice device = devices[devices.Count - 1];
         richTextBox2.Text += ((Computer)device).Sleep() + "\n";
     }
 }
Exemplo n.º 5
0
        private void button1_Click_1(object sender, EventArgs e)
        {
            GetDevice();
            if (devices.Count == 0)
            {
                richTextBox2.Text += "Устройство не создано" + "\n";
                return;
            }
            IComputingDevice device = devices[devices.Count - 1];

            richTextBox2.Text += "Создано устройство " + textBox1.Text + " " + textBox2.Text + " с памятью " + textBox3.Text + " и зарядом батареи " + textBox5.Text + " \n";
        }
Exemplo n.º 6
0
 private void button4_Click(object sender, EventArgs e)
 {
     if (textBox4.TextLength != 0)
     {
         if (devices.Count != 0)
         {
             IComputingDevice device = devices[devices.Count - 1];
             richTextBox2.Text += ((Navigator)device).LeadTheWay() + "\n";
         }
     }
     else
     {
         richTextBox2.Text += "Enter the distanation" + "\n";
     }
 }
Exemplo n.º 7
0
        private void button3_Click(object sender, EventArgs e)
        {
            IComputingDevice device = devices[devices.Count - 1];

            richTextBox2.Text += ((Computer)device).ChargeCheck() + "\n";
        }