コード例 #1
0
        private void DeleteBatch(BatchDataModel batch)
        {
            BatchUtility.DeleteBatch(batch);

            if (CurrentBatch == batch)
            {
                int previousBatchIndex = SavedBatches.IndexOf(batch) - 1;
                CurrentBatch = previousBatchIndex >= 0 ? SavedBatches[previousBatchIndex] : SavedBatches.FirstOrDefault();
            }

            SavedBatches.Remove(batch);
        }
コード例 #2
0
 private void AddNewBatch(RecipeDataModel recipe)
 {
     SaveCurrentBatch();
     CurrentBatch = BatchUtility.CreateBatch(recipe);
     SavedBatches.Add(CurrentBatch);
 }