Example #1
0
        private void button2_Click(object sender, EventArgs e)
        {
            FluidProgram.Create("xiaoxu", 0, 0);
            DotCmdLine dot = new DotCmdLine();

            dot.Position.X = 100;
            dot.Position.Y = 100;
            FluidProgram.CurrentOrDefault().Workpiece.AddCmdLine(dot);

            DoCmdLine doPattern = new DoCmdLine("1", 300, 300);

            FluidProgram.CurrentOrDefault().Workpiece.AddCmdLine(doPattern);

            Pattern    pattern = new Pattern(FluidProgram.CurrentOrDefault(), "1", 200, 200);
            DotCmdLine dot1    = new DotCmdLine();

            dot1.Position.X = 200;
            dot1.Position.Y = 200;
            pattern.AddCmdLine(dot1);
            FluidProgram.CurrentOrDefault().AddPattern(pattern);



            DrawingMsgCenter.Instance.SendMsg(DrawingMessage.需要更新绘图程序, FluidProgram.CurrentOrDefault());

            DrawProgram.Instance.SetGraphics(this.g, 1);
            DrawProgram.Instance.Drawing();
        }