private void MenuItem_Click_2(object sender, RoutedEventArgs e) { WindowCompany windowCompany = new WindowCompany(); windowCompany.ShowDialog(); if (windowCompany.DialogResult.Value && windowCompany.DialogResult.HasValue) { init(); } }