private void BtnEdit_Clicks(object sender, RoutedEventArgs e) { this.isEdit = true; NewContactClasification v = new NewContactClasification(this); v.Show(); }
private void BtnNew_Clicks(object sender, RoutedEventArgs e) { this.isEdit = false; bool isWindowOpen = false; foreach (Window w in Application.Current.Windows) { if (w is NewContactClasification) { isWindowOpen = true; w.Activate(); } } if (!isWindowOpen) { NewContactClasification period = new NewContactClasification(this); period.Show(); } }