public CategoryForm(ListBox list, TextBox nameField, TextBox descriptionField) { this.list = list; this.nameField = nameField; this.descriptionField = descriptionField; Checker = new CategoryChecker(); }
private CheckResult CheckAnswer(Configuration configuration) { var checker = new Checker.Checker(); string answerFileName = configuration.InputFile + ".a"; return(checker.Check(_workingDirectory, configuration.InputFile, configuration.OutputFile, answerFileName)); }
private void Check_Click(object sender, EventArgs e) { if (lines[currentLine].CheckForColor()) { IChecker iChecker = new Checker.Checker(results[this.currentLine]); Checker.Checker.GeneratedValues = generatedValues; LineOfPegs currentLine = lines[this.currentLine]; bool result = iChecker.Check(currentLine); lines[this.currentLine].IsActive = false; lines[this.currentLine].Notify(); if (result) { MessageBox.Show("You won"); IScore iScore = new score.Score(); int score = iScore.CalculateScore(this.currentLine); this.Close(); SaveScreen saveScreen = new SaveScreen(true, score); saveScreen.Show(); } else if (!result && this.currentLine == 9) { MessageBox.Show("You lose!"); int score = 0; this.Close(); SaveScreen saveScreen = new SaveScreen(false, score); saveScreen.Show(); } this.currentLine++; lines[this.currentLine].IsActive = true; lines[this.currentLine].Notify(); } }
public WorkTypeForm(ListBox list, TextBox nameField, TextBox priceField) { this.list = list; this.nameField = nameField; this.priceField = priceField; Checker = new WorkTypeChecker(); }
public ComponentOnFirmForm(ListBox list, ComboBox componentField, ComboBox firmField, TextBox countField) { this.list = list; this.componentField = componentField; this.firmField = firmField; this.countField = countField; Checker = new ComponentOnFirmChecker(); }
public FirmForm(ListBox list, ComboBox cityField, TextBox addressField, TextBox phoneField) { this.list = list; this.cityField = cityField; this.addressField = addressField; this.phoneField = phoneField; Checker = new FirmChecker(); }
public PCForm(ListBox list, TextBox nameField, TextBox descriptionField, ComboBox pcTypeField, ComboBox producerField) { this.list = list; this.nameField = nameField; this.descriptionField = descriptionField; this.pcTypeField = pcTypeField; this.producerField = producerField; Checker = new PCChecker(); }
public ClientForm(ListBox list, TextBox firstNameField, TextBox lastNameField, TextBox phoneField, TextBox addressField, TextBox registrationDateField) { this.list = list; this.firstNameField = firstNameField; this.lastNameField = lastNameField; this.phoneField = phoneField; this.addressField = addressField; this.registrationDateField = registrationDateField; Checker = new ClientChecker(); }
public ComponentForm(ListBox list, TextBox nameField, TextBox descriptionField, ComboBox categoryField, ComboBox producerField, TextBox priceField) { this.list = list; this.nameField = nameField; this.descriptionField = descriptionField; this.categoryField = categoryField; this.producerField = producerField; this.priceField = priceField; Checker = new ComponentChecker(); }
public OrderForm(ListBox list, ComboBox clientField, ComboBox employeeField, ComboBox pcField, TextBox creationDateField, CheckBox isCompleteField) { this.list = list; this.clientField = clientField; this.employeeField = employeeField; this.pcField = pcField; this.creationDateField = creationDateField; this.isCompleteField = isCompleteField; Checker = new OrderChecker(); }
private void managementTabControl_SelectedIndexChanged(object sender, EventArgs e) { if (managementTabControl.SelectedTab == categoryTabPage) { currentForm = categoryForm; } else if (managementTabControl.SelectedTab == firmTabPage) { currentForm = firmForm; } else if (managementTabControl.SelectedTab == workTypeTabPage) { currentForm = workTypeForm; } else if (managementTabControl.SelectedTab == employeeTabPage) { currentForm = employeeForm; } else if (managementTabControl.SelectedTab == clientTabPage) { currentForm = clientForm; } else if (managementTabControl.SelectedTab == componentTabPage) { currentForm = componentForm; } else if (managementTabControl.SelectedTab == pcTabPage) { currentForm = pcForm; } else if (managementTabControl.SelectedTab == orderTabPage) { currentForm = orderForm; } else if (managementTabControl.SelectedTab == orderComponentTabPage) { currentForm = orderComponentForm; } else if (managementTabControl.SelectedTab == componentOnFirmTabPage) { currentForm = componentOnFirmForm; } else if (managementTabControl.SelectedTab == componentInstallTabPage) { currentForm = componentInstallForm; } else if (managementTabControl.SelectedTab == statisticTabPage) { currentForm = statisticForm; } currentChecker = currentForm.Checker; EnableButton(true, true, true, false, false); ReadOnlyControls(true); currentForm.Init(); }
private CheckResult CheckAnswer(Configuration configuration) { var checker = new Checker.Checker(); var answerFileName = configuration.InputFile + ".a"; var checkResult = checker.Check(_workingDirectory, configuration.InputFile, configuration.OutputFile, answerFileName); this.logger.Info( $"Check result: {configuration.InputFile}, {checkResult.CheckStatus}, {checkResult.Message}"); return(checkResult); }
public EmployeeForm(ListBox list, TextBox firstNameField, TextBox secondNameField, TextBox phoneField, TextBox addressField, ComboBox positionField, ComboBox firmField, TextBox experienceField) { this.list = list; this.firstNameField = firstNameField; this.secondNameField = secondNameField; this.phoneField = phoneField; this.addressField = addressField; this.positionField = positionField; this.firmField = firmField; this.experienceField = experienceField; Checker = new EmployeeChecker(); }
public StatisticForm(ListBox list, TextBox firmCountField, TextBox workTypeCountField, TextBox employeeCountField, TextBox clientCountField, TextBox componentCountField, TextBox componentPriceField, TextBox orderCountField, TextBox orderPriceField) { this.list = list; this.firmCountField = firmCountField; this.workTypeCountField = workTypeCountField; this.employeeCountField = employeeCountField; this.clientCountField = clientCountField; this.componentCountField = componentCountField; this.componentPriceField = componentPriceField; this.orderCountField = orderCountField; this.orderPriceField = orderPriceField; Checker = new StatisticChecker(); }
public ComponentInstallForm(ListBox list, ComboBox orderComponentField, ComboBox componentOnFirmField, ComboBox employeeField, ComboBox workTypeField, ComboBox statusField, DateTimePicker endWorkDateField, TextBox transmissionDateField, TextBox beginDateWarrantyField, TextBox durationWarrantyField) { this.list = list; this.orderComponentField = orderComponentField; this.componentOnFirmField = componentOnFirmField; this.employeeField = employeeField; this.workTypeField = workTypeField; this.statusField = statusField; this.endWorkDateField = endWorkDateField; this.transmissionDateField = transmissionDateField; this.beginDateWarrantyField = beginDateWarrantyField; this.durationWarrantyField = durationWarrantyField; Checker = new ComponentInstallChecker(); }
public MoveUpLeftCommand(Checker.Checker state) { this.state = state; }
public MoveDownRightCommand(Checker.Checker state) { this.state = state; }