Example #1
0
 private void gridViewLibraryCons_RowCellClick(object sender, DevExpress.XtraGrid.Views.Grid.RowCellClickEventArgs e)
 {
     if (e.Column.FieldName != "gridColCheck" && e.Button == MouseButtons.Right)
     {
         ContinuousFuzzySetBLL    cons = new ContinuousFuzzySetBLL(gridViewLibraryCons.GetRowCellValue(e.RowHandle, "gridColName").ToString(), Convert.ToDouble(gridViewLibraryCons.GetRowCellValue(e.RowHandle, "gridColBtLeft")), Convert.ToDouble(gridViewLibraryCons.GetRowCellValue(e.RowHandle, "gridColTopLeft")), Convert.ToDouble(gridViewLibraryCons.GetRowCellValue(e.RowHandle, "gridColTopRight")), Convert.ToDouble(gridViewLibraryCons.GetRowCellValue(e.RowHandle, "gridColBtRight")));
         FrmAddContinuousFuzzySet frm  = new FrmAddContinuousFuzzySet(cons);
         frm.ShowDialog();
         RefreshData();
     }
 }
 private void gridCtlFuzzyValue_EmbeddedNavigator_ButtonClick(object sender, NavigatorButtonClickEventArgs e)
 {
     if (e.Button.ButtonType == NavigatorButtonType.Append)
     {
         if (datatypename == "DiscreteFuzzySet")
         {
             FrmAddDiscreteFuzzySet frm = new FrmAddDiscreteFuzzySet();
             frm.ShowDialog();
             ResetGridView(datatypename);
         }
         else
         {
             FrmAddContinuousFuzzySet frm = new FrmAddContinuousFuzzySet();
             frm.ShowDialog();
             ResetGridView(datatypename);
         }
         e.Handled = true;
     }
 }
Example #3
0
 private void gridCtrLibraryCons_EmbeddedNavigator_ButtonClick(object sender, NavigatorButtonClickEventArgs e)
 {
     if (e.Button.ButtonType == NavigatorButtonType.Append)
     {
         FrmAddContinuousFuzzySet frm = new FrmAddContinuousFuzzySet();
         frm.ShowDialog();
         RefreshData();
         e.Handled = true;
     }
     if (e.Button.ButtonType == NavigatorButtonType.Remove)
     {
         if (XtraMessageBox.Show("Are you sure delete this row?", "Confirm", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == System.Windows.Forms.DialogResult.Yes)
         {
             string path = Directory.GetCurrentDirectory() + @"\lib\";
             if (gridViewLibraryCons.GetSelectedRows()[0] >= 0)
             {
                 var datarow = gridViewLibraryCons.GetDataRow(gridViewLibraryCons.GetSelectedRows()[0]);
                 var name    = datarow["gridColName"];
                 path = path + name + ".conFS";
                 ContinuousFuzzySetBLL.DeleteFS(path);
             }
         }
     }
 }