public IEnumerable <SubMenuAction> AfterLoad(ProjectPagesOptions pageOptions)
        {
            Features.Ui.IsCustomTitleBarEnabled = true;                 //TODO Dispse?
            Features.Ui.SetCustomTitleBar(DependencyService.Get <IFormsInteractions>().GetRenderer(TitleBar));
            Features.Ui.CustomTitleBarChanges += CustomTitleBarChanges; //TODO Dispose
            Features.Ui.TriggerCustomTitleBarChanges();
            switch (pageOptions)
            {
            case ProjectPagesOptions.SettingsHelp:
                NavigateTo("Help");
                break;

            case ProjectPagesOptions.SettingsLog:
                NavigateTo("Log");
                break;

            case ProjectPagesOptions.SettingsBuy:
                NavigateTo("Buy");
                break;

            default:
                NavigateTo("Infos");
                break;
            }
            return(new[] {
                new SubMenuAction(UiResources.Options_U_Infos, "\xf129", new Command(() => NavigateTo("Infos"))),
                new SubMenuAction(UiResources.Options_U_Buy, "\xf07a", new Command(() => NavigateTo("Buy"))),
                new SubMenuAction(UiResources.Options_U_Notifications, "\xf0f3", new Command(() => NavigateTo("Log"))),
                new SubMenuAction(UiResources.Options_U_Hilfe, "\xf128", new Command(() => NavigateTo("Help"))),
            });
        }
Example #2
0
        public IEnumerable <SubMenuAction> Activate(ProjectPagesOptions pageOptions)
        {
            Features.Ui.IsCustomTitleBarEnabled = true;                 //TODO Dispse?
            Features.Ui.SetCustomTitleBar(DependencyService.Get <IFormsInteractions>().GetRenderer(TitleBar));
            Features.Ui.CustomTitleBarChanges += CustomTitleBarChanges; //TODO Dispose
            Features.Ui.TriggerCustomTitleBarChanges();
            return(new[] {
                new SubMenuAction(UiResources.CreateNewChar, "\xf234", new Command(() => NewChar_Clicked(this, new EventArgs()))),
                new SubMenuAction(UiResources.ImportChar, "\xf56f", new Command(() => OpenFile(this, new EventArgs()))),
                new SubMenuAction(UiResources.CreateExampleChar, "\xf501", new Command(() => ExampleChar_Clicked(this, new EventArgs()))),
                new SubMenuAction(UiResources.OpenFolder, "\xf07c", new Command(() => SharedIO.CurrentIO.OpenFolder(SharedIO.CurrentSaveDir))),
#if DEBUG
                new SubMenuAction("Debug Char", "\xf188", new Command(() => DebugChar_Clicked(this, new EventArgs()))),
                new SubMenuAction("Debug Message", "\xf188", new Command(() => Log.Write("Ein Wilder Test erscheint!", LogType.Warning, true))),
#endif
            });
        }
Example #3
0
 /// <summary>
 /// Activate
 /// </summary>
 /// <param name="myChar"></param>
 /// <returns></returns>
 public IEnumerable <SubMenuAction> Activate(ProjectPagesOptions pageOptions, CharHolder myChar)
 {
     if (Content is Grid G)
     {
         GCharHolder gChar = new GCharHolder(myChar)
         {
             Margin = 0, Padding = 0, BackgroundColor = Color.Transparent
         };
         G.Children.Add(gChar);
         gChar.AfterLoad(pageOptions);
         return(new[] {
             new SubMenuAction(UiResources.Save, "\xf0c7", new Command(() => myChar.SetSaveTimerTo(0, true))),
             new SubMenuAction(UiResources.SaveAtCurrentPlace, "\xf56f", new Command(() => SaveIntern(myChar))),
             new SubMenuAction(UiResources.SaveExtern, "\xf56e", new Command(() => SaveExtern(myChar))),
             new SubMenuAction(UiResources.OpenFolder, "\xf07c", new Command(() => SharedIO.CurrentIO.OpenFolder(myChar.FileInfo.Directory))),
             new SubMenuAction(UiResources.CharSettings, "\xf4fe", new Command(() => _ = RgPopUp.DisplayDefaultPopUp(new CharSettingsView(myChar)))),
             new SubMenuAction(UiResources.SubtractLifeStyleCost, "\xf155", new Command(() => myChar.SubtractLifeStyleCost())),
             new SubMenuAction(UiResources.Repair, "\xf6e3", new Command(() => myChar.Repair())),
             new SubMenuAction(UiResources.Close, "\xf235", new Command(() => { AppModel.Instance?.RemoveMainObject(myChar); AppModel.Instance.RequestNavigation(ProjectPages.Administration); })),
         });
     }
     return(Array.Empty <SubMenuAction>());
 }
 public void RequestNavigation(ProjectPages p, ProjectPagesOptions po = ProjectPagesOptions.Nothing)
 {
     System.Diagnostics.Debug.WriteLine("                           AppModelRequest");
     PlatformHelper.ExecuteOnUIThreadAsync(() => NavigationRequested?.Invoke(p, po));
 }