Esempio n. 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
        }
Esempio n. 2
0
        private FlowChartMoveCommand moveCommand; // 移动命令

        /// <summary>
        /// 单例模式的构造函数
        /// </summary>
        /// <param name="mainForm">主窗体</param>
        /// <param name="canvas">绘图面板</param>
        /// <param name="propertyGrid">属性面板</param>
        public GraphManager(FlowChartManager flowChartManager, Canvas canvas)
        {
            this.flowChartManager = flowChartManager;
            this.canvas = canvas;
            helper = Helper.GetHelper();
            documentManager = DocumentManager.GetDocumentManager();

            // 初始化背景绘图参数
            InitBackground(); 
      
            // 初始化区域管理器
            regionManager.Init(slotContainerList, connectorContainerList, background.BaseSize, background.GridSize.Width);
        }               
Esempio n. 3
0
        /// <summary>
        /// 初始化数据
        /// </summary>
        private void Init()
        {
            documentManager = DocumentManager.GetDocumentManager();
            TreeView currentTree = documentManager.CurrentTree;
            TreeNode node = currentTree.Nodes[0].Nodes["子绘图"];

            innerChartBox.Items.Clear();

            if (node != null)
            {
                foreach (TreeNode innerChartNode in node.Nodes)
                {
                    innerChartBox.Items.Add(innerChartNode.Text);
                    idTable[innerChartNode.Text] = innerChartNode.Tag;
                }
            }

            innerChartBox.Text = innerChartPath;
        }
Esempio n. 4
0
        /// <summary>
        /// 获取分类管理器的实例
        /// </summary>
        /// <returns>分类管理器的实例</returns>
        public static DocumentManager GetDocumentManager()
        {
            if(documentManager == null)
            {
                documentManager = new DocumentManager();
            }

            return documentManager;
        }