public static bool Open(PageRoute route) { var isOpen = Open(route.Page, route.Context); if (isOpen) { return(true); } if (route.Context == null) { return(TryNotice.Current.Show(false, $"{ route.Page } 无法打开")); } if (route.Context is string) { return(Open(route.Context.ToString())); } return(TryNotice.Current.Show(false, $"{ route.Page } 无法打开")); }
private void AddSubItem(ItemCollection Items, string Name, PageRoute route) { AddSubItem(Items, Name, route.ToJson()); }
private MenuItem AddItem(string Name, PageRoute route = null) { return(AddItem(Name, route == null ? "" : route.ToJson())); }