Exemple #1
0
        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();
        }
Exemple #2
0
        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();
        }