예제 #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";
     }
 }
예제 #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";
     }
 }
예제 #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";
     }
 }
예제 #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";
     }
 }
예제 #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";
        }
예제 #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";
     }
 }
예제 #7
0
        private void button3_Click(object sender, EventArgs e)
        {
            IComputingDevice device = devices[devices.Count - 1];

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