コード例 #1
0
        public static void Show(Window owner, SecretBase secretBase)
        {
            SecretBaseEditor window = new SecretBaseEditor();

            window.Owner = owner;
            window.LoadSecretBase(secretBase);
            window.ShowDialog();
        }
コード例 #2
0
 private void OnEditClicked(object sender, RoutedEventArgs e)
 {
     if (secretBase == null && IsGBAGame && listViewSecretBases.SelectedIndex == 0)
     {
         var location = SecretBaseLocationChooser.Show(Window.GetWindow(this), 0, IsGBAGame ? GBAGameSave.SecretBaseManager : null);
         if (location.HasValue && location.Value != 0)
         {
             GBAGameSave.SecretBaseLocation = location.Value;
             UpdateListViewItems();
             OnSecretBaseSelected(null, null);
         }
     }
     else
     {
         SecretBaseEditor.Show(Window.GetWindow(this), secretBase);
         //UpdateListViewItems();
         int newIndex;
         if (!secretBase.IsPlayerSecretBase)
         {
             if (IsGBAGame)
             {
                 GBAGameSave.SecretBaseManager.Sort();
                 newIndex = 2 + GBAGameSave.SecretBaseManager.SharedSecretBases.IndexOf((SharedSecretBase)secretBase);
             }
             else
             {
                 PokeManager.SortSecretBases();
                 newIndex = PokeManager.SecretBases.IndexOf((SharedSecretBase)secretBase);
             }
             AddListViewItems();
             listViewSecretBases.SelectedIndex = newIndex;
             OnSecretBaseSelected(null, null);
         }
         else
         {
             UpdateListViewItems();
             OnSecretBaseSelected(null, null);
         }
     }
 }
コード例 #3
0
 public static void Show(Window owner, SecretBase secretBase)
 {
     SecretBaseEditor window = new SecretBaseEditor();
     window.Owner = owner;
     window.LoadSecretBase(secretBase);
     window.ShowDialog();
 }