Exemple #1
0
        // 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);
            }
        }
Exemple #2
0
        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);
            }
        }
Exemple #3
0
        private void btnKopiraj_Click(object sender, EventArgs e)
        {
            DesktopRacunar racunar = new DesktopRacunar();

            MessageBox.Show(racunar.KopirajNaDisk());
        }
Exemple #4
0
        private void btnProgrmiraj_Click(object sender, EventArgs e)
        {
            DesktopRacunar racunar = new DesktopRacunar();

            MessageBox.Show(racunar.Programiraj());
        }
Exemple #5
0
        private void btnUnosTeksta_Click(object sender, EventArgs e)
        {
            DesktopRacunar racunar = new DesktopRacunar();

            MessageBox.Show(racunar.UnosTeksta());
        }
Exemple #6
0
        private void btnDostavi_Click(object sender, EventArgs e)
        {
            DesktopRacunar racunar = new DesktopRacunar();

            MessageBox.Show(racunar.Dostavi());
        }