ReceiveCommand() public method

public ReceiveCommand ( Command_Render command ) : void
command Command_Render
return void
Esempio n. 1
0
        private void button1_Click(object sender, EventArgs e)
        {
            fSendingChannel.GraphPort.UseDefaultBrush();
            fSendingChannel.GraphPort.UseDefaultPen();
            fSendingChannel.GraphPort.Flush();

            switch (fDemoCounter)
            {
                case 0:
                    LineDemo1 aLineDemo = new LineDemo1(new Size(ClientSize.Width, ClientSize.Height));
                    aLineDemo.ReceiveCommand(new Command_Render(fSendingChannel.GraphPort));
                    break;
                case 1:
                    RectangleTest aRectTest = new RectangleTest(new Size(ClientSize.Width, ClientSize.Height));
                    aRectTest.ReceiveCommand(new Command_Render(fSendingChannel.GraphPort));
                    break;

                case 2:
                    TextTest aTextTest = new TextTest(new Size(ClientSize.Width, ClientSize.Height));
                    aTextTest.ReceiveCommand(new Command_Render(fSendingChannel.GraphPort));
                    break;

                case 3:
                    SineWave siner = new SineWave(new Size(ClientSize.Width, ClientSize.Height), 100);
                    siner.ReceiveCommand(new Command_Render(fSendingChannel.GraphPort));
                    break;

                case 4:
                    PolygonTest polygoner = new PolygonTest(new Size(ClientSize.Width, ClientSize.Height));
                    polygoner.ReceiveCommand(new Command_Render(fSendingChannel.GraphPort));
                    break;

                case 5:
                    BezierTest bezierer = new BezierTest(new Size(ClientSize.Width, ClientSize.Height));
                    bezierer.ReceiveCommand(new Command_Render(fSendingChannel.GraphPort));
                    break;

                case 6:
                    GraphTest grapher = new GraphTest(new Size(ClientSize.Width, ClientSize.Height));
                    grapher.ReceiveCommand(new Command_Render(fSendingChannel.GraphPort));
                    break;

                case 7:
                    RandomRect randrect = new RandomRect(new Size(ClientSize.Width, ClientSize.Height));
                    randrect.ReceiveCommand(new Command_Render(fSendingChannel.GraphPort));
                    break;
            }

            ((Button)sender).Text = fDemoCounter.ToString();

            fDemoCounter++;
            if (fDemoCounter == 8)
                fDemoCounter = 0;
        }
Esempio n. 2
0
        private void button1_Click(object sender, EventArgs e)
        {
            fChannel.UseDefaultBrush();
            fChannel.UseDefaultPen();
            fChannel.Flush();
            int width = fDeviceContext.SizeInPixels.Width;
            int height = fDeviceContext.SizeInPixels.Height;

            switch (fDemoCounter)
            {
                case 0:
                    LineDemo1 aLineDemo = new LineDemo1(ClientRectangle.Size);
                    aLineDemo.ReceiveCommand(new Command_Render(fChannel));
                    break;
                case 1:
                    RectangleTest aRectTest = new RectangleTest(ClientRectangle.Size);
                    aRectTest.ReceiveCommand(new Command_Render(fChannel));
                    break;

                case 2:
                    aTextTest.Dimension = ClientRectangle.Size;
                    aTextTest.ReceiveCommand(new Command_Render(fChannel));
                    break;

                case 3:
                    SineWave siner = new SineWave(ClientRectangle.Size, 100);
                    siner.ReceiveCommand(new Command_Render(fChannel));
                    break;

                case 4:
                    PolygonTest polygoner = new PolygonTest(ClientRectangle.Size);
                    polygoner.ReceiveCommand(new Command_Render(fChannel));
                    break;

                case 5:
                    bezierer.Dimension = ClientRectangle.Size;
                    bezierer.ReceiveCommand(new Command_Render(fChannel));
                    break;

                case 6:
                    GraphTest grapher = new GraphTest(ClientRectangle.Size);
                    grapher.ReceiveCommand(new Command_Render(fChannel));
                    break;

                case 7:
                    RandomRect randrect = new RandomRect(ClientRectangle.Size);
                    randrect.ReceiveCommand(new Command_Render(fChannel));
                    break;

                case 8:
                    RegionTest regionTest = new RegionTest(ClientRectangle.Size);
                    regionTest.ReceiveCommand(new Command_Render(fChannel));
                    break;

                case 9:
                    PathTest pathTest = new PathTest(ClientRectangle.Size);
                    pathTest.ReceiveCommand(new Command_Render(fChannel));
                    break;
            }

            ((Button)sender).Text = fDemoCounter.ToString();

            fDemoCounter++;
            if (fDemoCounter == 10)
            {
                fDemoCounter = 0;
            }
        }