private bool TryGetPreviousBatchNotEmpty(bool isEnd = false) { RefreshBatchNameList(); int index = BatchNameList.Count; do { if (!isEnd) { if (BatchNameList.Contains(BatchName)) { index = BatchNameList.IndexOf(BatchName); } else { return(false); } } if (index <= 0) { return(false); } isEnd = false; } while ((!TrySelectBatch(--index)) || (!TryGetPreviousBoardNotEmpty(true))); return(true); }
private bool TryGetNextBatchNotEmpty(bool isHead = false) { int index = -1; RefreshBatchNameList(); do { if (!isHead) { if (BatchNameList.Contains(BatchName)) { index = BatchNameList.IndexOf(BatchName); } else { return(false); } } if (index >= BatchNameList.Count - 1) { return(false); } isHead = false; } while ((!TrySelectBatch(++index)) || (!TryGetNextBoardNotEmpty(true))); return(true); }
public void SwitchBatch(string batchName) { var index = BatchNameList.IndexOf(batchName); if (TrySelectBatch(index) && TrySelectBoard(0) && TrySelectSide(0) && TrySelectShot(0) && TrySelectDefect(0)) { } return; }