Ejemplo n.º 1
0
        /// <summary>
        /// Add new layout's set and add vertex to one
        /// </summary>
        /// <param name="vertex2D"></param>
        public void AddNewSet(Vertex2D vertex2D)
        {
            IVisualSet visualSet = null;

            switch (vertex2D.VertexType)
            {
            case VertexType.Vertex:
                visualSet = new SimpleSet();
                break;

            case VertexType.Brush:
                visualSet = new BrushSet();
                break;

            case VertexType.Eraser:
                visualSet = new EraserSet();
                break;

            case VertexType.Image:
                visualSet = new ImageSet();
                break;

            case VertexType.Spline:
                visualSet           = IsInstrumentChanged ? new SplineSet() : vertex2Ds.Last(x => x is SplineSet);
                IsInstrumentChanged = false;
                break;
            }

            visualSet?.Add(vertex2D);
            if (visualSet != null)
            {
                vertex2Ds.Add(visualSet);
            }
        }
Ejemplo n.º 2
0
 public void GetListImage(DirectoryInfo dir)
 {
     GetPathandExtension(dir);
     for (int i = 0; i < Pathes.Count; i++)
     {
         string    str       = Pathes[i];
         ImageData structura = new ImageData
         {
             IdImage      = i,
             Image        = Bitmap.FromFile(str),
             Extension    = Extensions[i],
             CreationTime = CreationTime[i].ToString()
         };
         ImageSet.Add(structura);
     }
 }
Ejemplo n.º 3
0
        public override void PopulateImageSet()
        {
            if (IsPlayerOne)
            {
                //add the player 1 images to the list
                Image standing = new Image
                {
                    Source = new BitmapImage(new Uri($"ms-appx:///Assets/Characters/Scorpion/Player1Poses/SStanding.png", UriKind.RelativeOrAbsolute))
                };
                ImageSet.Add(standing);

                Image punch = new Image
                {
                    Source = new BitmapImage(new Uri($"ms-appx:///Assets/Characters/Scorpion/Player1Poses/SPunch.png", UriKind.RelativeOrAbsolute))
                };
                ImageSet.Add(punch);

                Image highKick = new Image
                {
                    Source = new BitmapImage(new Uri($"ms-appx:///Assets/Characters/Scorpion/Player1Poses/SHighKick.png", UriKind.RelativeOrAbsolute))
                };
                ImageSet.Add(highKick);

                Image lowKick = new Image
                {
                    Source = new BitmapImage(new Uri($"ms-appx:///Assets/Characters/Scorpion/Player1Poses/SLowKick.png", UriKind.RelativeOrAbsolute))
                };
                ImageSet.Add(lowKick);

                Image bonus = new Image
                {
                    Source = new BitmapImage(new Uri($"ms-appx:///Assets/Characters/Scorpion/Player1Poses/SBonus.png", UriKind.RelativeOrAbsolute))
                };
                ImageSet.Add(bonus);
            }
            else
            {
                //add the player 2 images to the list
                Image standing = new Image
                {
                    Source = new BitmapImage(new Uri($"ms-appx:///Assets/Characters/Scorpion/Player2Poses/SStanding.png", UriKind.RelativeOrAbsolute))
                };
                ImageSet.Add(standing);

                Image punch = new Image
                {
                    Source = new BitmapImage(new Uri($"ms-appx:///Assets/Characters/Scorpion/Player2Poses/SPunch.png", UriKind.RelativeOrAbsolute))
                };
                ImageSet.Add(punch);

                Image highKick = new Image
                {
                    Source = new BitmapImage(new Uri($"ms-appx:///Assets/Characters/Scorpion/Player2Poses/SHighKick.png", UriKind.RelativeOrAbsolute))
                };
                ImageSet.Add(highKick);

                Image lowKick = new Image
                {
                    Source = new BitmapImage(new Uri($"ms-appx:///Assets/Characters/Scorpion/Player2Poses/SLowKick.png", UriKind.RelativeOrAbsolute))
                };
                ImageSet.Add(lowKick);

                Image bonus = new Image
                {
                    Source = new BitmapImage(new Uri($"ms-appx:///Assets/Characters/Scorpion/Player2Poses/SBonus.png", UriKind.RelativeOrAbsolute))
                };
                ImageSet.Add(bonus);
            }
        }