public void Show(SplashScreen splashScreen, Func <SplashScreen, UserControl> splashFactory, WindowLogic window) { if (splashFactory == null) { return; } var splash = splashFactory(splashScreen); var service = new OverlayService(); popup = service.Show(Sizes.FullScreen, splash); window.Activate(WindowLogic.ActivateSources.SplashScreen, this); }
private async Task ChangeImpl() { var selectEffect = new SelectEffectView(); var effect = await OverlayService.Show <Effect>(selectEffect); if (effect == null) { return; } Effect.Effect.Value = effect.Id; }
private async Task AddItemImpl() { try { var selectItem = new SelectItemView(); var item = await OverlayService.Show <Item>(selectItem); if (item != null) { await ShopService.Instance.NewItem(item.ItemNumber); } } catch (Exception ex) { await new MessageView("Error", "Unable to add item", ex).ShowDialog(Application.Current.MainWindow); } }