/*-------------------------------------------------------------*/ private void cbxStackType_SelectedIndexChanged(object sender, EventArgs e) { if (cbxStackType.SelectedItem.ToString() == PNPconverterTools.stackTypeToString(StackType.Tray18mm)) { nudwuFeedRate.Value = 18; nudwuFeedRate.Enabled = false; } else { nudwuFeedRate.Enabled = true; } }
/// <summary> /// Sets the footprint to be eddited /// </summary> /// <param name="footprint">Footprint to be eddited</param> public void setFootprint(Footprint footprint) { tbxMPN.Text = footprint.manufacturerPartNumber; nudwuHeight.Value = (decimal)footprint.Height; nudwuLength.Value = (decimal)footprint.Length; nudwuWidth.Value = (decimal)footprint.width; nudwuRotation.Value = footprint.rotation; bscOffset.valueX = (decimal)footprint.offsetStackX; bscOffset.valueY = (decimal)footprint.offsetStackY; cbxNozzle.SelectedItem = footprint.nozzle; cbxStackType.SelectedItem = PNPconverterTools.stackTypeToString(footprint.stacktype); nudwuFeedRate.Value = (decimal)footprint.feedRate; }
public FootprintForm() { InitializeComponent(); cbxNozzle.DataSource = Enum.GetValues(typeof(Nozzle)); foreach (StackType stackType_ in Enum.GetValues(typeof(StackType))) { cbxStackType.Items.Add(PNPconverterTools.stackTypeToString(stackType_)); } #if (DEBUG) tbxMPN.Text = "TEST"; #endif //TO DO: fill cbxKnown with predefined exampels and give the combobox a better name }