private void removeSubwayLineBT_Click(object sender, RoutedEventArgs e) { if (on) { RemoveSubwayLineWindow win = new RemoveSubwayLineWindow(this); win.Owner = this; win.ShowDialog(); } }