Пример #1
0
 internal JoystickDevice(int id, int axes, int buttons)
 {
     if (axes < 0)
     throw new ArgumentOutOfRangeException("axes");
       if (buttons < 0)
     throw new ArgumentOutOfRangeException("buttons");
       this.Id = id;
       this.axis_collection = new JoystickAxisCollection(axes);
       this.button_collection = new JoystickButtonCollection(buttons);
 }
Пример #2
0
 internal JoystickDevice(int id, int axes, int buttons)
 {
     if (axes < 0)
     {
         throw new ArgumentOutOfRangeException("axes");
     }
     if (buttons < 0)
     {
         throw new ArgumentOutOfRangeException("buttons");
     }
     Id = id;
     axis_collection   = new JoystickAxisCollection(axes);
     button_collection = new JoystickButtonCollection(buttons);
 }
Пример #3
0
        internal JoystickDevice(int id, int axes, int buttons)
        {
            if (axes < 0)
            {
                throw new ArgumentOutOfRangeException(nameof(axes));
            }

            if (buttons < 0)
            {
                throw new ArgumentOutOfRangeException(nameof(buttons));
            }

            Id     = id;
            Axis   = new JoystickAxisCollection(axes);
            Button = new JoystickButtonCollection(buttons);
        }