// dodavanje racunara u genericku listu i ispis u listbox kontroli private void btnDodajUListu_Click(object sender, EventArgs e) { try { DesktopRacunar desktopRacunar = new DesktopRacunar() { proizvodjac = txtProizvodjac.Text, model = txtModel.Text, procesor = txtProcesor.Text, ram = Convert.ToInt32(txtRam.Text), maticnaPloca = txtMaticnaPloca.Text, napajanje = txtNapajanje.Text, tipDiska = txtTipDiska.Text, memorijaDiska = Convert.ToInt32(txtMemorijaDiska.Text), cena = Convert.ToDouble(txtCena.Text) }; ListaDesktopRacunara.Add(desktopRacunar); PrikaziListu(); } catch (Exception ex) { MessageBox.Show(ex.Message); } }
private void button1_Click(object sender, EventArgs e) { try { string proizvodjac = txtProizvodjac.Text; string procesor = cmbBoxProcesor.Text; string ram = cmbBoxRAM.Text; string maticnaPloca = txtMaticna.Text; decimal cena = Convert.ToDecimal(txtCena.Text); int kolicina = (int)numKolicina.Value; decimal cenaDostave = Convert.ToDecimal(txtCenaDostave.Text); string grafickaKartica = cmbBoxGraficka.Text; DesktopRacunar r1 = new DesktopRacunar(cena, kolicina, cenaDostave, maticnaPloca, procesor, ram, proizvodjac, grafickaKartica); rLista.Add(r1); Utilities.ResetAllControls(this); } catch (Exception ex) { MessageBox.Show(ex.Message, "Obavestenje", MessageBoxButtons.OK, MessageBoxIcon.Information); } }
private void btnKopiraj_Click(object sender, EventArgs e) { DesktopRacunar racunar = new DesktopRacunar(); MessageBox.Show(racunar.KopirajNaDisk()); }
private void btnProgrmiraj_Click(object sender, EventArgs e) { DesktopRacunar racunar = new DesktopRacunar(); MessageBox.Show(racunar.Programiraj()); }
private void btnUnosTeksta_Click(object sender, EventArgs e) { DesktopRacunar racunar = new DesktopRacunar(); MessageBox.Show(racunar.UnosTeksta()); }
private void btnDostavi_Click(object sender, EventArgs e) { DesktopRacunar racunar = new DesktopRacunar(); MessageBox.Show(racunar.Dostavi()); }