private void Button_Click(object sender, RoutedEventArgs e) { this.Hide(); Komponentenauswahl komponenten = new Komponentenauswahl(); komponenten.ShowDialog(); this.Show(); }
private void btn_overview_Click(object sender, RoutedEventArgs e) { this.Hide(); Komponentenauswahl komp = new Komponentenauswahl(); komp.ShowDialog(); this.Show(); }
private void btn_Select_Click(object sender, RoutedEventArgs e) { if (TableItems.SelectedItem != null) { DataRowView selectedRow; selectedRow = (DataRowView)TableItems.SelectedItem; switch (TypeLabel.Content) { case "Case": configuration.pcCase = new Case(selectedRow.Row.ItemArray[0].ToString(), selectedRow.Row.ItemArray[1].ToString(), double.Parse(selectedRow.Row.ItemArray[2].ToString())); break; case "CPU": configuration.cpu = new CPU(selectedRow.Row.ItemArray[0].ToString(), selectedRow.Row.ItemArray[1].ToString(), selectedRow.Row.ItemArray[2].ToString(), selectedRow.Row.ItemArray[3].ToString(), selectedRow.Row.ItemArray[4].ToString(), selectedRow.Row.ItemArray[5].ToString(), selectedRow.Row.ItemArray[6].ToString(), selectedRow.Row.ItemArray[7].ToString(), selectedRow.Row.ItemArray[8].ToString(), double.Parse(selectedRow.Row.ItemArray[9].ToString())); break; case "CPU Cooler": configuration.cpuCooler = new CPU_Cooler(selectedRow.Row.ItemArray[0].ToString(), selectedRow.Row.ItemArray[1].ToString(), selectedRow.Row.ItemArray[2].ToString(), selectedRow.Row.ItemArray[3].ToString(), double.Parse(selectedRow.Row.ItemArray[4].ToString())); break; case "GPU": configuration.gpu = new Gpu(selectedRow.Row.ItemArray[0].ToString(), selectedRow.Row.ItemArray[1].ToString(), selectedRow.Row.ItemArray[2].ToString(), selectedRow.Row.ItemArray[3].ToString(), double.Parse(selectedRow.Row.ItemArray[4].ToString())); break; case "Mainboard": configuration.motherboard = new Motherboard(selectedRow.Row.ItemArray[0].ToString(), selectedRow.Row.ItemArray[1].ToString(), selectedRow.Row.ItemArray[2].ToString(), selectedRow.Row.ItemArray[3].ToString(), selectedRow.Row.ItemArray[4].ToString(), selectedRow.Row.ItemArray[5].ToString(), selectedRow.Row.ItemArray[6].ToString(), double.Parse(selectedRow.Row.ItemArray[7].ToString())); break; case "Memory": configuration.memory.Add(new Memory(selectedRow.Row.ItemArray[0].ToString(), selectedRow.Row.ItemArray[1].ToString(), selectedRow.Row.ItemArray[2].ToString(), selectedRow.Row.ItemArray[3].ToString(), double.Parse(selectedRow.Row.ItemArray[4].ToString()))); break; case "Storage": configuration.storage.Add(new Storage(selectedRow.Row.ItemArray[0].ToString(), selectedRow.Row.ItemArray[1].ToString(), selectedRow.Row.ItemArray[2].ToString(), double.Parse(selectedRow.Row.ItemArray[3].ToString()))); break; case "Power Supply": configuration.psu = new Psu(selectedRow.Row.ItemArray[0].ToString(), selectedRow.Row.ItemArray[1].ToString(), selectedRow.Row.ItemArray[2].ToString(), double.Parse(selectedRow.Row.ItemArray[3].ToString())); break; } this.Hide(); Komponentenauswahl komp = new Komponentenauswahl(); komp.ShowDialog(); this.Show(); } }
private void btn_load_Click(object sender, RoutedEventArgs e) { XMLWrite.ReadXML(); MessageBox.Show("Successfully Loaded Build from File"); this.Hide(); Komponentenauswahl komp = new Komponentenauswahl(); komp.ShowDialog(); this.Show(); }