Exemplo n.º 1
0
        /// <summary>
        /// 编辑数据
        /// </summary>
        /// <param name="o">数据元的数据</param>
        /// <return>是否编辑成功</return>
        public override bool EditData(Hashtable table)
        {
            bool editSuccess = false;

            Hashtable infoTable = new Hashtable();

            InterfaceNodeForm interfaceNodeForm = new InterfaceNodeForm(interfaceName, isInput);

            if (interfaceNodeForm.ShowDialog() == DialogResult.OK)
            {
                interfaceName = interfaceNodeForm.InterfaceName;
                isInput       = interfaceNodeForm.IsInput;

                infoTable["interfaceName"] = interfaceName;
                infoTable["isInput"]       = isInput;

                // 初始化表现信息
                InitDisplayInfo();

                this.data = infoTable;

                DocumentManager       documentManager       = DocumentManager.GetDocumentManager();
                InterfaceGraphElement interfaceGraphElement = documentManager.CurrentFlowChartManager.CurrentDataManager.FindGraphElementByID(id) as InterfaceGraphElement;

                if (isInput)
                {
                    interfaceGraphElement.InSlotCount  = 0;
                    interfaceGraphElement.OutSlotCount = 1;
                }
                else
                {
                    interfaceGraphElement.InSlotCount  = 1;
                    interfaceGraphElement.OutSlotCount = 0;
                }

                // 锁定出口插槽
                interfaceGraphElement.LockOutSlot();

                editSuccess = true;
            }

            return(editSuccess);
        }
Exemplo n.º 2
0
        /// <summary>
        /// 编辑数据
        /// </summary>
        /// <param name="o">数据元的数据</param>
        /// <return>是否编辑成功</return>
        public override bool EditData(Hashtable table)
        {
            bool editSuccess = false;

            Hashtable infoTable = new Hashtable();        

            InterfaceNodeForm interfaceNodeForm = new InterfaceNodeForm(interfaceName, isInput);

            if (interfaceNodeForm.ShowDialog() == DialogResult.OK)
            {
                interfaceName = interfaceNodeForm.InterfaceName;
                isInput = interfaceNodeForm.IsInput;

                infoTable["interfaceName"] = interfaceName;
                infoTable["isInput"] = isInput;

                // 初始化表现信息
                InitDisplayInfo();

                this.data = infoTable;
                
                DocumentManager documentManager = DocumentManager.GetDocumentManager();
                InterfaceGraphElement interfaceGraphElement = documentManager.CurrentFlowChartManager.CurrentDataManager.FindGraphElementByID(id) as InterfaceGraphElement; 
                
                if (isInput)
                {
                    interfaceGraphElement.InSlotCount = 0;
                    interfaceGraphElement.OutSlotCount = 1;
                }
                else
                {
                    interfaceGraphElement.InSlotCount = 1;
                    interfaceGraphElement.OutSlotCount = 0;
                }

                // 锁定出口插槽
                interfaceGraphElement.LockOutSlot();

                editSuccess = true;
            }

            return editSuccess;
        }