private void UpdateValues() { int index = MaterialComboBox.SelectedIndex; string type = FileInit.Material[index].MaterialType; float thickness = FileInit.Cuttings[ThicknessComboBox.SelectedIndex].Thickness; float cost = FileInit.GetCostByType(type, thickness); CuttingCostTextBox.Text = cost.ToString(); MaterialCostTextBox.Text = FileInit.Material[index].MaterialPrice.ToString(); DensityTextBox.Text = FileInit.Material[index].Density.ToString(); }
public MainWindow() { InitializeComponent(); FileInit.Init("res/CuttingPrice.xml", "res/MaterialPrice.xml"); CalculationForm cf = new CalculationForm(this); StackPanel.Children.Add(cf); calculationForms.Add(cf); VersionCheck vc = new VersionCheck(); vc.CheckVersion(); }