Esempio n. 1
0
        private async void Wink()
        {
            if (generator == null || eyeLayers == null)
            {
                return;
            }

            //半目
            img_eyes.Source = new BitmapImage(eyeLayers.ElementAt(1));
            img_eyes.Margin = generator.EyesMargin().ElementAt(1);
            Utility.DoEvents();
            await Task.Delay(100);

            //閉じる
            img_eyes.Source = new BitmapImage(eyeLayers.ElementAt(2));
            img_eyes.Margin = generator.EyesMargin().ElementAt(2);
            Utility.DoEvents();
            await Task.Delay(70);

            //半目
            img_eyes.Source = new BitmapImage(eyeLayers.ElementAt(1));
            img_eyes.Margin = generator.EyesMargin().ElementAt(1);
            Utility.DoEvents();
            await Task.Delay(70);

            //開く
            img_eyes.Source = new BitmapImage(eyeLayers.ElementAt(0));
            img_eyes.Margin = generator.EyesMargin().ElementAt(0);
            Utility.DoEvents();
        }
Esempio n. 2
0
        private void DrawImage()
        {
            var items = (SelectedItems)banker["SelectedItems"];

            generator = new ImageInfoGenerator(items);

            //身体
            img_body.Source = new BitmapImage(generator.DressFileName());
            img_body.Margin = generator.DressMargin();

            //目
            eyeLayers       = generator.EyesFileName();
            img_eyes.Source = new BitmapImage(eyeLayers.First());
            img_eyes.Margin = generator.EyesMargin().First();

            //口
            mouthLayers      = generator.MouthsFileName();
            img_mouth.Source = new BitmapImage(mouthLayers.Last());
            img_mouth.Margin = generator.MouthsMargin().Last();
        }
Esempio n. 3
0
        private void DrawImage()
        {
            var items = (SelectedItems)banker["SelectedItems"];
            generator = new ImageInfoGenerator(items);

            //身体
            img_body.Source = new BitmapImage(generator.DressFileName());
            img_body.Margin = generator.DressMargin();

            //目
            eyeLayers = generator.EyesFileName();
            img_eyes.Source = new BitmapImage(eyeLayers.First());
            img_eyes.Margin = generator.EyesMargin().First();

            //口
            mouthLayers = generator.MouthsFileName();
            img_mouth.Source = new BitmapImage(mouthLayers.Last());
            img_mouth.Margin = generator.MouthsMargin().Last();
        }