Exemple #1
0
 private void dgvNetworkList_CellDoubleClick(object sender, DataGridViewCellEventArgs e)
 {
     try
     {
         NetworkSettingForm f = new NetworkSettingForm();
         if (null != dgvNetworkList.SelectedRows && dgvNetworkList.SelectedRows.Count > 0)
         {
             f.NetworkSettingObject = dgvNetworkList.SelectedRows[0].DataBoundItem as NetWorkSetting;
             //f.RefreshNetworlListDelegate += new DMClient.RefreshNetworlListDelegate(RefreshQueryDataMartCallbackFn);
             f.NetworkSettingChanged += NetworkSettingChanged_EventHandler;
             f.ShowDialog();
         }
     }
     catch (Exception ex)
     {
         log.Error(ex);
     }
 }
Exemple #2
0
 private void btnAdd_Click(object sender, EventArgs e)
 {
     try
     {
         this.Cursor = Cursors.WaitCursor;
         NetworkSettingForm f = new NetworkSettingForm();
         f.NetworkSettingObject   = null;
         f.NetworkSettingChanged += NetworkSettingChanged_EventHandler;
         f.ShowDialog();
     }
     catch (Exception ex)
     {
         log.Error(ex);
     }
     finally
     {
         this.Cursor = Cursors.Default;
     }
 }
Exemple #3
0
 private void btnEdit_Click(object sender, EventArgs e)
 {
     try
     {
         NetworkSettingForm f = new NetworkSettingForm();
         if (null != dgvNetworkList.SelectedRows && dgvNetworkList.SelectedRows.Count == 1)
         {
             f.NetworkSettingObject   = dgvNetworkList.SelectedRows[0].DataBoundItem as NetWorkSetting;
             f.NetworkSettingChanged += NetworkSettingChanged_EventHandler;
             f.ShowDialog();
         }
         else
         {
             MessageBox.Show("Please select one Network", Application.ProductName);
         }
     }
     catch (Exception ex)
     {
         log.Error(ex);
     }
 }