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

            InnerChartForm innerChartForm = new InnerChartForm(innerChartPath);
            
            if (innerChartForm.ShowDialog() == DialogResult.OK)
            {                
                innerChartPath = innerChartForm.InnerChartPath;
                graphElementList = innerChartForm.GraphElementList;
                graphTable = innerChartForm.GraphTable;
                interfaceNodeTable = innerChartForm.InterfaceNodeTable;
                this.text = innerChartPath;      
          
                // 更新数据
                UpdateData(innerChartForm.InSlotInfo, innerChartForm.OutSlotInfo);
                
                InnerChart innerChart = DocumentManager.GetDocumentManager().CurrentFlowChartManager.CurrentDataManager.FindGraphElementByID(id) as InnerChart;

                // 更新插槽数量
                UpdateSlotCount(innerChart, innerChartForm.InSlotCount, innerChartForm.OutSlotCount, false);

                List<int> inIDList = new List<int>();
                List<int> outIDList = new List<int>();

                foreach (string nodeID in innerChartForm.InSlotInfo.Keys)
                {                  
                    inIDList.Add(int.Parse(nodeID));
                }            

                foreach (string nodeID in innerChartForm.OutSlotInfo.Keys)
                {                    
                    outIDList.Add(int.Parse(nodeID));                    
                }            
    
                foreach (InterfaceGraphElement interfaceNode in interfaceNodeTable.Values)
                {
                    interfaceNode.Tag = id.ToString();
                }

                // 刷新插槽信息
                RefreshSlotInfo(innerChart, inIDList, outIDList, innerChartForm.InSlotInfo, innerChartForm.OutSlotInfo);                

                editSuccess = true;
            }

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

            InnerChartForm innerChartForm = new InnerChartForm(innerChartPath);

            if (innerChartForm.ShowDialog() == DialogResult.OK)
            {
                innerChartPath     = innerChartForm.InnerChartPath;
                graphElementList   = innerChartForm.GraphElementList;
                graphTable         = innerChartForm.GraphTable;
                interfaceNodeTable = innerChartForm.InterfaceNodeTable;
                this.text          = innerChartPath;

                // 更新数据
                UpdateData(innerChartForm.InSlotInfo, innerChartForm.OutSlotInfo);

                InnerChart innerChart = DocumentManager.GetDocumentManager().CurrentFlowChartManager.CurrentDataManager.FindGraphElementByID(id) as InnerChart;

                // 更新插槽数量
                UpdateSlotCount(innerChart, innerChartForm.InSlotCount, innerChartForm.OutSlotCount, false);

                List <int> inIDList  = new List <int>();
                List <int> outIDList = new List <int>();

                foreach (string nodeID in innerChartForm.InSlotInfo.Keys)
                {
                    inIDList.Add(int.Parse(nodeID));
                }

                foreach (string nodeID in innerChartForm.OutSlotInfo.Keys)
                {
                    outIDList.Add(int.Parse(nodeID));
                }

                foreach (InterfaceGraphElement interfaceNode in interfaceNodeTable.Values)
                {
                    interfaceNode.Tag = id.ToString();
                }

                // 刷新插槽信息
                RefreshSlotInfo(innerChart, inIDList, outIDList, innerChartForm.InSlotInfo, innerChartForm.OutSlotInfo);

                editSuccess = true;
            }

            return(editSuccess);
        }