Пример #1
0
 private void MenuItem_Add_Click(object sender, EventArgs e)
 {
     tag_PointModule.tag_OutIo          = new OutIOParameterPoint();
     tag_PointModule.tag_OutIo.tag_name = "io输入输出控制" + tag_PointModule.tag_AxisSafeManage.tag_InIoList.Count;
     tag_PointModule.tag_AxisSafeManage.tag_InIoList.Add(tag_PointModule.tag_OutIo);
     tag_OutIo = tag_PointModule.tag_OutIo;
     Tree_Load(null, null);
 }
Пример #2
0
 /// <summary>
 ///
 /// </summary>
 /// <param name="_PoitModule"></param>
 public PointIODelaySetUI(PointAggregate _PoitModule)
 {
     tag_PointModule = _PoitModule;
     if (tag_PointModule.tag_AxisSafeManage == null)
     {
         tag_PointModule.tag_AxisSafeManage = new AxisSafeManage(_PoitModule);
     }
     if (tag_PointModule.tag_AxisSafeManage.tag_InIoList == null)
     {
         tag_PointModule.tag_AxisSafeManage.tag_InIoList = new List <OutIOParameterPoint>();
         tag_PointModule.tag_OutIo = new OutIOParameterPoint();
         tag_PointModule.tag_AxisSafeManage.tag_InIoList.Add(tag_PointModule.tag_OutIo);
     }
     if (tag_PointModule.tag_AxisSafeManage.tag_InIoList.Count == 0)
     {
         tag_PointModule.tag_OutIo = new OutIOParameterPoint();
         tag_PointModule.tag_AxisSafeManage.tag_InIoList.Add(tag_PointModule.tag_OutIo);
     }
     if (tag_PointModule.tag_AxisSafeManage.tag_InIoList.Count > 0)
     {
         tag_OutIo = tag_PointModule.tag_AxisSafeManage.tag_InIoList[0];
     }
     #region UI
     //
     // ucl_InIo2
     //
     this.ucl_InIo2.Location = new System.Drawing.Point(806, 59);
     this.ucl_InIo2.Margin   = new System.Windows.Forms.Padding(4);
     this.ucl_InIo2.Name     = "ucl_InIo2";
     this.ucl_InIo2.Size     = new System.Drawing.Size(366, 33);
     this.ucl_InIo2.TabIndex = 21;
     //
     // ucl_InIo1
     //
     this.ucl_InIo1.Location = new System.Drawing.Point(806, 24);
     this.ucl_InIo1.Margin   = new System.Windows.Forms.Padding(4);
     this.ucl_InIo1.Name     = "ucl_InIo1";
     this.ucl_InIo1.Size     = new System.Drawing.Size(366, 33);
     this.ucl_InIo1.TabIndex = 13;
     //
     // ucl_InIoName2
     //
     this.ucl_InIoName2.Location = new System.Drawing.Point(315, 60);
     this.ucl_InIoName2.Margin   = new System.Windows.Forms.Padding(4);
     this.ucl_InIoName2.Name     = "ucl_InIoName2";
     this.ucl_InIoName2.Size     = new System.Drawing.Size(322, 33);
     this.ucl_InIoName2.TabIndex = 10;
     //
     // ucl_InIoName1
     //
     this.ucl_InIoName1.Location = new System.Drawing.Point(313, 24);
     this.ucl_InIoName1.Margin   = new System.Windows.Forms.Padding(4);
     this.ucl_InIoName1.Name     = "ucl_InIoName1";
     this.ucl_InIoName1.Size     = new System.Drawing.Size(347, 33);
     this.ucl_InIoName1.TabIndex = 9;
     #endregion
     InitializeComponent();
 }
Пример #3
0
 /// <summary>
 /// 移除一个控制
 /// </summary>
 /// <param name="ac"></param>
 public void MoveIo(OutIOParameterPoint io)
 {
     foreach (OutIOParameterPoint _io in tag_InIoList)
     {
         if (_io.tag_IniO2.tag_IOName == io.tag_IniO2.tag_IOName)
         {
             tag_InIoList.Remove(_io);
             return;
         }
     }
 }
Пример #4
0
        /// <summary>
        /// 添加一个控制
        /// </summary>
        /// <param name="ac"></param>
        public void AddIo(OutIOParameterPoint io)
        {
            foreach (OutIOParameterPoint _io in tag_InIoList)
            {
                if (_io.tag_IniO2.tag_IOName == io.tag_IniO2.tag_IOName)
                {
                    return;
                }
            }

            tag_InIoList.Add(io);
        }
Пример #5
0
        private void treeView_IO_NodeMouseDoubleClick(object sender, TreeNodeMouseClickEventArgs e)
        {
            TreeView tv = (TreeView)sender;

            for (int i = 0; i < tag_PointModule.tag_AxisSafeManage.tag_InIoList.Count; i++)
            {
                if (treeView_IO.SelectedNode != null && tag_PointModule.tag_AxisSafeManage.tag_InIoList[i].tag_name == treeView_IO.SelectedNode.Text)
                {
                    // tag_PointModule.tag_AxisSafeManage.tag_InIoList.RemoveAt(i);
                    tag_OutIo = tag_PointModule.tag_AxisSafeManage.tag_InIoList[i];
                    break;
                }
            }
            FrmInIoList_Load(null, null);
        }