public void InitializeConfigSettings(ConfigurationValues configData) { textBoxHerness.Text = configData.BinHarnessCapacity.ToString(); textBoxReflector.Text = configData.BinReflectorCapacity.ToString(); textBoxHousing.Text = configData.BinHousingCapacity.ToString(); textBoxLenses.Text = configData.BinLensCapacity.ToString(); textBoxBulbs.Text = configData.BinBulbCapacity.ToString(); textBoxBuzels.Text = configData.BinBezelCapacity.ToString(); textBoxTrayCap.Text = configData.TrayCapacity.ToString(); textBoxWorkS.Text = configData.NumOfWorkstations.ToString(); textBoxAssemblyTBeginner.Text = configData.AssemblyTimeBeginner.ToString(); textBoxassemblyTExperience.Text = configData.AssemblyTimeExperienced.ToString(); textBoxassemblyTExperience.Text = configData.AssemblyTimeSuper.ToString(); textBoxRunner.Text = configData.TrayRunTimeMinutes.ToString(); textBoxAssemblyDBeginner.Text = configData.AssemblyDefectBeginner.ToString(); textBoxAssemblyDExperience.Text = configData.AssemblyDefectExperienced.ToString(); textBoxAssemblyDSuper.Text = configData.AssemblyDefectSuper.ToString(); textBoxTime.Text = configData.MinuteSeconds.ToString(); ConfigData = configData; }
private ConfigurationValues BuildConfigurationData() { ConfigurationValues newData = new ConfigurationValues(); newData.BinHarnessCapacity = int.Parse(textBoxHerness.Text); newData.BinReflectorCapacity = int.Parse(textBoxReflector.Text); newData.BinHousingCapacity = int.Parse(textBoxHousing.Text); newData.BinLensCapacity = int.Parse(textBoxLenses.Text); newData.BinBulbCapacity = int.Parse(textBoxBulbs.Text); newData.BinBezelCapacity = int.Parse(textBoxBuzels.Text); newData.TrayCapacity = int.Parse(textBoxTrayCap.Text); newData.NumOfWorkstations = int.Parse(textBoxWorkS.Text); newData.AssemblyTimeBeginner = int.Parse(textBoxAssemblyTBeginner.Text); newData.AssemblyTimeExperienced = int.Parse(textBoxassemblyTExperience.Text); newData.AssemblyTimeSuper = int.Parse(textBoxAssemblyTSuper.Text); newData.TrayRunTimeMinutes = int.Parse(textBoxRunner.Text); newData.AssemblyDefectBeginner = int.Parse(textBoxAssemblyDBeginner.Text); newData.AssemblyDefectExperienced = int.Parse(textBoxAssemblyDExperience.Text); newData.AssemblyDefectSuper = double.Parse(textBoxAssemblyDSuper.Text); newData.MinuteSeconds = int.Parse(textBoxTime.Text); return(newData); }