Ejemplo n.º 1
0
 /// <summary>
 /// Initializes a new instance of the <see cref="VirtualButton" /> class.
 /// </summary>
 /// <param name="name">The name.</param>
 /// <param name="type">The type.</param>
 /// <param name="id">The id.</param>
 /// <param name="isPositiveAndNegative">if set to <c>true</c> [is positive and negative].</param>
 private VirtualButton(string name, VirtualButtonType type, int id, bool isPositiveAndNegative = false)
 {
     Id   = (int)type | id;
     Name = name;
     Type = type;
     IsPositiveAndNegative = isPositiveAndNegative;
 }
Ejemplo n.º 2
0
 /// <summary>
 /// Initializes a new instance of the <see cref="VirtualButton" /> class.
 /// </summary>
 /// <param name="name">The name.</param>
 /// <param name="type">The type.</param>
 /// <param name="id">The id.</param>
 /// <param name="isPositiveAndNegative">if set to <c>true</c> [is positive and negative].</param>
 private VirtualButton(string name, VirtualButtonType type, int id, bool isPositiveAndNegative = false)
 {
     Id = (int)type | id;
     Name = name;
     Type = type;
     IsPositiveAndNegative = isPositiveAndNegative;
 }
Ejemplo n.º 3
0
 /// <summary>
 ///   Initializes a new instance of the <see cref="VirtualButton" /> class.
 /// </summary>
 /// <param name="shortName">The short name of the button.</param>
 /// <param name="type">The type of virtual button.</param>
 /// <param name="id">The unique id of the button.</param>
 /// <param name="isPositiveAndNegative"><c>true</c> if the value of the buttton can be positive and negative.</param>
 protected VirtualButton(string shortName, VirtualButtonType type, int id, bool isPositiveAndNegative = false)
 {
     Id                    = (int)type | id;
     Type                  = type;
     ShortName             = shortName;
     IsPositiveAndNegative = isPositiveAndNegative;
     Index                 = Id & TypeIdMask;
 }
Ejemplo n.º 4
0
        private void OnDeserialized(StreamingContext context)
        {
            if (telemetry != -1)
            {
                Tie = true;
            }

            if (id == "prev_page")
            {
                Action = VirtualButtonType.PreviousPage;
            }

            if (id == "next_page")
            {
                Action = VirtualButtonType.NextPage;
            }

            icon = System.Net.WebUtility.HtmlDecode(icon);
        }
Ejemplo n.º 5
0
 private GamePad(string name, VirtualButtonType type, int id, bool isPositiveAndNegative = false) : base(name, type, id, isPositiveAndNegative)
 {
     PadIndex = -1;
 }
Ejemplo n.º 6
0
 private Keyboard(string name, VirtualButtonType type, int id, bool isPositiveAndNegative = false)
     : base(name, type, id, isPositiveAndNegative)
 {
 }
Ejemplo n.º 7
0
 private Mouse(string name, VirtualButtonType type, int id, bool isPositiveAndNegative = false) : base(name, type, id, isPositiveAndNegative)
 {
 }
Ejemplo n.º 8
0
 private GamePad(string name, VirtualButtonType type, int id, bool isPositiveAndNegative = false) : base(name, type, id, isPositiveAndNegative)
 {
     PadIndex = -1;
 }