private void otvoriTabeluTipova(object sender, RoutedEventArgs args) { TabelaTipova tabela = new TabelaTipova(this.parent); tabela.ShowDialog(); TipLokala tip1 = tabela.IzabraniTip; if (tip1 != null && !tip1.Equals(tip)) { noviTip = tip1; this.DataContext = noviTip; OznakaTipa.Text = tip1.Oznaka; } }
private void oznakaTextChanged(object sender, TextChangedEventArgs args) { System.Windows.Controls.TextBox box = (System.Windows.Controls.TextBox)sender; TipLokala tip1 = parent.repoTipovi.nadjiPoOznaci(box.Text); if (tip.Equals(tip1)) { noviTip = null; this.DataContext = null; return; } noviTip = tip1; this.DataContext = noviTip; }