private void buttonIzmeni_Click(object sender, RoutedEventArgs e) { ObservableCollection<DB.Mesto> _mesta = (ObservableCollection<DB.Mesto>)listViewMesto.ItemsSource; DB.Mesto _mesto = (DB.Mesto)listViewMesto.SelectedItem; if (_mesta != null && _mesto != null) { MestoDetaljno _mestoDetaljno = new MestoDetaljno(this, true); //_mestoDetaljno.WindowStyle = WindowStyle.ToolWindow; _mestoDetaljno.Owner = Window.GetWindow(this); _mestoDetaljno.WindowStartupLocation = WindowStartupLocation.CenterOwner; _mestoDetaljno.ShowDialog(); } }
private void listViewItem_MouseDoubleClick(object sender, MouseButtonEventArgs e) { //ObservableCollection<DB.Mesto> _mesta = (ObservableCollection<DB.Mesto>)listViewMesto.ItemsSource; //DB.Mesto _mesto = (DB.Mesto)listViewMesto.SelectedItem; //if (_mesta != null && _mesto != null) //{ MestoDetaljno _mestoDetaljno = new MestoDetaljno(this, true); //_mestoDetaljno.WindowStyle = WindowStyle.ToolWindow; _mestoDetaljno.Owner = Window.GetWindow(this); _mestoDetaljno.WindowStartupLocation = WindowStartupLocation.CenterOwner; _mestoDetaljno.ShowDialog(); //} }
private void buttonDodaj_Click(object sender, RoutedEventArgs e) { MestoDetaljno _mestoDetaljno = new MestoDetaljno(this, false); //_mestoDetaljno.WindowStyle = WindowStyle.ToolWindow; _mestoDetaljno.Owner = Window.GetWindow(this); _mestoDetaljno.WindowStartupLocation = WindowStartupLocation.CenterOwner; _mestoDetaljno.ShowDialog(); }