public Vehicle() { InitializeComponent(); typeComboBox.Items.Add("Car"); typeComboBox.Items.Add("Truck"); typeComboBox.Items.Add("Plane"); typeComboBox.Items.Add("Helicopter"); ModelLabel.Hide(); //Hides the labels and text boxes for each label until a vehicle type is selected. modelTextBox.Hide(); MakeLabel.Hide(); makeTextBox.Hide(); yearLabel.Hide(); yearTextBox.Hide(); priceLabel.Hide(); priceTextBox.Hide(); colourLabel.Hide(); colourTextBox.Hide(); registrationLabel.Hide(); registrationLabel.Hide(); weightLabel.Hide(); weightTextBox.Hide(); if ((string)typeComboBox.SelectedItem == "Car") { } }
public DetailResponse <ModelLabel> CreateLabel() { var lbl = new ModelLabel(); lbl.Id = Guid.NewGuid().ToId(); return(DetailResponse <ModelLabel> .Create(lbl)); }
public void Train(ILabeledExampleCollection <LblT, ExT> dataset) { foreach (ModelLabel modelLabel in ModelLabels.Take(ModelLabels.Count() - 1)) { modelLabel.Model.Train(dataset); ModelLabel modelLabel_ = modelLabel; dataset = new LabeledDataset <LblT, ExT>(dataset.Where(le => !le.Label.Equals(modelLabel_.Label))); } ModelLabels.Last().Model.Train(dataset); IsTrained = true; }
void ReleaseDesignerOutlets() { if (CommentsView != null) { CommentsView.Dispose(); CommentsView = null; } if (CommentTextBox != null) { CommentTextBox.Dispose(); CommentTextBox = null; } if (CostLabel != null) { CostLabel.Dispose(); CostLabel = null; } if (DateLabel != null) { DateLabel.Dispose(); DateLabel = null; } if (DistanceLabel != null) { DistanceLabel.Dispose(); DistanceLabel = null; } if (DriverLabel != null) { DriverLabel.Dispose(); DriverLabel = null; } if (EndLabel != null) { EndLabel.Dispose(); EndLabel = null; } if (FromLabel != null) { FromLabel.Dispose(); FromLabel = null; } if (MakerLabel != null) { MakerLabel.Dispose(); MakerLabel = null; } if (ModelLabel != null) { ModelLabel.Dispose(); ModelLabel = null; } if (RateLabel != null) { RateLabel.Dispose(); RateLabel = null; } if (ResumeView != null) { ResumeView.Dispose(); ResumeView = null; } if (SegmentedControl != null) { SegmentedControl.Dispose(); SegmentedControl = null; } if (StartLabel != null) { StartLabel.Dispose(); StartLabel = null; } if (ToLabel != null) { ToLabel.Dispose(); ToLabel = null; } if (VehicleImage != null) { VehicleImage.Dispose(); VehicleImage = null; } }