Пример #1
0
 public GameContent(Game game, uint id, MediaTypeEnum content, QualityEnum quality, AngleEnum angle)
 {
     Id      = new ContentId(id);
     Game    = game;
     Content = content;
     Quality = quality;
     Angle   = angle;
 }
Пример #2
0
        public static string Abbreviation(this AngleEnum unitEnum)
        {
            switch (unitEnum)
            {
            case AngleEnum.Degrees: return("degrees");

            case AngleEnum.Radians: return("radians");

            default: throw new ArgumentOutOfRangeException(nameof(unitEnum), unitEnum, null);
            }
        }
Пример #3
0
        public static double ConversionFactor(this AngleEnum unitEnum)
        {
            switch (unitEnum)
            {
            case AngleEnum.Degrees: return(1);

            case AngleEnum.Radians: return(57.2957795131);

            default: throw new ArgumentOutOfRangeException(nameof(unitEnum), unitEnum, null);
            }
        }
Пример #4
0
        static private Point[] GetPointsByAngle(AngleEnum triangleAngle, Rectangle position)
        {
            switch (triangleAngle)
            {
            case AngleEnum.TopLeft:
                return(new Point[3] {
                    new Point(position.Left, position.Top),
                    new Point(position.Right, position.Top),
                    new Point(position.Left, position.Bottom)
                });

            case AngleEnum.TopCenter:
                return(new Point[3] {
                    new Point(position.Left + (position.Width / 2), position.Top),
                    new Point(position.Left, position.Bottom),
                    new Point(position.Right, position.Bottom)
                });

            case AngleEnum.TopRight:
                return(new Point[3] {
                    new Point(position.Left, position.Top),
                    new Point(position.Right, position.Top),
                    new Point(position.Right, position.Bottom)
                });

            case AngleEnum.BottomLeft:
                return(new Point[3] {
                    new Point(position.Left, position.Top),
                    new Point(position.Left, position.Bottom),
                    new Point(position.Right, position.Bottom)
                });

            case AngleEnum.BottomCenter:
                return(new Point[3] {
                    new Point(position.Left, position.Top),
                    new Point(position.Right, position.Top),
                    new Point(position.Left + (position.Width / 2), position.Bottom)
                });

            case AngleEnum.BottomRight:
                return(new Point[3] {
                    new Point(position.Right, position.Top),
                    new Point(position.Left, position.Bottom),
                    new Point(position.Right, position.Bottom)
                });

            default:
                throw EnumNotImplementedException.Throw(triangleAngle,
                                                        ExceptionMessages.MSG_NOT_YET_IMPLEMENTED);
            }
        }
Пример #5
0
 AngleType(AngleEnum unitEnum)
 {
     UnitEnum = unitEnum;
 }
Пример #6
0
 public VideoAccess(QualityEnum quality, AngleEnum angle, Range <uint> bitRate)
 {
     Quality = quality; Angle = angle; BitRate = bitRate;
 }
Пример #7
0
 public void IncrementAngle()
 {
     Angle = (AngleEnum)Utils.WrapIncrement(Angle, 1, 0, AngleEnum.Length);
 }
Пример #8
0
 public Triangle(int x, int y, int width, int height, Color color, AngleEnum angle)
     : base(x, y, width, height, color)
 {
     this.Angle = angle;
 }