public LandmarkTypeWindow(Map map, ListTypesWindow ltw) { InitializeComponent(); this.map = map; this.ltw = ltw; _image = "/HCI_Project;component/Images/missing_pic.jpg"; this.DataContext = this; }
private void NewLandmarkType_OnClick(object sender, RoutedEventArgs e) { if (ltw == null) { ltw = new ListTypesWindow(map); ltw.Show(); } else { ltw.Topmost = true; // important ltw.Topmost = false; // important ltw.Focus(); // important } }
private void NewType_OnClick(object sender, RoutedEventArgs e) { if (ltw == null) { ltw = new ListTypesWindow(map, this); ltw.Show(); if (ChosenType != null) { ltw.LTID.Text = ChosenType.TypeView; } } else { ltw.Topmost = true; // important ltw.Topmost = false; // important ltw.Focus(); // important } }