Beispiel #1
0
        private void btnDodaj_Click(object sender, RoutedEventArgs e)
        {
            Namestaj             noviNamestaj = new Namestaj();
            NamestajIzmenaProzor nip          = new NamestajIzmenaProzor(noviNamestaj);

            nip.ShowDialog();
        }
Beispiel #2
0
        private void btnIzmeni_Click(object sender, RoutedEventArgs e)
        {
            Namestaj selektovaniNamestaj = view.CurrentItem as Namestaj;

            if (selektovaniNamestaj != null)
            {
                Namestaj             old = (Namestaj)selektovaniNamestaj.Clone();
                NamestajIzmenaProzor nip = new NamestajIzmenaProzor(selektovaniNamestaj, NamestajIzmenaProzor.Stanje.IZMENA);
                if (nip.ShowDialog() != true)
                {
                    int index = Aplikacija.Instance.Namestaj.IndexOf(selektovaniNamestaj);
                    Aplikacija.Instance.Namestaj[index] = old;
                }
            }
        }