Exemplo n.º 1
0
        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);
        }
Exemplo n.º 2
0
        private async Task ChangeImpl()
        {
            var selectEffect = new SelectEffectView();
            var effect       = await OverlayService.Show <Effect>(selectEffect);

            if (effect == null)
            {
                return;
            }

            Effect.Effect.Value = effect.Id;
        }
Exemplo n.º 3
0
        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);
            }
        }