Exemple #1
0
        private void lvTagList_DoubleClick(object sender, EventArgs e)
        {
            string  strTagName;
            cls_Tag tag = new cls_Tag();

            if (lvTagList.SelectedItems.Count == 0)
            {
                MessageBox.Show("Please select the tag first!", "Error");
                return;
            }

            strTagName = lvTagList.SelectedItems[0].Text;
            int i = 0;

            foreach (cls_Tag t in tag_list)
            {
                if (t.TagName == strTagName)
                {
                    tag = t;
                    break;
                }
                i++;
            }
            this.tag_index = i;

            frmEditTag frm = new frmEditTag(SetTagInformation, tag);

            frm.Owner = this;
            frm.ShowDialog();
            DisplayTagList();
        }
Exemple #2
0
        private void btnTemplateAddTag_Click(object sender, EventArgs e)
        {
            frmEditTag frm = new frmEditTag(SetTagInformation, CheckDuplicateTag, false);

            frm.Owner = this;
            frm.ShowDialog();
            DisplayTagList();
        }
Exemple #3
0
        private void btnTagAdd_Click(object sender, EventArgs e)
        {
            frmEditTag frm = new frmEditTag(SetTagInformation, CheckDuplicateTag, false);

            frm.Owner = this;
            frm.ShowDialog();
            RefreshDeviceTagList();
        }
Exemple #4
0
        private void lvTagList_DoubleClick(object sender, EventArgs e)
        {
            string  strTagName;
            cls_Tag tag = new cls_Tag();

            if (lvTagList.SelectedItems.Count == 0)
            {
                MessageBox.Show("Please select the tag first!", "Error");
                return;
            }

            strTagName = lvTagList.SelectedItems[0].Text;
            if (!taglist_data.TryGetValue(strTagName, out tag))
            {
                MessageBox.Show("Get tag[" + strTagName + "] information error", "Error");
                return;
            }

            frmEditTag frm = new frmEditTag(SetTagInformation, tag);

            frm.Owner = this;
            frm.ShowDialog();
            RefreshDeviceTagList();
        }