Ejemplo n.º 1
0
        private async void TurfGridView_ItemClick(object sender, ItemClickEventArgs e)
        {
            GoodTurf gt = e.ClickedItem as GoodTurf;

            var contentDialog = new ContentDialog()
            {
                Content           = new GoodTurfDialog(gt),
                PrimaryButtonText = "确定",
                FullSizeDesired   = false
            };

            contentDialog.Style = transparent;

            contentDialog.Closed += async(_s, _e) =>
            {
                await GoodsGrid.Blur(value : 0, duration : 0, delay : 0).StartAsync();

                contentDialog.Hide();
            };

            contentDialog.PrimaryButtonClick += async(_s, _e) =>
            {
                await GoodsGrid.Blur(value : 0, duration : 0, delay : 0).StartAsync();

                contentDialog.Hide();
            };
            await GoodsGrid.Blur(value : 7, duration : 100, delay : 0).StartAsync();

            await contentDialog.ShowAsync();
        }
 private void LoadData(GoodTurf c)
 {
     GoodImage.Source = new BitmapImage(new Uri(c.Picture));
     GoodName.Text    = c.Name;
     GoodEnName.Text  = c.EnName;
     // 制作科技
     if (string.IsNullOrEmpty(c.Make))
     {
         GoodMakeStackPanel.Visibility = Visibility.Collapsed;
     }
     else
     {
         GoodMakePicButton.Source = StringProcess.GetGameResourcePath(c.Make);
     }
     // 草皮纹理
     GoodSourceTextureWrapPanel.Source = new BitmapImage(new Uri(StringProcess.GetGameResourcePath(c.Texture)));
     GoodIntroduction.Text             = c.Introduction;
     // 控制台
     if (c.Console != null)
     {
         ConsolePre.Text = $"c_give(\"{c.Console}\",";
     }
     else
     {
         CopyGrid.Visibility = Visibility.Collapsed;
     }
 }
Ejemplo n.º 3
0
        public GoodTurfDialog(GoodTurf gt)
        {
            this.InitializeComponent();

            TurfImage.Source      = new BitmapImage(new Uri(gt.Picture));
            TurfName.Text         = gt.Name;
            TurfEnName.Text       = gt.EnName;
            ROG.IsChecked         = gt.IsROG;
            SW.IsChecked          = gt.IsSW;
            DST.IsChecked         = gt.IsDST;
            Texture.Source        = new BitmapImage(new Uri(gt.Texture));
            TurfIntroduction.Text = gt.Introduction;
            Console.Text          = gt.Console;
        }