Esempio n. 1
0
        /// <summary>
        /// 初始化工具箱
        /// </summary>
        public void InitToolBox()
        {
            BaseWorkFlow startWF = WorkFlowFactory.GetWorkFlow(WorkFlowEnum.Start);

            startWF.DragStarted += AddModel;
            ToolBox.WorkAreaItems.Add(startWF);

            BaseWorkFlow processWF = WorkFlowFactory.GetWorkFlow(WorkFlowEnum.Process);

            ToolBox.WorkAreaItems.Add(processWF);
            processWF.DragStarted += AddModel;

            BaseWorkFlow decisionWF = WorkFlowFactory.GetWorkFlow(WorkFlowEnum.Decision);

            ToolBox.WorkAreaItems.Add(decisionWF);
            decisionWF.DragStarted += AddModel;

            BaseWorkFlow endWF = WorkFlowFactory.GetWorkFlow(WorkFlowEnum.End);

            endWF.DragStarted += AddModel;
            ToolBox.WorkAreaItems.Add(endWF);

            BaseWorkFlow lineWF = WorkFlowFactory.GetWorkFlow(WorkFlowEnum.Line);

            lineWF.DragStarted += AddModel;
            ToolBox.WorkAreaItems.Add(lineWF);

            BaseWorkFlow polyLineWF = WorkFlowFactory.GetWorkFlow(WorkFlowEnum.PolyLine);

            polyLineWF.DragStarted += AddModel;
            ToolBox.WorkAreaItems.Add(polyLineWF);
        }
Esempio n. 2
0
        /// <summary>
        /// 工作区添加流程
        /// </summary>
        /// <param name="workFlowEnum">流程类型</param>
        public void AddModelToWorkArea(WorkFlowEnum workFlowEnum)
        {
            BaseWorkFlow addWf = WorkFlowFactory.GetWorkFlow(workFlowEnum);

            WorkAreaItems.Add(addWf);
            SelectItem = addWf;
            RegistModelEvent(addWf);
        }