Exemplo n.º 1
0
        private void btOK_Click(object sender, EventArgs e)
        {
            SaveView2CurrIOChannel();

            if (_FormType == FormType.ftAdd)
            {
                IOChannelVeiwMgt.AddChannel(_CurrIOChannel);
            }
            else
            {
                IOChannelVeiwMgt.EditChannel(_CurrIOChannel);
            }
            DialogResult = DialogResult.OK;
        }
Exemplo n.º 2
0
        //private string GetCurrInboundInterfaceName()
        //{
        //    string sResult = "";
        //    if (dataGridView1.Rows.Count < 1)
        //        MessageBox.Show("There is no valid inbound interface");
        //    else if (dataGridView1.SelectedRows.Count > 0)
        //        sResult = dataGridView1.SelectedRows[0].Cells[0].ToString();
        //    else if (dataGridView1.CurrentCell != null)
        //        sResult = dataGridView1.Rows[dataGridView1.CurrentCell.RowIndex].Cells[0].ToString();

        //    return sResult;
        //}

        private void btRemove_Click(object sender, EventArgs e)
        {
            DataGridViewRow row = this.dataGridView1.CurrentRow;

            if (row == null)
            {
                return;
            }
            if (MessageBox.Show(pMain, "Are you sure to remove the selected interface?",
                                "Waring", MessageBoxButtons.YesNo, MessageBoxIcon.Warning) == DialogResult.Yes)
            {
                IOChannelVeiwMgt.DeleteChannel(row.Cells[0].Value.ToString());
            }
            this.RefreshForm();
        }
Exemplo n.º 3
0
        public FOutboundTriggerConfig()
        {
            InitializeComponent();

            Program.PreLoad();

            this.dataGridView1.Parent = pSetting;
            this.tcScript.Parent      = pSetting;
            //this.pConfigurationButtons.Parent = pSetting;
            //this.pSQLButtons.Parent = pSetting;

            this.tbOutboundName.Text = OutboundDBConfigMgt.DeviceDir.DeviceDirInfor.Header.Name;
            this.tbOutboundDesc.Text = OutboundDBConfigMgt.DeviceDir.DeviceDirInfor.Header.Description;

            IOChannelVeiwMgt.Init(this.dataGridView1, OutboundDBConfigMgt.Config);
            IOChannelVeiwMgt.UpdateAllView();
            this.HajickTreat();

            if (this.dataGridView1.RowCount > 0)
            {
                this.dataGridView1.Rows[0].Selected = true;
            }
            this.RefreshForm();
        }