public void RefreshGUI()
 {
     // Refresh window pages
     if (GeneralSettingsPage != null)
     {
         GeneralSettingsPage.RefreshGUI();
     }
     if (DiscoveryPage != null)
     {
         DiscoveryPage.RefreshGUI();
     }
     if (PrecursorPage != null)
     {
         PrecursorPage.RefreshGUI();
     }
     if (EggsPage != null)
     {
         EggsPage.RefreshGUI();
     }
     if (DrinksAndFoodPage != null)
     {
         DrinksAndFoodPage.RefreshGUI();
     }
     if (FloraPage == null)
     {
         FloraPage = new UserControl_Flora();
     }
     if (FloraPage != null)
     {
         FloraPage.RefreshGUI();
     }
     if (GhostLeviathansPage != null)
     {
         GhostLeviathansPage.RefreshGUI();
     }
     if (ExtraSettingsPage != null)
     {
         ExtraSettingsPage.RefreshGUI();
     }
     if (AboutPage != null)
     {
         AboutPage.RefreshGUI();
     }
     // Refresh window title
     Title = LanguageHelper.GetFriendlyWord("Config_ConfiguratorName");
     // Refresh window elements (left menu, modals, ...)
     OnPropertyChanged("");
 }
        public void SwitchPage(PageId toPage)
        {
            Stack_Main.Children.Clear();
            switch (toPage)
            {
            case PageId.DISCOVERY:
                if (DiscoveryPage == null)
                {
                    DiscoveryPage = new UserControl_Discovery();
                }
                Stack_Main.Children.Add(DiscoveryPage);
                break;

            case PageId.PRECURSOR:
                if (PrecursorPage == null)
                {
                    PrecursorPage = new UserControl_Precursor();
                }
                Stack_Main.Children.Add(PrecursorPage);
                break;

            case PageId.EGGS:
                if (EggsPage == null)
                {
                    EggsPage = new UserControl_Eggs();
                }
                Stack_Main.Children.Add(EggsPage);
                break;

            case PageId.DRINKS_AND_FOOD:
                if (DrinksAndFoodPage == null)
                {
                    DrinksAndFoodPage = new UserControl_DrinksAndFood();
                }
                Stack_Main.Children.Add(DrinksAndFoodPage);
                break;

            case PageId.FLORA:
                if (FloraPage == null)
                {
                    FloraPage = new UserControl_Flora();
                }
                Stack_Main.Children.Add(FloraPage);
                break;

            case PageId.GHOST_LEVIATHANS:
                if (GhostLeviathansPage == null)
                {
                    GhostLeviathansPage = new UserControl_GhostLeviathans();
                }
                Stack_Main.Children.Add(GhostLeviathansPage);
                break;

            case PageId.EXTRA_SETTINGS:
                if (ExtraSettingsPage == null)
                {
                    ExtraSettingsPage = new UserControl_ExtraSettings();
                }
                Stack_Main.Children.Add(ExtraSettingsPage);
                break;

            case PageId.ABOUT:
                if (AboutPage == null)
                {
                    AboutPage = new UserControl_About();
                }
                Stack_Main.Children.Add(AboutPage);
                break;

            default:     // Fallback to PageId.GENERAL_SETTINGS
                if (GeneralSettingsPage == null)
                {
                    GeneralSettingsPage = new UserControl_GeneralSettings();
                }
                Stack_Main.Children.Add(GeneralSettingsPage);
                break;
            }
        }