Esempio n. 1
0
        private void дТриггерToolStripMenuItem_Click(object sender, EventArgs e)
        {
            forma.Text  = null;
            Qb1.Text    = null;
            Qb2.Text    = null;
            resetb.Text = null;
            setb.Text   = null;
            and.Hide();
            button1.Hide();
            dtrigger.Show();
            label1.Text = "D Trigger";
            label1.BringToFront();
            hides();
            pictureBox1.Show();
            resetb.Location = new Point(110, 75);
            Qb1.Location    = new Point(550, 100);
            setb.Location   = new Point(110, 165);
            Qb2.Location    = new Point(550, 210);
            Qb1.Show();
            Qb2.Show();
            setb.Show();
            resetb.Show();

            pictureBox1.Image = Image.FromFile(@"videostuff\0.png");
        }
Esempio n. 2
0
        private void асинхронныйРСТриггерToolStripMenuItem1_Click(object sender, EventArgs e)
        {
            forma.Text      = null;
            Qb1.Text        = null;
            Qb2.Text        = null;
            resetb.Text     = null;
            setb.Text       = null;
            resetb.Location = reb;
            setb.Location   = seb;
            Qb1.Location    = qb1;
            Qb2.Location    = qb2;
            reset.Text      = "S";
            set.Text        = "R";
            or1.Text        = "and";
            or2.Text        = "and";
            dtrigger.Hide();
            button1.Hide();
            hides();
            Qb1.Show();
            Qb2.Show();
            resetb.Show();
            setb.Show();
            and.Show();
            pictureBox1.Show();
            label1.Text = "AND Async RS Trigger";
            label1.Show();
            int      x = 3;
            Graphics g;
            Bitmap   bitmap = new Bitmap(pictureBox1.Width, pictureBox1.Height);

            g = Graphics.FromImage(bitmap);
            Pen penblck = new Pen(Color.Black, x);
            Pen penred  = new Pen(Color.Red, x);
            Pen penblue = new Pen(Color.Blue, x);

            g.DrawRectangle(penblck, 300, 10, 50, 60);  //Square R
            g.DrawRectangle(penblck, 300, 120, 50, 60); //Square S

            //Vhod R
            g.DrawLine(penred, 300, 30, 250, 30);
            //Vhod S
            g.DrawLine(penred, 300, 140, 250, 140);
            //Vihod R
            g.DrawLine(penred, 351, 30, 450, 30);
            g.DrawArc(penblck, 345, 25, 10, 10, 360, 360);
            //Vihod S
            g.DrawLine(penred, 351, 140, 450, 140);
            g.DrawArc(penblck, 345, 135, 10, 10, 360, 360);
            //R to S
            g.DrawLine(penblue, 400, 30, 400, 90);
            g.DrawLine(penblue, 402, 90, 270, 90);
            g.DrawLine(penblue, 270, 90, 270, 130);
            g.DrawLine(penblue, 269, 130, 300, 130);
            //S to R
            g.DrawLine(penred, 380, 80, 380, 140);
            g.DrawLine(penred, 382, 80, 270, 80);
            g.DrawLine(penred, 270, 40, 270, 82);
            g.DrawLine(penred, 270, 40, 300, 40);
            set.Show();
            reset.Show();
            or1.Show();
            or2.Show();
            q1.Show();
            q2.Show();
            pictureBox1.Image = bitmap;
        } //&