コード例 #1
0
        protected override object CreateControlCore()
        {
            if (_diagram == null)
            {
                this._os.Committing += _os_Committing;

                _diagram = new DXDiagramControl();

                _diagram.OptionsView.PageSize = new SizeF(1024, 800);
                _diagram.OptionsView.GridSize = new SizeF(30, 30);
                _diagram.MouseUp           += _diagram_MouseUp;
                _diagram.MouseDoubleClick  += _diagram_MouseDoubleClick;
                _diagram.EditConnector     += _diagram_EditConnector;
                _diagram.EditShape         += _diagram_EditShape;
                _diagram.DeleteConnector   += _diagram_DeleteConnector;
                _diagram.DeleteShape       += _diagram_DeleteShape;
                _diagram.AddedConnector    += _diagram_AddedConnector;
                _diagram.SelectionChanged  += _diagram_SelectionChanged;
                _diagram.ClientSizeChanged += _diagram_ClientSizeChanged;
                ReadValueCore();

                UpdateDesignerMode(isDesignMode);
            }
            return(_diagram);
        }
コード例 #2
0
        protected override object CreateControlCore()
        {
            if (_diagram == null)
            {
                this._os.Committing += _os_Committing;

                _diagram = new DXDiagramControl();

                _diagram.OptionsView.PageSize = new SizeF(1024, 800);
                _diagram.OptionsView.GridSize = new SizeF(30, 30);
                _diagram.MouseUp += _diagram_MouseUp;
                _diagram.MouseDoubleClick += _diagram_MouseDoubleClick;
                _diagram.EditConnector += _diagram_EditConnector;
                _diagram.EditShape += _diagram_EditShape;
                _diagram.DeleteConnector += _diagram_DeleteConnector;
                _diagram.DeleteShape += _diagram_DeleteShape;
                _diagram.AddedConnector += _diagram_AddedConnector;
                _diagram.SelectionChanged += _diagram_SelectionChanged;
                _diagram.ClientSizeChanged += _diagram_ClientSizeChanged;
                ReadValueCore();

                UpdateDesignerMode(isDesignMode);
            }
            return _diagram;
        }