/// <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>()); }
private void MoveTo(object sender, EventArgs e) { _ = RgPopUp.DisplayDefaultPopUp(new ThingCopyChooser(MyThing, MyChar, true)); CloseSelf(); }