Exemplo n.º 1
0
        public Screen_Settings(ref ShootBoard ScreenRef)
        {
            InitializeComponent();

            //初始化引用
            BoardRef = ScreenRef;
        }
Exemplo n.º 2
0
        public MainForm()
        {
            InitializeComponent();

            //实例化通信组件
            COM = new InterfaceToSlave(ref Datas);

            //挂靠用户数据引用
            COM.InitUserDatas(ref Datas);

            //初始化通信组件串口
            COM.InitSerialPort(ref SPort);

            //初始化测试绘图板
            TestBoard = new ShootBoard(ref groupBox1);

            //初始化采样点坐标处理委托
            Datas.SampleHandlerInit(new UserDatas.SampleDataHandlerTypedef(GetShootPoint));

            //初始化校准采样处理委托
            Datas.CorrectHandlerInit(new UserDatas.CorrectDataHandlerTypedef(CorrectScreen));

            //初始化控制请求处理委托
            Datas.CtrlHandlerInit(new UserDatas.CtrlHandlerTypedef(GetCtrlData));

            //测试绘图
            TestBoard.ShowString("Test_ GDI+ World.\nTest... GDI+ Word.", new Point(14, 10));

            //测试清除
            //TestBoard.ClearScreenPartialy(new Point(14, 10), 20, 60);
        }
Exemplo n.º 3
0
 //当大小发生变化时
 private void groupBox1_SizeChanged(object sender, EventArgs e)
 {
     //重新初始化画板
     TestBoard = new ShootBoard(ref groupBox1);
 }