Esempio n. 1
0
        private void TreeView_SelectionChanged(object sender, RoutedPropertyChangedEventArgs <object> e)
        {
            var item = (TreeViewItem)e.NewValue;

            switch ((string)item.Name)
            {
            case "GeneralPanel":
                _generalPanel.Refresh();
                EditorPanel.Content = _generalPanel;
                break;

            case "PartyPanel":
                _partyPanel.Refresh();
                EditorPanel.Content = _partyPanel;
                break;

            case "CreaturePanel":
                _creaturePanel.Refresh();
                EditorPanel.Content = _creaturePanel;
                break;

            case "TrappingPanel":
                _trappingPanel.Refresh();
                EditorPanel.Content = _trappingPanel;
                break;

            case "ItemsPanel":
                _itemsPanel.Refresh();
                EditorPanel.Content = _itemsPanel;
                break;

            case "AccessoriesPanel":
                _accessoriesPanel.Refresh();
                EditorPanel.Content = _accessoriesPanel;
                break;

            case "DresspheresPanel":
                _dresspheresPanel.Refresh();
                EditorPanel.Content = _dresspheresPanel;
                break;

            case "GarmentGridsPanel":
                _garmentGridsPanel.Refresh();
                EditorPanel.Content = _garmentGridsPanel;
                break;

            case "DebugOptionsPanel":
                _debugOptionsPanel.Refresh();
                EditorPanel.Content = _debugOptionsPanel;
                break;

            case "ModsPanel":
                _modPanel.Refresh();
                EditorPanel.Content = _modPanel;
                break;

            default:
                break;
            }
        }
Esempio n. 2
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;
            }
        }
Esempio n. 3
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();
 }
Esempio n. 4
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}");
            }
        }