Пример #1
0
        public CanvasCtrl(ICanvasOwner owner, IModel datamodel)
        {
            M_canvas = this;

            m_canvaswrapper = new CanvasWrapper(this);
            m_model         = datamodel;

            ((DataModel)m_model).AddDrawTool("Pen", new DrawTools.LineEdit(false));
            //////////////////////////////////////////
            //??????????????????????????????????
            ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

            InitializeComponent();
            m_commandType = eCommandType.select;

            BorderStyle = BorderStyle.None;
            this.SetStyle(ControlStyles.AllPaintingInWmPaint | ControlStyles.UserPaint, true);
            this.SetStyle(ControlStyles.OptimizedDoubleBuffer, true);

            m_nodeMoveHelper = new NodeMoveHelper(m_canvaswrapper);
            lines            = new List <Line>();
            orlines          = new List <Line>();
        }
Пример #2
0
        public CanvasCtrl(ICanvasOwner owner, IModel datamodel)
        {
            M_canvas = this;

            m_canvaswrapper = new CanvasWrapper(this);
            m_model = datamodel;

            ((DataModel)m_model).AddDrawTool("Pen", new DrawTools.LineEdit(false));
            //////////////////////////////////////////
            //??????????????????????????????????
            ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

            InitializeComponent();
            m_commandType = eCommandType.select;

            BorderStyle = BorderStyle.None;
            this.SetStyle(ControlStyles.AllPaintingInWmPaint | ControlStyles.UserPaint, true);
            this.SetStyle(ControlStyles.OptimizedDoubleBuffer, true);

            m_nodeMoveHelper = new NodeMoveHelper(m_canvaswrapper);
            lines = new List<Line>();
            orlines = new List<Line>();
        }