private void MenuItem_Click(object sender, RoutedEventArgs e) { //Создать план WindowPlan windowsPlan = new WindowPlan(); windowsPlan.ShowDialog(); if (windowsPlan.DialogResult.Value && windowsPlan.DialogResult.HasValue) { init(); } }