예제 #1
0
        private void EditorTree_OnSelectedItemChanged(object sender, RoutedPropertyChangedEventArgs <object> e)
        {
            var treeView     = sender as TreeView;
            var treeViewItem = treeView.SelectedItem as TreeViewItem;

            if (treeViewItem == null)
            {
                return;
            }

            switch (treeViewItem.Name)
            {
            case "PartyEditor":
                _partyPanel.Refresh();
                EditorContent.Content = _partyPanel;
                break;

            case "AeonEditor":
                _aeonsPanel.Refresh();
                EditorContent.Content = _aeonsPanel;
                break;

            case "ItemEditor":
                _itemsPanel.Refresh();
                EditorContent.Content = _itemsPanel;
                break;

            case "SphereGridEditor":
                _sphereGridPanel.Refresh();
                EditorContent.Content = _sphereGridPanel;
                break;

            case "EquipmentEditor":
                _equipmentPanel.Refresh();
                EditorContent.Content = _equipmentPanel;
                break;

            case "DebugEditor":
                _debugPanel.Refresh();
                EditorContent.Content = _debugPanel;
                break;

            case "Boosters":
                _boostersPanel.Refresh();
                EditorContent.Content = _boostersPanel;
                break;

            default:     // Panel not implemented
                EditorContent.Content = _notImplementedPanel;
                break;
            }
        }
예제 #2
0
 public void RefreshAllPanels()
 {
     // Refresh panels here
     _generalPanel?.Refresh();
     _partyPanel?.Refresh();
     _aeonsPanel?.Refresh();
     _itemsPanel?.Refresh();
     _sphereGridPanel?.Refresh();
     _equipmentPanel?.Refresh();
     _blitzballPanel?.Refresh();
     _monsterArenaPanel?.Refresh();
     _battlePanel?.Refresh();
     _debugPanel?.Refresh();
     _boostersPanel?.Refresh();
     _skillEditorPanel?.Refresh();
 }
예제 #3
0
        private void EditorTree_OnSelectedItemChanged(object sender, RoutedPropertyChangedEventArgs <object> e)
        {
            var treeView     = sender as TreeView;
            var treeViewItem = treeView.SelectedItem as TreeViewItem;

            if (treeViewItem == null)
            {
                return;
            }

            try
            {
                switch (treeViewItem.Name)
                {
                case "GeneralEditor":
                    _generalPanel.Refresh();
                    EditorContent.Content = _generalPanel;
                    break;

                case "PartyEditor":
                    _partyPanel.Refresh();
                    EditorContent.Content = _partyPanel;
                    break;

                case "AeonEditor":
                    _aeonsPanel.Refresh();
                    EditorContent.Content = _aeonsPanel;
                    break;

                case "ItemEditor":
                    _itemsPanel.Refresh();
                    EditorContent.Content = _itemsPanel;
                    break;

                case "SphereGridEditor":
                    _sphereGridPanel.Refresh();
                    EditorContent.Content = _sphereGridPanel;
                    break;

                case "EquipmentEditor":
                    _equipmentPanel.Refresh();
                    EditorContent.Content = _equipmentPanel;
                    break;

                case "BlitzballEditor":
                    _blitzballPanel.Refresh();
                    EditorContent.Content = _blitzballPanel;
                    break;

                case "MonsterArenaEditor":
                    _monsterArenaPanel.Refresh();
                    EditorContent.Content = _monsterArenaPanel;
                    break;

                case "BattleEditor":
                    _battlePanel.Refresh();
                    EditorContent.Content = _battlePanel;
                    break;

                case "SkillEditor":
                    _skillEditorPanel.Refresh();
                    EditorContent.Content = _skillEditorPanel;
                    break;

                case "DebugEditor":
                    _debugPanel.Refresh();
                    EditorContent.Content = _debugPanel;
                    break;

                case "Boosters":
                    _boostersPanel.Refresh();
                    EditorContent.Content = _boostersPanel;
                    break;

                default:     // Panel not implemented
                    EditorContent.Content = _notAvailablePanel;
                    break;
                }
            }
            catch (NullReferenceException ex)
            {
                EditorContent.Content = _notAvailablePanel;
            }
            catch (Exception ex)
            {
                MessageBox.Show($"Exception loading panel:\n{ex.Message}");
            }
        }