private void AddBtn_Click(object sender, EventArgs e) { int result = int.Parse(LayerCountTxt.Text); string type = null; if (LayerTypeCB.Text == "Fully Connected") { type = "f"; } if (LayerTypeCB.Text == "Convolution") { type = "c"; if (result > 10) { MessageBox.Show("Convolution's layer count is squared, must still be between 0 and 100"); return; } } if (LayerTypeCB.Text == "Pooling") { type = "p"; } LayerTypes.Add(type); LayerCounts.Add(result); LayerLB.Items.Add("[" + (LayerCounts.Count - 1).ToString() + "] " + LayerTypeCB.Text + ", " + result.ToString()); }
public AddLayerViewModel() { foreach (var layer in Enum.GetValues(typeof(Layer.LayerType)).Cast <Layer.LayerType>()) { LayerTypes.Add(layer); } Image = BitmapHelper.ConvertBitmapToImageSource(DataAccess.Properties.Resources.LayerPreviewImage); }