Exemple #1
0
 private void FunctionBox_MouseDoubleClick(object sender, MouseEventArgs e)
 {
     if (FunctionBox.SelectedIndex != -1)
     {
         StatelFunction oldfunc = functions.ElementAt(FunctionBox.SelectedIndex);
         SelectFunction sf      = new SelectFunction();
         sf.getdata(oldfunc);
         sf.ShowDialog();
         if (sf.DialogResult == DialogResult.OK)
         {
             common.execSQL("REPLACE INTO statel_functions VALUES (" + oldfunc.functionid + "," + selectedevent + "," + selectedstatel + "," + sf.functionnum + "," + sf.target + "," + sf.tickcount + "," + sf.tickinterval + ")");
             int oldindex = FunctionBox.SelectedIndex;
             StatelBox_SelectedIndexChanged(null, null);
             FunctionBox.SelectedIndex = oldindex;
             if (sf.functionnum != oldfunc.functionnum)
             {
                 common.execSQL("DELETE FROM statel_function_arguments WHERE function_id=" + oldfunc.functionid + " AND event_id=" + selectedevent + " AND statel_id=" + selectedstatel);
                 ArgumentBox_MouseDoubleClick(null, null);
             }
         }
     }
 }
Exemple #2
0
 private void FunctionBox_MouseDoubleClick(object sender, MouseEventArgs e)
 {
     if (FunctionBox.SelectedIndex != -1)
     {
         StatelFunction oldfunc = functions.ElementAt(FunctionBox.SelectedIndex);
         SelectFunction sf = new SelectFunction();
         sf.getdata(oldfunc);
         sf.ShowDialog();
         if (sf.DialogResult == DialogResult.OK)
         {
             common.execSQL("REPLACE INTO statel_functions VALUES (" + oldfunc.functionid + "," + selectedevent + "," + selectedstatel + "," + sf.functionnum + "," + sf.target + "," + sf.tickcount + "," + sf.tickinterval + ")");
             int oldindex = FunctionBox.SelectedIndex;
             StatelBox_SelectedIndexChanged(null, null);
             FunctionBox.SelectedIndex = oldindex;
             if (sf.functionnum != oldfunc.functionnum)
             {
                 common.execSQL("DELETE FROM statel_function_arguments WHERE function_id=" + oldfunc.functionid + " AND event_id=" + selectedevent + " AND statel_id=" + selectedstatel);
                 ArgumentBox_MouseDoubleClick(null, null);
             }
         }
     }
 }
Exemple #3
0
 private void but_AddFunction_Click(object sender, EventArgs e)
 {
     SelectFunction sf = new SelectFunction();
     sf.set();
 }
Exemple #4
0
        private void but_AddFunction_Click(object sender, EventArgs e)
        {
            SelectFunction sf = new SelectFunction();

            sf.set();
        }