public SettingNavigationItem(string title, SettingNavigationItems itemType)
 {
     Title = title;
     Item  = itemType;
 }
 public SettingNavigationItem(SettingNavigationItems itemType)
 {
     Title = itemType.ToString();
     Item  = itemType;
 }
Esempio n. 3
0
        public static Page SwitchSettingDialogContent(SettingNavigationItems navigationItem)
        {
            Page result = null;

            switch (navigationItem)
            {
            case SettingNavigationItems.Window:
            {
                result = WindowSettingsPage.Instance;
            }
            break;

            case SettingNavigationItems.Download:
            {
                result = DownloadSettingsPage.Instance;
            }
            break;

            case SettingNavigationItems.Games:
            {
                result = GameSettingsPage.Instance;
            }
            break;

            case SettingNavigationItems.Emulators:
            {
                result = EmulatorsSettingsPage.Instance;
            }
            break;

            case SettingNavigationItems.Films:
            {
                result = FilmsSettingsPage.Instance;
            }
            break;

            case SettingNavigationItems.Folders:
            {
                result = FoldersSettingsPage.Instance;
            }
            break;

            case SettingNavigationItems.Book:
            {
                result = BooksSettingsPage.Instance;
            }
            break;
            }

            if (result != null)
            {
                if (settingContentPages.ContainsKey(navigationItem))
                {
                    settingContentPages[navigationItem] = (result as ISingletonPage);
                }
                else
                {
                    settingContentPages.Add(navigationItem, (result as ISingletonPage));
                }
            }

            return(result);
        }