ReceiveCommand() public method

public ReceiveCommand ( Command_Render command ) : void
command Command_Render
return void
コード例 #1
0
ファイル: Form1.cs プロジェクト: Wiladams/NewTOAPIA
        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;
        }