Example #1
0
 void ctr_KeyUp(object sender, KeyEventArgs e)
 {
     if (e.KeyCode == Keys.F4)
     {
         SystemInformationHelp helper = new SystemInformationHelp(sender);
         helper.Show();
         return;
     }
 }
Example #2
0
 void ug_list_KeyUp(object sender, KeyEventArgs e)
 {
     UltraGrid ug_list = sender as UltraGrid;
     if (e.KeyCode == Keys.F4)
     {
         SystemInformationHelp helper = new SystemInformationHelp(ug_list);
         helper.Show();
         return;
     }
     UltraGridRow aRow = ug_list.ActiveRow;
     UltraGridCell aCell = ug_list.ActiveCell;
     if (aCell != null)
     {
         Sys_PD_Filed field = aCell.Column.Tag as Sys_PD_Filed;
         if (field != null && field.DCP_ControlType == "ref")
         {
             return;
         }
     }
     int i = 0;
     int cIndex = 0;
     if (e.KeyCode == Keys.Enter)
     {
         if (aRow == null)
             i = 0;
         else
         {
             i = aRow.Index + 1;
         }
         if (aCell == null)
         {
             cIndex = 0;
         }
         else
         {
             cIndex = aCell.Column.Index;
         }
         if (i > ug_list.Rows.Count - 1)
         {
             i = 0;
         }
         if (i > -1 && i < ug_list.Rows.Count)
         {
             ug_list.ActiveRow = ug_list.Rows[i];
             ug_list.ActiveCell = ug_list.Rows[i].Cells[cIndex];
             ug_list.PerformAction(UltraGridAction.EnterEditMode);
         }
     }
     else if (e.KeyCode == Keys.Up)
     {
         if (aRow == null)
             i = 0;
         else
         {
             i = aRow.Index - 1;
         }
         if (aCell == null)
         {
             cIndex = 0;
         }
         else
         {
             cIndex = aCell.Column.Index;
         }
         if (i < 0)
         {
             i = ug_list.Rows.Count - 1;
         }
         ug_list.ActiveRow = ug_list.Rows[i];
         ug_list.ActiveCell = ug_list.Rows[i].Cells[cIndex];
         ug_list.PerformAction(UltraGridAction.EnterEditMode);
     }
     else if (e.KeyCode == Keys.Down)
     {
         if (aRow == null)
             i = 0;
         else
         {
             i = aRow.Index + 1;
         }
         if (aCell == null)
         {
             cIndex = 0;
         }
         else
         {
             cIndex = aCell.Column.Index;
         }
         if (i > ug_list.Rows.Count - 1)
         {
             i = 0;
         }
         ug_list.ActiveRow = ug_list.Rows[i];
         ug_list.ActiveCell = ug_list.Rows[i].Cells[cIndex];
         ug_list.PerformAction(UltraGridAction.EnterEditMode);
     }
 }
Example #3
0
 void ctr_DoubleClick(object sender, EventArgs e)
 {
     SystemInformationHelp helper = new SystemInformationHelp(sender);
     helper.Show();
 }