Exemple #1
0
 private void next()
 {
     //CurrCmd = null;
     try {
         if (Cycle)
         {
             if (CmdQueue.Count == 0)
             {
                 CurrCmd = null;
             }
             else
             {
                 CurrCmdIdx++;
                 if (CurrCmdIdx == CmdQueue.Count)
                 {
                     CurrCmdIdx = 0;
                 }
             }
         }
         else
         {
             CmdQueue.RemoveAt(CurrCmdIdx);
         }
         exe_command();
     }
     catch (System.Exception exc)
     { }
 }
Exemple #2
0
        private void Button_Click_4(object sender, RoutedEventArgs e)
        {
            if (DGCmdlist.SelectedIndex > -1)
            {
                if (DGCmdlist.SelectedIndex == this.CurrCmdIdx)
                {
                    next();
                }

                else
                {
                    CmdQueue.RemoveAt(DGCmdlist.SelectedIndex);
                }
            }
        }