/// <summary> /// Initializes a new instance of the <see cref="MainForm" /> class. /// </summary> /// <param name="foodProcessor">The food processor.</param> /// <param name="boardProcessor">The board processor.</param> public MainForm(IFoodProcessor foodProcessor, IBoardProcessor boardProcessor) { Contract.Requires(foodProcessor != null); Contract.Requires(boardProcessor != null); InitializeComponent(); _foodProcessor = foodProcessor; _boardProcessor = boardProcessor; _foodPanel = new FoodPanel(this, amountUnitComboBox, allergensListBox, titleTextBox, boardGroupComboBox, amountTextBox, priceTextBox, showHideButton, boardGroupColorButton, foodProcessor, boardProcessor); }
/// <summary> /// Initializes a new instance of the <see cref="FoodPanel" /> class. /// </summary> /// <param name="mainForm">The main form.</param> /// <param name="amountUnitComboBox">The amount unit combo box.</param> /// <param name="allergensListBox">The allergens list box.</param> /// <param name="titleTextBox">The title text box.</param> /// <param name="boardGroupComboBox">The board group combo box.</param> /// <param name="amountTextBox">The amount text box.</param> /// <param name="priceTextBox">The price text box.</param> /// <param name="showHideButton">The show hide button.</param> /// <param name="boardGroupColorButton">The board group color button.</param> /// <param name="foodProcessor">The food processor.</param> /// <param name="boardProcessor">The board processor.</param> public FoodPanel(MainForm mainForm, ComboBox amountUnitComboBox, ListBox allergensListBox, TextBox titleTextBox, ComboBox boardGroupComboBox, TextBox amountTextBox, TextBox priceTextBox, Button showHideButton, ColorButton boardGroupColorButton, IFoodProcessor foodProcessor, IBoardProcessor boardProcessor) { _mainForm = mainForm; _amountUnitComboBox = amountUnitComboBox; _allergensListBox = allergensListBox; _titleTextBox = titleTextBox; _boardGroupComboBox = boardGroupComboBox; _amountTextBox = amountTextBox; _priceTextBox = priceTextBox; _showHideButton = showHideButton; _boardGroupColorButton = boardGroupColorButton; _foodProcessor = foodProcessor; _boardProcessor = boardProcessor; }
public GameState(IBoard board, IBoardProcessor boardProcessor) { BoardProcessor = boardProcessor; Board = board; TickNumber = 0; }