private void MenuItem_Click_1(object sender, RoutedEventArgs e) { //создать продукт WindowProducts windowProducts = new WindowProducts(); windowProducts.ShowDialog(); if (windowProducts.DialogResult.Value && windowProducts.DialogResult.HasValue) { init(); } }