public static bool?ShowDialog(Window owner, IPokeBox pokeBox, bool silentEdit = false)
        {
            EditBoxWindow window = new EditBoxWindow(pokeBox, silentEdit);

            window.Owner = owner;
            return(window.ShowDialog());
        }
 private void OnEditBox(object sender, RoutedEventArgs e)
 {
     if (selectedBox != null)
     {
         var result = EditBoxWindow.ShowDialog(this, selectedBox, true);
         if (result.HasValue && result.Value)
         {
             ((Label)((StackPanel)boxes[selectedIndex].Content).Children[1]).Content = selectedBox.Name;
             ((Image)((Grid)((StackPanel)boxes[selectedIndex].Content).Children[0]).Children[0]).Source = selectedBox.WallpaperImage;
             pokeBoxControl.LoadBox(selectedBox, PokeManager.GetIndexOfGame(selectedBox.PokePC.GameSave));
         }
     }
 }