示例#1
0
        public CADWindow()
        {
            InitializeComponent();

            Model = new CADModel();
            View = new CADView(Model, ClientRectangle.Width, ClientRectangle.Height);

            AllowZoomAndPan = true;
            mPanning = false;

            BackColor = Color.White;
            Cursor = Cursors.Cross;

            Resize += new EventHandler(CadView_Resize);
            MouseDown += new MouseEventHandler(CadView_MouseDown);
            MouseUp += new MouseEventHandler(CadView_MouseUp);
            MouseMove += new MouseEventHandler(CadView_MouseMove);
            MouseDoubleClick += new MouseEventHandler(CadView_MouseDoubleClick);
            MouseWheel += new MouseEventHandler(CadView_MouseWheel);
            Paint += new PaintEventHandler(CadView_Paint);
        }
示例#2
0
        public CADWindow()
        {
            InitializeComponent();

            Model = new CADModel();
            View  = new CADView(Model, ClientRectangle.Width, ClientRectangle.Height);

            AllowZoomAndPan = true;
            mPanning        = false;

            BackColor = Color.White;
            Cursor    = Cursors.Cross;

            Resize           += new EventHandler(CadView_Resize);
            MouseDown        += new MouseEventHandler(CadView_MouseDown);
            MouseUp          += new MouseEventHandler(CadView_MouseUp);
            MouseMove        += new MouseEventHandler(CadView_MouseMove);
            MouseDoubleClick += new MouseEventHandler(CadView_MouseDoubleClick);
            MouseWheel       += new MouseEventHandler(CadView_MouseWheel);
            Paint            += new PaintEventHandler(CadView_Paint);
        }