示例#1
0
        /// <summary>
        /// 初始化数据
        /// </summary>
        private void Init()
        {
            // 初始化数据库管理器
            dataBaseManager = DataBaseManager.GetDataBaseManager();

            // 初始化分类管理器
            documentManager                         = DocumentManager.GetDocumentManager();
            documentManager.TreeMenu                = this.bTreeMenu;
            documentManager.UndoButton              = this.bUndoCommand;
            documentManager.RedoButton              = this.bRedoCommand;
            documentManager.CommandSwitchButton     = this.bCommandSwitch;
            documentManager.CurrentTabControl       = this.canvasGroupContainer;
            documentManager.TreeTabControl          = this.treeContainer;
            documentManager.CurrentAbbreviateCanvas = this.abbreviateCanvas;
            documentManager.CurrentPropertyGrid     = this.propertyGrid1;
            documentManager.LogBox                  = this.LogEditBox;
            documentManager.TreePanel               = this.expandablePanel1;
            documentManager.TreeImageList           = this.treeNodeImageList;
            documentManager.ScaleComboBox           = this.canvasScaleBox;
            documentManager.AddDiagramRecordButton(this.bLatestDiagram1);
            documentManager.AddDiagramRecordButton(this.bLatestDiagram2);
            documentManager.AddDiagramRecordButton(this.bLatestDiagram3);
            documentManager.AddDiagramRecordButton(this.bLatestDiagram4);
            documentManager.AddDiagramRecordButton(this.bLatestDiagram5);
            documentManager.Init();

            // 显示数据库名称
            LDBName.Text = dataBaseManager.Connection.Database;

            #if (!DEBUG) // 自动隐藏日志条
            barLog.AutoHide = true;
            #endif
        }