private void NoviRacun(object sender, RoutedEventArgs e) { RacuniEd r = new RacuniEd(Art.ToList()); r.Owner = this; if (r.ShowDialog() == true) { Racuni.Add(r.TrenutniRacun); } }
private void NoviRacun(object sender, RoutedEventArgs e) { RacuniEd r = new RacuniEd(Art.ToList()); r.Owner = this; if (r.ShowDialog() == true) { Racuni.Add(r.TrenutniRacun); BinaryFormatter BF = new BinaryFormatter(); using (Stream snimanjeracuna = new FileStream("Racuni.txt", FileMode.OpenOrCreate, FileAccess.Write)) { BF.Serialize(snimanjeracuna, Racuni); } } }