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) { } }
private void Button_Click_4(object sender, RoutedEventArgs e) { if (DGCmdlist.SelectedIndex > -1) { if (DGCmdlist.SelectedIndex == this.CurrCmdIdx) { next(); } else { CmdQueue.RemoveAt(DGCmdlist.SelectedIndex); } } }