Example #1
0
        //增加采集规则
        private void btnAddCoconfig_Click(object sender, EventArgs e)
        {
            CoConfigForm coFormAdd = new CoConfigForm(_coConnString, -1, this);

            coFormAdd.Text = "添加新采集规则";
            coFormAdd.Show();
            this.Enabled          = false;
            coFormAdd.FormClosed += CoFormModify_FormClosed;
        }
Example #2
0
        } //end of btnLoadCoconfig_Click

        //修改采集规则
        private void btnModifyCoconfig_Click(object sender, EventArgs e)
        {
            try
            {
                ListViewItem checkedItem  = listViewCollect.CheckedItems[0];
                long         cid          = long.Parse(checkedItem.SubItems[0].Text);
                CoConfigForm coFormModify = new CoConfigForm(_coConnString, cid, this);
                coFormModify.Text = "修改采集规则";
                coFormModify.Show();
                this.Enabled             = false;
                coFormModify.FormClosed += CoFormModify_FormClosed;
            }
            catch (Exception ex)
            {
                MessageBox.Show("未选中任何采集规则,请选择需要修改的采集规则!");
            }
        }