implemented class stubs of Storage Namespace
fixed signature of KeyboardState fixed signature of GamePadButtons and optimized a little bit (for frequently used properties it is now cheaper to check state) fixed signature of GamePadDPad and made it the same style as GamePadButtons fixed signature of GamePadTriggers fixed signature of GamePadCapabilities fixed signature of GamePadState
This commit is contained in:
parent
d3ddc5b463
commit
9695acd2e3
@ -332,6 +332,9 @@
|
||||
<Compile Include="Quaternion.cs" />
|
||||
<Compile Include="Ray.cs" />
|
||||
<Compile Include="Rectangle.cs" />
|
||||
<Compile Include="Storage\StorageContainer.cs" />
|
||||
<Compile Include="Storage\StorageDevice.cs" />
|
||||
<Compile Include="Storage\StorageDeviceNotConnectedException.cs" />
|
||||
<Compile Include="TitleContainer.cs" />
|
||||
<Compile Include="Vector2.cs" />
|
||||
<Compile Include="Vector3.cs" />
|
||||
@ -340,7 +343,6 @@
|
||||
<ItemGroup>
|
||||
<Folder Include="Content\MediaTypeReaders\" />
|
||||
<Folder Include="Design\" />
|
||||
<Folder Include="Storage\" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
|
||||
|
@ -56,21 +56,70 @@ namespace ANX.Framework.Input
|
||||
{
|
||||
public struct GamePadButtons
|
||||
{
|
||||
private int buttons;
|
||||
public GamePadButtons (int value)
|
||||
{
|
||||
this.buttons = value;
|
||||
}
|
||||
#region Private Members
|
||||
internal Buttons buttonValue;
|
||||
|
||||
internal ButtonState button_a;
|
||||
internal ButtonState button_b;
|
||||
internal ButtonState button_x;
|
||||
internal ButtonState button_y;
|
||||
internal ButtonState stick_left;
|
||||
internal ButtonState stick_right;
|
||||
internal ButtonState shoulder_left;
|
||||
internal ButtonState shoulder_right;
|
||||
internal ButtonState button_back;
|
||||
internal ButtonState button_start;
|
||||
internal ButtonState button_big;
|
||||
|
||||
#endregion // Private Members
|
||||
|
||||
public GamePadButtons(Buttons buttons)
|
||||
{
|
||||
this.buttons = (int)buttons;
|
||||
this.button_a = GetButtonState(buttons, Buttons.A);
|
||||
this.button_b = GetButtonState(buttons, Buttons.B);
|
||||
this.button_x = GetButtonState(buttons, Buttons.X);
|
||||
this.button_y = GetButtonState(buttons, Buttons.Y);
|
||||
this.stick_left = GetButtonState(buttons, Buttons.LeftStick);
|
||||
this.stick_right = GetButtonState(buttons, Buttons.RightStick);
|
||||
this.shoulder_left = GetButtonState(buttons, Buttons.LeftShoulder);
|
||||
this.shoulder_right = GetButtonState(buttons, Buttons.RightShoulder);
|
||||
this.button_back = GetButtonState(buttons, Buttons.Back);
|
||||
this.button_start = GetButtonState(buttons, Buttons.Start);
|
||||
this.button_big = GetButtonState(buttons, Buttons.BigButton);
|
||||
|
||||
this.buttonValue = buttons;
|
||||
}
|
||||
|
||||
public override bool Equals(object obj)
|
||||
{
|
||||
if (obj != null && obj.GetType() == typeof(GamePadButtons))
|
||||
{
|
||||
return this == (GamePadButtons)obj;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
public static bool operator ==(GamePadButtons lhs, GamePadButtons rhs)
|
||||
{
|
||||
return lhs.buttonValue == rhs.buttonValue;
|
||||
}
|
||||
|
||||
public static bool operator !=(GamePadButtons lhs, GamePadButtons rhs)
|
||||
{
|
||||
return lhs.buttonValue != rhs.buttonValue;
|
||||
}
|
||||
|
||||
private static ButtonState GetButtonState(Buttons buttons, Buttons button)
|
||||
{
|
||||
return (buttons & button) == button ? ButtonState.Pressed : ButtonState.Released;
|
||||
}
|
||||
|
||||
public ButtonState A
|
||||
{
|
||||
get
|
||||
{
|
||||
if ((this.buttons & (int)Buttons.A) == (int)Buttons.A) return ButtonState.Pressed;
|
||||
else return ButtonState.Released;
|
||||
return this.button_a;
|
||||
}
|
||||
}
|
||||
|
||||
@ -78,8 +127,7 @@ namespace ANX.Framework.Input
|
||||
{
|
||||
get
|
||||
{
|
||||
if ((this.buttons & (int)Buttons.B) == (int)Buttons.B) return ButtonState.Pressed;
|
||||
else return ButtonState.Released;
|
||||
return this.button_b;
|
||||
}
|
||||
}
|
||||
|
||||
@ -87,8 +135,7 @@ namespace ANX.Framework.Input
|
||||
{
|
||||
get
|
||||
{
|
||||
if ((this.buttons & (int)Buttons.Back) == (int)Buttons.Back) return ButtonState.Pressed;
|
||||
else return ButtonState.Released;
|
||||
return this.button_back;
|
||||
}
|
||||
}
|
||||
|
||||
@ -96,8 +143,7 @@ namespace ANX.Framework.Input
|
||||
{
|
||||
get
|
||||
{
|
||||
if ((this.buttons & (int)Buttons.BigButton) == (int)Buttons.BigButton) return ButtonState.Pressed;
|
||||
else return ButtonState.Released;
|
||||
return this.button_big;
|
||||
}
|
||||
}
|
||||
|
||||
@ -105,8 +151,7 @@ namespace ANX.Framework.Input
|
||||
{
|
||||
get
|
||||
{
|
||||
if ((this.buttons & (int)Buttons.LeftShoulder) == (int)Buttons.LeftShoulder) return ButtonState.Pressed;
|
||||
else return ButtonState.Released;
|
||||
return this.shoulder_left;
|
||||
}
|
||||
}
|
||||
|
||||
@ -114,8 +159,7 @@ namespace ANX.Framework.Input
|
||||
{
|
||||
get
|
||||
{
|
||||
if ((this.buttons & (int)Buttons.LeftStick) == (int)Buttons.LeftStick) return ButtonState.Pressed;
|
||||
else return ButtonState.Released;
|
||||
return stick_left;
|
||||
}
|
||||
}
|
||||
|
||||
@ -123,8 +167,7 @@ namespace ANX.Framework.Input
|
||||
{
|
||||
get
|
||||
{
|
||||
if ((this.buttons & (int)Buttons.RightShoulder) == (int)Buttons.RightShoulder) return ButtonState.Pressed;
|
||||
else return ButtonState.Released;
|
||||
return this.shoulder_right;
|
||||
}
|
||||
}
|
||||
|
||||
@ -132,8 +175,7 @@ namespace ANX.Framework.Input
|
||||
{
|
||||
get
|
||||
{
|
||||
if ((this.buttons & (int)Buttons.RightStick) == (int)Buttons.RightStick) return ButtonState.Pressed;
|
||||
else return ButtonState.Released;
|
||||
return this.stick_right;
|
||||
}
|
||||
}
|
||||
|
||||
@ -141,8 +183,7 @@ namespace ANX.Framework.Input
|
||||
{
|
||||
get
|
||||
{
|
||||
if ((this.buttons & (int)Buttons.Start) == (int)Buttons.Start) return ButtonState.Pressed;
|
||||
else return ButtonState.Released;
|
||||
return this.button_start;
|
||||
}
|
||||
}
|
||||
|
||||
@ -150,8 +191,7 @@ namespace ANX.Framework.Input
|
||||
{
|
||||
get
|
||||
{
|
||||
if ((this.buttons & (int)Buttons.X) == (int)Buttons.X) return ButtonState.Pressed;
|
||||
else return ButtonState.Released;
|
||||
return this.button_x;
|
||||
}
|
||||
}
|
||||
|
||||
@ -159,71 +199,45 @@ namespace ANX.Framework.Input
|
||||
{
|
||||
get
|
||||
{
|
||||
if ((this.buttons & (int)Buttons.Y) == (int)Buttons.Y) return ButtonState.Pressed;
|
||||
else return ButtonState.Released;
|
||||
return this.button_y;
|
||||
}
|
||||
}
|
||||
|
||||
public override bool Equals(object obj)
|
||||
{
|
||||
if (obj is GamePadButtons)
|
||||
{
|
||||
return this == (GamePadButtons)obj;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
public static bool operator ==(GamePadButtons left, GamePadButtons right)
|
||||
{
|
||||
return left.X == right.X &&
|
||||
left.Y == right.Y &&
|
||||
left.A == right.A &&
|
||||
left.B == right.B &&
|
||||
left.Back == right.Back &&
|
||||
left.BigButton == right.BigButton &&
|
||||
left.LeftShoulder == right.LeftShoulder &&
|
||||
left.LeftStick == right.LeftStick &&
|
||||
left.RightShoulder == right.RightShoulder &&
|
||||
left.RightStick == right.RightStick &&
|
||||
left.Start == right.Start;
|
||||
}
|
||||
|
||||
public static bool operator !=(GamePadButtons left, GamePadButtons right)
|
||||
{
|
||||
return left.X != right.X ||
|
||||
left.Y != right.Y ||
|
||||
left.A != right.A ||
|
||||
left.B != right.B ||
|
||||
left.Back != right.Back ||
|
||||
left.BigButton != right.BigButton ||
|
||||
left.LeftShoulder != right.LeftShoulder ||
|
||||
left.LeftStick != right.LeftStick ||
|
||||
left.RightShoulder != right.RightShoulder ||
|
||||
left.RightStick != right.RightStick ||
|
||||
left.Start != right.Start;
|
||||
}
|
||||
public override int GetHashCode()
|
||||
{
|
||||
return (((((((((A.GetHashCode() ^ B.GetHashCode()) ^ Back.GetHashCode()) ^ BigButton.GetHashCode()) ^ LeftShoulder.GetHashCode()) ^ LeftStick.GetHashCode()) ^ RightShoulder.GetHashCode()) ^ RightStick.GetHashCode()) ^ Start.GetHashCode()) ^ X.GetHashCode()) ^ Y.GetHashCode();
|
||||
return (int)this.buttonValue;
|
||||
}
|
||||
|
||||
public override string ToString()
|
||||
{
|
||||
string buttons = String.Empty;
|
||||
String buttons = String.Empty;
|
||||
|
||||
buttons += A == ButtonState.Pressed ? "A" : "";
|
||||
buttons += B == ButtonState.Pressed ? (buttons.Length > 0 ? " " : "") + "B" : "";
|
||||
buttons += Back == ButtonState.Pressed ? (buttons.Length > 0 ? " " : "") + "Back" : "";
|
||||
buttons += BigButton == ButtonState.Pressed ? (buttons.Length > 0 ? " " : "") + "BigButton" : "";
|
||||
buttons += LeftShoulder == ButtonState.Pressed ? (buttons.Length > 0 ? " " : "") + "LeftShoulder" : "";
|
||||
buttons += LeftStick == ButtonState.Pressed ? (buttons.Length > 0 ? " " : "") + "LeftStick" : "";
|
||||
buttons += RightShoulder == ButtonState.Pressed ? (buttons.Length > 0 ? " " : "") + "RightShoulder" : "";
|
||||
buttons += RightStick == ButtonState.Pressed ? (buttons.Length > 0 ? " " : "") + "RightStick" : "";
|
||||
buttons += Start == ButtonState.Pressed ? (buttons.Length > 0 ? " " : "") + "Start" : "";
|
||||
buttons += X == ButtonState.Pressed ? (buttons.Length > 0 ? " " : "") + "X" : "";
|
||||
buttons += Y == ButtonState.Pressed ? (buttons.Length > 0 ? " " : "") + "Y" : "";
|
||||
buttons += this.button_a == ButtonState.Pressed ? (buttons.Length > 0 ? " " : "") + "A" : "";
|
||||
buttons += this.button_b == ButtonState.Pressed ? (buttons.Length > 0 ? " " : "") + "B" : "";
|
||||
buttons += this.button_x == ButtonState.Pressed ? (buttons.Length > 0 ? " " : "") + "X" : "";
|
||||
buttons += this.button_y == ButtonState.Pressed ? (buttons.Length > 0 ? " " : "") + "Y" : "";
|
||||
buttons += this.stick_left == ButtonState.Pressed ? (buttons.Length > 0 ? " " : "") + "LeftStick" : "";
|
||||
buttons += this.stick_right == ButtonState.Pressed ? (buttons.Length > 0 ? " " : "") + "RightStick" : "";
|
||||
buttons += this.shoulder_left == ButtonState.Pressed ? (buttons.Length > 0 ? " " : "") + "LeftShoulder" : "";
|
||||
buttons += this.shoulder_right == ButtonState.Pressed ? (buttons.Length > 0 ? " " : "") + "RightShoulder" : "";
|
||||
buttons += this.button_start == ButtonState.Pressed ? (buttons.Length > 0 ? " " : "") + "Start" : "";
|
||||
buttons += this.button_back == ButtonState.Pressed ? (buttons.Length > 0 ? " " : "") + "Back" : "";
|
||||
buttons += this.button_big == ButtonState.Pressed ? (buttons.Length > 0 ? " " : "") + "BigButton" : "";
|
||||
|
||||
return buttons;
|
||||
if (string.IsNullOrEmpty(buttons))
|
||||
{
|
||||
buttons = "None";
|
||||
}
|
||||
|
||||
return String.Format("{{Buttons:{0}}}", buttons);
|
||||
}
|
||||
|
||||
internal Buttons Buttons
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.buttonValue;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -56,33 +56,6 @@ namespace ANX.Framework.Input
|
||||
{
|
||||
public struct GamePadCapabilities
|
||||
{
|
||||
private GamePadType gamePadType;
|
||||
private bool hasAButton;
|
||||
private bool hasBackButton;
|
||||
private bool hasBButton;
|
||||
private bool hasBigButton;
|
||||
private bool hasDPadDownButton;
|
||||
private bool hasDPadLeftButton;
|
||||
private bool hasDPadRightButton;
|
||||
private bool hasDPadUpButton;
|
||||
private bool hasLeftShoulderButton;
|
||||
private bool hasLeftStickButton;
|
||||
private bool hasLeftTrigger;
|
||||
private bool hasLeftVibrationMotor;
|
||||
private bool hasLeftXThumbStick;
|
||||
private bool hasLeftYThumbStick;
|
||||
private bool hasRightShoulderButton;
|
||||
private bool hasRightStickButton;
|
||||
private bool hasRightVibrationMotor;
|
||||
private bool hasRightTrigger;
|
||||
private bool hasRightXThumbStick;
|
||||
private bool hasRightYThumbStick;
|
||||
private bool hasStartButton;
|
||||
private bool hasVoiceSupport;
|
||||
private bool hasXButton;
|
||||
private bool hasYButton;
|
||||
private bool isConnected;
|
||||
|
||||
//public GamePadCapabilities(GamePadType gamePadType, bool hasAButton, bool hasBackButton, bool hasBButton, bool hasBigButton, bool hasDPadDownButton, bool hasDPadLeftButton, bool hasDPadRightButton, bool hasDPadUpButton, bool hasLeftShoulderButton, bool hasLeftStickButton, bool hasLeftTrigger, bool hasLeftVibrationMotor, bool hasLeftXThumbStick, bool hasLeftYThumbStick, bool hasRightShoulderButton, bool hasRightStickButton, bool hasRightVibrationMotor, bool hasRightTrigger, bool hasRightXThumbStick, bool hasRightYThumbStick, bool hasStartButton, bool hasVoiceSupport, bool hasXButton, bool hasYButton, bool isConnected)
|
||||
//{
|
||||
// this.gamePadType = gamePadType;
|
||||
@ -113,31 +86,162 @@ namespace ANX.Framework.Input
|
||||
// this.isConnected=isConnected;
|
||||
|
||||
//}
|
||||
//public GamePadType GamePadType { get { return this.gamePadType; } }
|
||||
//public bool HasAButton { get { return this.hasAButton; } }
|
||||
//public bool HasBackButton { get { return this.hasBackButton; } }
|
||||
//public bool HasBButton { get { return this.hasBButton; } }
|
||||
//public bool HasBigButton { get; private set; }
|
||||
//public bool HasDPadDownButton { get; private set; }
|
||||
//public bool HasDPadLeftButton { get; private set; }
|
||||
//public bool HasDPadRightButton { get; private set; }
|
||||
//public bool HasDPadUpButton { get; private set; }
|
||||
//public bool HasLeftShoulderButton { get; private set; }
|
||||
//public bool HasLeftStickButton { get; private set; }
|
||||
//public bool HasLeftTrigger { get; private set; }
|
||||
//public bool HasLeftVibrationMotor { get; private set; }
|
||||
//public bool HasLeftXThumbStick { get; private set; }
|
||||
//public bool HasLeftYThumbStick { get; private set; }
|
||||
//public bool HasRightShoulderButton { get; private set; }
|
||||
//public bool HasRightStickButton { get; private set; }
|
||||
//public bool HasRightVibrationMotor { get; private set; }
|
||||
//public bool HasRightTrigger { get; private set; }
|
||||
//public bool HasRightXThumbStick { get; private set; }
|
||||
//public bool HasRightYThumbStick { get; private set; }
|
||||
//public bool HasStartButton { get; private set; }
|
||||
//public bool HasVoiceSupport { get; private set; }
|
||||
//public bool HasXButton { get; private set; }
|
||||
//public bool HasYButton { get; private set; }
|
||||
//public bool IsConnected { get; private set; }
|
||||
|
||||
public GamePadType GamePadType
|
||||
{
|
||||
get;
|
||||
internal set;
|
||||
}
|
||||
|
||||
public bool HasAButton
|
||||
{
|
||||
get;
|
||||
internal set;
|
||||
|
||||
}
|
||||
|
||||
public bool HasBackButton
|
||||
{
|
||||
get;
|
||||
internal set;
|
||||
}
|
||||
|
||||
public bool HasBButton
|
||||
{
|
||||
get;
|
||||
internal set;
|
||||
}
|
||||
|
||||
public bool HasBigButton
|
||||
{
|
||||
get;
|
||||
internal set;
|
||||
}
|
||||
|
||||
public bool HasDPadDownButton
|
||||
{
|
||||
get;
|
||||
internal set;
|
||||
}
|
||||
|
||||
public bool HasDPadLeftButton
|
||||
{
|
||||
get;
|
||||
internal set;
|
||||
}
|
||||
|
||||
public bool HasDPadRightButton
|
||||
{
|
||||
get;
|
||||
internal set;
|
||||
}
|
||||
|
||||
public bool HasDPadUpButton
|
||||
{
|
||||
get;
|
||||
internal set;
|
||||
}
|
||||
|
||||
public bool HasLeftShoulderButton
|
||||
{
|
||||
get;
|
||||
internal set;
|
||||
}
|
||||
|
||||
public bool HasLeftStickButton
|
||||
{
|
||||
get;
|
||||
internal set;
|
||||
}
|
||||
|
||||
public bool HasLeftTrigger
|
||||
{
|
||||
get;
|
||||
internal set;
|
||||
}
|
||||
|
||||
public bool HasLeftVibrationMotor
|
||||
{
|
||||
get;
|
||||
internal set;
|
||||
}
|
||||
|
||||
public bool HasLeftXThumbStick
|
||||
{
|
||||
get;
|
||||
internal set;
|
||||
}
|
||||
|
||||
public bool HasLeftYThumbStick
|
||||
{
|
||||
get;
|
||||
internal set;
|
||||
}
|
||||
|
||||
public bool HasRightShoulderButton
|
||||
{
|
||||
get;
|
||||
internal set;
|
||||
}
|
||||
|
||||
public bool HasRightStickButton
|
||||
{
|
||||
get;
|
||||
internal set;
|
||||
}
|
||||
|
||||
public bool HasRightVibrationMotor
|
||||
{
|
||||
get;
|
||||
internal set;
|
||||
}
|
||||
|
||||
public bool HasRightTrigger
|
||||
{
|
||||
get;
|
||||
internal set;
|
||||
}
|
||||
|
||||
public bool HasRightXThumbStick
|
||||
{
|
||||
get;
|
||||
internal set;
|
||||
}
|
||||
|
||||
public bool HasRightYThumbStick
|
||||
{
|
||||
get;
|
||||
internal set;
|
||||
}
|
||||
|
||||
public bool HasStartButton
|
||||
{
|
||||
get;
|
||||
internal set;
|
||||
}
|
||||
|
||||
public bool HasVoiceSupport
|
||||
{
|
||||
get;
|
||||
internal set;
|
||||
}
|
||||
|
||||
public bool HasXButton
|
||||
{
|
||||
get;
|
||||
internal set;
|
||||
}
|
||||
|
||||
public bool HasYButton
|
||||
{
|
||||
get;
|
||||
internal set;
|
||||
}
|
||||
|
||||
public bool IsConnected
|
||||
{
|
||||
get;
|
||||
internal set;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -54,48 +54,122 @@ using ANX.Framework.NonXNA;
|
||||
|
||||
namespace ANX.Framework.Input
|
||||
{
|
||||
|
||||
public struct GamePadDPad
|
||||
{
|
||||
int buttons;
|
||||
public GamePadDPad(int value)
|
||||
#region Private Members
|
||||
private Buttons buttons;
|
||||
|
||||
private ButtonState up;
|
||||
private ButtonState down;
|
||||
private ButtonState left;
|
||||
private ButtonState right;
|
||||
|
||||
#endregion // Private Members
|
||||
|
||||
public GamePadDPad(ButtonState upValue, ButtonState downValue, ButtonState leftValue, ButtonState rightValue)
|
||||
{
|
||||
buttons = value;
|
||||
this.up = upValue;
|
||||
this.down = downValue;
|
||||
this.left = leftValue;
|
||||
this.right = rightValue;
|
||||
|
||||
buttons = 0;
|
||||
buttons |= (upValue == ButtonState.Pressed ? Buttons.DPadUp : 0);
|
||||
buttons |= (downValue == ButtonState.Pressed ? Buttons.DPadDown : 0);
|
||||
buttons |= (leftValue == ButtonState.Pressed ? Buttons.DPadLeft : 0);
|
||||
buttons |= (rightValue == ButtonState.Pressed ? Buttons.DPadRight : 0);
|
||||
}
|
||||
|
||||
internal GamePadDPad(Buttons buttons)
|
||||
{
|
||||
this.buttons = buttons;
|
||||
|
||||
this.up = (buttons & Buttons.DPadUp) == Buttons.DPadUp ? ButtonState.Pressed : ButtonState.Released;
|
||||
this.left = (buttons & Buttons.DPadLeft) == Buttons.DPadLeft ? ButtonState.Pressed : ButtonState.Released;
|
||||
this.down = (buttons & Buttons.DPadDown) == Buttons.DPadDown ? ButtonState.Pressed : ButtonState.Released;
|
||||
this.right = (buttons & Buttons.DPadRight) == Buttons.DPadRight ? ButtonState.Pressed : ButtonState.Released;
|
||||
}
|
||||
|
||||
//The Stats look for the Flags from the Buttons.cs file
|
||||
public ButtonState Down
|
||||
{
|
||||
get
|
||||
{
|
||||
if ((this.buttons & (int)Buttons.DPadDown) == (int)Buttons.DPadDown) return ButtonState.Pressed;
|
||||
else return ButtonState.Released;
|
||||
return down;
|
||||
}
|
||||
}
|
||||
|
||||
public ButtonState Left
|
||||
{
|
||||
get
|
||||
{
|
||||
if ((this.buttons & (int)Buttons.DPadLeft) == (int)Buttons.DPadLeft) return ButtonState.Pressed;
|
||||
else return ButtonState.Released;
|
||||
return left;
|
||||
}
|
||||
}
|
||||
|
||||
public ButtonState Right
|
||||
{
|
||||
get
|
||||
{
|
||||
if ((this.buttons & (int)Buttons.DPadRight) == (int)Buttons.DPadRight) return ButtonState.Pressed;
|
||||
else return ButtonState.Released;
|
||||
return right;
|
||||
}
|
||||
}
|
||||
|
||||
public ButtonState Up
|
||||
{
|
||||
get
|
||||
{
|
||||
if ((this.buttons & (int)Buttons.DPadUp) == (int)Buttons.DPadUp) return ButtonState.Pressed;
|
||||
else return ButtonState.Released;
|
||||
return up;
|
||||
}
|
||||
}
|
||||
|
||||
public override int GetHashCode()
|
||||
{
|
||||
return (int)buttons;
|
||||
}
|
||||
|
||||
public override string ToString()
|
||||
{
|
||||
String buttons = String.Empty;
|
||||
|
||||
buttons += this.up == ButtonState.Pressed ? (buttons.Length > 0 ? " " : "") + "Up" : "";
|
||||
buttons += this.left == ButtonState.Pressed ? (buttons.Length > 0 ? " " : "") + "Left" : "";
|
||||
buttons += this.down == ButtonState.Pressed ? (buttons.Length > 0 ? " " : "") + "Down" : "";
|
||||
buttons += this.right == ButtonState.Pressed ? (buttons.Length > 0 ? " " : "") + "Right" : "";
|
||||
|
||||
if (String.IsNullOrEmpty(buttons))
|
||||
{
|
||||
buttons = "None";
|
||||
}
|
||||
|
||||
return String.Format("{{DPad:{0}}}", buttons);
|
||||
}
|
||||
|
||||
public override bool Equals(object obj)
|
||||
{
|
||||
if (obj != null && obj.GetType() == typeof(GamePadDPad))
|
||||
{
|
||||
return this == (GamePadDPad)obj;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
public static bool operator ==(GamePadDPad lhs, GamePadDPad rhs)
|
||||
{
|
||||
return lhs.buttons == rhs.buttons;
|
||||
}
|
||||
|
||||
public static bool operator !=(GamePadDPad lhs, GamePadDPad rhs)
|
||||
{
|
||||
return lhs.buttons != rhs.buttons;
|
||||
}
|
||||
|
||||
internal Buttons Buttons
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.buttons;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -56,30 +56,107 @@ namespace ANX.Framework.Input
|
||||
{
|
||||
public struct GamePadState
|
||||
{
|
||||
private int buttonsValue;
|
||||
#region Private Members
|
||||
private GamePadThumbSticks thumbSticks;
|
||||
private GamePadTriggers triggers;
|
||||
private GamePadButtons buttons;
|
||||
private GamePadDPad dPad;
|
||||
private bool isConnected ;
|
||||
private int packetNumber ;
|
||||
private GamePadThumbSticks thumbSticks;
|
||||
private GamePadTriggers triggers ;
|
||||
public GamePadState(int value, bool isConnected, int packetNumber,Vector2 thumbStickLeft, Vector2 thumbStickRight, float triggerLeft, float triggerRight)
|
||||
|
||||
private Buttons buttonsValue;
|
||||
|
||||
//private bool isConnected ;
|
||||
//private int packetNumber ;
|
||||
|
||||
#endregion // Private Members
|
||||
|
||||
public GamePadState(GamePadThumbSticks thumbSticks, GamePadTriggers triggers, GamePadButtons buttons, GamePadDPad dPad)
|
||||
{
|
||||
this.buttonsValue = value;
|
||||
this.buttons = new GamePadButtons(value);
|
||||
this.dPad = new GamePadDPad(value);
|
||||
this.isConnected = isConnected;
|
||||
this.packetNumber = packetNumber;
|
||||
this.thumbSticks = new GamePadThumbSticks(thumbStickLeft, thumbStickRight);
|
||||
this.triggers = new GamePadTriggers(triggerLeft, triggerRight);
|
||||
this.thumbSticks = thumbSticks;
|
||||
this.triggers = triggers;
|
||||
this.buttons = buttons;
|
||||
this.dPad = dPad;
|
||||
|
||||
this.buttonsValue = this.buttons.Buttons | this.dPad.Buttons;
|
||||
}
|
||||
|
||||
public bool IsButtonDown(Buttons button) { return ((this.buttonsValue & (int)button) == (int)button); }
|
||||
public bool IsButtonUp(Buttons button) { return ((this.buttonsValue & (int)button) != (int)button); }
|
||||
public GamePadState(Vector2 leftThumbStick, Vector2 rightThumbStick, float leftTrigger, float rightTrigger, params Buttons[] buttons)
|
||||
{
|
||||
this.thumbSticks = new GamePadThumbSticks(leftThumbStick, rightThumbStick);
|
||||
this.triggers = new GamePadTriggers(leftTrigger, rightTrigger);
|
||||
|
||||
Buttons buttonField = 0;
|
||||
for (int i = 0; i < buttons.Length; i++)
|
||||
{
|
||||
buttonField |= buttons[i];
|
||||
}
|
||||
this.buttonsValue = buttonField;
|
||||
|
||||
this.buttons = new GamePadButtons(this.buttonsValue);
|
||||
this.dPad = new GamePadDPad(this.buttonsValue);
|
||||
}
|
||||
|
||||
//public GamePadState(int value, bool isConnected, int packetNumber, Vector2 thumbStickLeft, Vector2 thumbStickRight, float triggerLeft, float triggerRight)
|
||||
//{
|
||||
// this.buttonsValue = value;
|
||||
// //TODO: this.buttons = new GamePadButtons(value);
|
||||
// this.dPad = new GamePadDPad(value);
|
||||
// this.isConnected = isConnected;
|
||||
// this.packetNumber = packetNumber;
|
||||
// this.thumbSticks = new GamePadThumbSticks(thumbStickLeft, thumbStickRight);
|
||||
// this.triggers = new GamePadTriggers(triggerLeft, triggerRight);
|
||||
//}
|
||||
|
||||
public override bool Equals(object obj)
|
||||
{
|
||||
if (obj != null && obj.GetType() == typeof(GamePadState))
|
||||
{
|
||||
return this == (GamePadState)obj;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
public static bool operator ==(GamePadState lhs, GamePadState rhs)
|
||||
{
|
||||
return lhs.buttonsValue == rhs.buttonsValue;
|
||||
}
|
||||
|
||||
public static bool operator !=(GamePadState lhs, GamePadState rhs)
|
||||
{
|
||||
return lhs.buttonsValue != rhs.buttonsValue;
|
||||
}
|
||||
|
||||
public override int GetHashCode()
|
||||
{
|
||||
return (int)buttonsValue;
|
||||
}
|
||||
|
||||
public override string ToString()
|
||||
{
|
||||
return String.Format("{{IsConnected:{0}}}", IsConnected);
|
||||
}
|
||||
|
||||
public bool IsButtonDown(Buttons button) { return ((this.buttonsValue & button) == button); }
|
||||
public bool IsButtonUp(Buttons button) { return ((this.buttonsValue & button) != button); }
|
||||
public GamePadButtons Buttons { get { return this.buttons; } }
|
||||
public GamePadDPad DPad { get { return this.dPad; } }
|
||||
public bool IsConnected { get { return this.isConnected; } }
|
||||
public int PacketNumber { get { return this.packetNumber; } }
|
||||
|
||||
public bool IsConnected
|
||||
{
|
||||
get
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
}
|
||||
|
||||
public int PacketNumber
|
||||
{
|
||||
get
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
}
|
||||
|
||||
public GamePadThumbSticks ThumbSticks { get { return this.thumbSticks; } }
|
||||
public GamePadTriggers Triggers { get { return this.triggers; } }
|
||||
|
||||
|
@ -52,19 +52,52 @@ using ANX.Framework.NonXNA;
|
||||
|
||||
#endregion // License
|
||||
|
||||
|
||||
namespace ANX.Framework.Input
|
||||
{
|
||||
public struct GamePadThumbSticks
|
||||
{
|
||||
#region Private Members
|
||||
private Vector2 left;
|
||||
private Vector2 right;
|
||||
|
||||
#endregion // Private Members
|
||||
|
||||
public GamePadThumbSticks (Vector2 leftThumbstick, Vector2 rightThumbstick)
|
||||
{
|
||||
this.left = leftThumbstick;
|
||||
this.right = rightThumbstick;
|
||||
this.left = Vector2.Clamp(leftThumbstick, -Vector2.One, Vector2.One);
|
||||
this.right = Vector2.Clamp(rightThumbstick, -Vector2.One, Vector2.One);
|
||||
}
|
||||
|
||||
public override bool Equals(object obj)
|
||||
{
|
||||
if (obj != null && obj.GetType() == typeof(GamePadThumbSticks))
|
||||
{
|
||||
return this == (GamePadThumbSticks)obj;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
public static bool operator ==(GamePadThumbSticks lhs, GamePadThumbSticks rhs)
|
||||
{
|
||||
return lhs.left == rhs.left && lhs.right == rhs.right;
|
||||
}
|
||||
|
||||
public static bool operator !=(GamePadThumbSticks lhs, GamePadThumbSticks rhs)
|
||||
{
|
||||
return lhs.left != rhs.left || lhs.right != rhs.right;
|
||||
}
|
||||
|
||||
public override int GetHashCode()
|
||||
{
|
||||
return this.left.GetHashCode() ^ this.right.GetHashCode();
|
||||
}
|
||||
|
||||
public override string ToString()
|
||||
{
|
||||
return String.Format("{{Left:{0} Right:{1}}}", left, right);
|
||||
}
|
||||
|
||||
public Vector2 Left { get { return this.left; } }
|
||||
public Vector2 Right { get { return this.right; } }
|
||||
|
||||
|
@ -56,13 +56,48 @@ namespace ANX.Framework.Input
|
||||
{
|
||||
public struct GamePadTriggers
|
||||
{
|
||||
#region Private Members
|
||||
private float left;
|
||||
private float right;
|
||||
|
||||
#endregion // Private Members
|
||||
|
||||
public GamePadTriggers (float leftTrigger,float rightTrigger)
|
||||
{
|
||||
left = leftTrigger;
|
||||
right = rightTrigger;
|
||||
}
|
||||
|
||||
public override int GetHashCode()
|
||||
{
|
||||
return left.GetHashCode() ^ right.GetHashCode();
|
||||
}
|
||||
|
||||
public override string ToString()
|
||||
{
|
||||
return String.Format("{{Left:{0} Right:{1}}}", left, right);
|
||||
}
|
||||
|
||||
public override bool Equals(object obj)
|
||||
{
|
||||
if (obj != null && obj.GetType() == typeof(GamePadTriggers))
|
||||
{
|
||||
return this == (GamePadTriggers)obj;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
public static bool operator ==(GamePadTriggers lhs, GamePadTriggers rhs)
|
||||
{
|
||||
return lhs.left == rhs.left && lhs.right == rhs.right;
|
||||
}
|
||||
|
||||
public static bool operator !=(GamePadTriggers lhs, GamePadTriggers rhs)
|
||||
{
|
||||
return lhs.left != rhs.left || lhs.right != rhs.right;
|
||||
}
|
||||
|
||||
public float Left { get { return this.left; } }
|
||||
public float Right { get { return this.right; } }
|
||||
|
||||
|
@ -1,5 +1,6 @@
|
||||
#region Using Statements
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
#endregion // Using Statements
|
||||
|
||||
@ -54,6 +55,113 @@ namespace ANX.Framework.Input
|
||||
{
|
||||
public struct KeyboardState
|
||||
{
|
||||
#region Private Members
|
||||
private KeyState[] keyState;
|
||||
private List<Keys> pressedKeys;
|
||||
|
||||
#endregion // Private Members
|
||||
|
||||
public KeyboardState(Keys[] keys)
|
||||
{
|
||||
pressedKeys = new List<Keys>();
|
||||
pressedKeys.AddRange(keys);
|
||||
|
||||
keyState = new KeyState[255];
|
||||
keyState.Initialize();
|
||||
|
||||
for (int i = 0; i < keys.Length; i++)
|
||||
{
|
||||
keyState[(int)keys[i]] = KeyState.Down;
|
||||
}
|
||||
}
|
||||
|
||||
public bool IsKeyDown(Keys key)
|
||||
{
|
||||
return keyState[(int)key] == KeyState.Down;
|
||||
}
|
||||
|
||||
public bool IsKeyUp(Keys key)
|
||||
{
|
||||
return keyState[(int)key] == KeyState.Up;
|
||||
}
|
||||
|
||||
public override int GetHashCode()
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
public override bool Equals(object obj)
|
||||
{
|
||||
if (obj != null && obj.GetType() == typeof(KeyboardState))
|
||||
{
|
||||
KeyboardState other = (KeyboardState)obj;
|
||||
|
||||
if (keyState.Length != other.keyState.Length)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
for (int i = 0; i < keyState.Length; i++)
|
||||
{
|
||||
if (this.keyState[i] != other.keyState[i])
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
public static bool operator ==(KeyboardState lhs, KeyboardState rhs)
|
||||
{
|
||||
if (lhs.keyState.Length != rhs.keyState.Length)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
for (int i = 0; i < lhs.keyState.Length; i++)
|
||||
{
|
||||
if (lhs.keyState[i] != rhs.keyState[i])
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
public static bool operator !=(KeyboardState lhs, KeyboardState rhs)
|
||||
{
|
||||
return !(lhs == rhs);
|
||||
}
|
||||
|
||||
public KeyState this[Keys key]
|
||||
{
|
||||
get
|
||||
{
|
||||
return keyState[(int)key];
|
||||
}
|
||||
}
|
||||
|
||||
public Keys[] GetPressedKeys()
|
||||
{
|
||||
return this.pressedKeys.ToArray();
|
||||
}
|
||||
|
||||
internal void AddPressedKey(Keys key)
|
||||
{
|
||||
this.pressedKeys.Add(key);
|
||||
this.keyState[(int)key] = KeyState.Down;
|
||||
}
|
||||
|
||||
internal void RemovePressedKey(Keys key)
|
||||
{
|
||||
this.pressedKeys.Remove(key);
|
||||
this.keyState[(int)key] = KeyState.Up;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
159
ANX.Framework/Storage/StorageContainer.cs
Normal file
159
ANX.Framework/Storage/StorageContainer.cs
Normal file
@ -0,0 +1,159 @@
|
||||
#region Using Statements
|
||||
using System;
|
||||
using System.IO;
|
||||
|
||||
#endregion // Using Statements
|
||||
|
||||
#region License
|
||||
|
||||
//
|
||||
// This file is part of the ANX.Framework created by the "ANX.Framework developer group".
|
||||
//
|
||||
// This file is released under the Ms-PL license.
|
||||
//
|
||||
//
|
||||
//
|
||||
// Microsoft Public License (Ms-PL)
|
||||
//
|
||||
// This license governs use of the accompanying software. If you use the software, you accept this license.
|
||||
// If you do not accept the license, do not use the software.
|
||||
//
|
||||
// 1.Definitions
|
||||
// The terms "reproduce," "reproduction," "derivative works," and "distribution" have the same meaning
|
||||
// here as under U.S. copyright law.
|
||||
// A "contribution" is the original software, or any additions or changes to the software.
|
||||
// A "contributor" is any person that distributes its contribution under this license.
|
||||
// "Licensed patents" are a contributor's patent claims that read directly on its contribution.
|
||||
//
|
||||
// 2.Grant of Rights
|
||||
// (A) Copyright Grant- Subject to the terms of this license, including the license conditions and limitations
|
||||
// in section 3, each contributor grants you a non-exclusive, worldwide, royalty-free copyright license to
|
||||
// reproduce its contribution, prepare derivative works of its contribution, and distribute its contribution
|
||||
// or any derivative works that you create.
|
||||
// (B) Patent Grant- Subject to the terms of this license, including the license conditions and limitations in
|
||||
// section 3, each contributor grants you a non-exclusive, worldwide, royalty-free license under its licensed
|
||||
// patents to make, have made, use, sell, offer for sale, import, and/or otherwise dispose of its contribution
|
||||
// in the software or derivative works of the contribution in the software.
|
||||
//
|
||||
// 3.Conditions and Limitations
|
||||
// (A) No Trademark License- This license does not grant you rights to use any contributors' name, logo, or trademarks.
|
||||
// (B) If you bring a patent claim against any contributor over patents that you claim are infringed by the software, your
|
||||
// patent license from such contributor to the software ends automatically.
|
||||
// (C) If you distribute any portion of the software, you must retain all copyright, patent, trademark, and attribution
|
||||
// notices that are present in the software.
|
||||
// (D) If you distribute any portion of the software in source code form, you may do so only under this license by including
|
||||
// a complete copy of this license with your distribution. If you distribute any portion of the software in compiled or
|
||||
// object code form, you may only do so under a license that complies with this license.
|
||||
// (E) The software is licensed "as-is." You bear the risk of using it. The contributors give no express warranties, guarantees,
|
||||
// or conditions. You may have additional consumer rights under your local laws which this license cannot change. To the
|
||||
// extent permitted under your local laws, the contributors exclude the implied warranties of merchantability, fitness for a
|
||||
// particular purpose and non-infringement.
|
||||
|
||||
#endregion // License
|
||||
|
||||
namespace ANX.Framework.Storage
|
||||
{
|
||||
public class StorageContainer : IDisposable
|
||||
{
|
||||
public event EventHandler<EventArgs> Disposing;
|
||||
|
||||
~StorageContainer()
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
public void CreateDirectory(string directory)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
public Stream CreateFile(string file)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
public void DeleteDirectory(string directory)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
public void DeleteFile(string file)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
public bool DirectoryExists(string directory)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
public bool FileExists(string file)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
public string[] GetDirectoryNames()
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
public string[] GetDirectoryNames(string searchPattern)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
public string[] GetFileNames()
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
public string[] GetFileNames(string searchPattern)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
public Stream OpenFile(string file, FileMode fileMode)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
public Stream OpenFile(string file, FileMode fileMode, FileAccess fileAccess)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
public Stream OpenFile(string file, FileMode fileMode, FileAccess fileAccess, FileShare fileShare)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
public string DisplayName
|
||||
{
|
||||
get
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
}
|
||||
|
||||
public StorageDevice StorageDevice
|
||||
{
|
||||
get
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
}
|
||||
|
||||
public bool IsDisposed
|
||||
{
|
||||
get
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
}
|
||||
|
||||
public void Dispose()
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
}
|
||||
}
|
123
ANX.Framework/Storage/StorageDevice.cs
Normal file
123
ANX.Framework/Storage/StorageDevice.cs
Normal file
@ -0,0 +1,123 @@
|
||||
#region Using Statements
|
||||
using System;
|
||||
|
||||
#endregion // Using Statements
|
||||
|
||||
#region License
|
||||
|
||||
//
|
||||
// This file is part of the ANX.Framework created by the "ANX.Framework developer group".
|
||||
//
|
||||
// This file is released under the Ms-PL license.
|
||||
//
|
||||
//
|
||||
//
|
||||
// Microsoft Public License (Ms-PL)
|
||||
//
|
||||
// This license governs use of the accompanying software. If you use the software, you accept this license.
|
||||
// If you do not accept the license, do not use the software.
|
||||
//
|
||||
// 1.Definitions
|
||||
// The terms "reproduce," "reproduction," "derivative works," and "distribution" have the same meaning
|
||||
// here as under U.S. copyright law.
|
||||
// A "contribution" is the original software, or any additions or changes to the software.
|
||||
// A "contributor" is any person that distributes its contribution under this license.
|
||||
// "Licensed patents" are a contributor's patent claims that read directly on its contribution.
|
||||
//
|
||||
// 2.Grant of Rights
|
||||
// (A) Copyright Grant- Subject to the terms of this license, including the license conditions and limitations
|
||||
// in section 3, each contributor grants you a non-exclusive, worldwide, royalty-free copyright license to
|
||||
// reproduce its contribution, prepare derivative works of its contribution, and distribute its contribution
|
||||
// or any derivative works that you create.
|
||||
// (B) Patent Grant- Subject to the terms of this license, including the license conditions and limitations in
|
||||
// section 3, each contributor grants you a non-exclusive, worldwide, royalty-free license under its licensed
|
||||
// patents to make, have made, use, sell, offer for sale, import, and/or otherwise dispose of its contribution
|
||||
// in the software or derivative works of the contribution in the software.
|
||||
//
|
||||
// 3.Conditions and Limitations
|
||||
// (A) No Trademark License- This license does not grant you rights to use any contributors' name, logo, or trademarks.
|
||||
// (B) If you bring a patent claim against any contributor over patents that you claim are infringed by the software, your
|
||||
// patent license from such contributor to the software ends automatically.
|
||||
// (C) If you distribute any portion of the software, you must retain all copyright, patent, trademark, and attribution
|
||||
// notices that are present in the software.
|
||||
// (D) If you distribute any portion of the software in source code form, you may do so only under this license by including
|
||||
// a complete copy of this license with your distribution. If you distribute any portion of the software in compiled or
|
||||
// object code form, you may only do so under a license that complies with this license.
|
||||
// (E) The software is licensed "as-is." You bear the risk of using it. The contributors give no express warranties, guarantees,
|
||||
// or conditions. You may have additional consumer rights under your local laws which this license cannot change. To the
|
||||
// extent permitted under your local laws, the contributors exclude the implied warranties of merchantability, fitness for a
|
||||
// particular purpose and non-infringement.
|
||||
|
||||
#endregion // License
|
||||
|
||||
namespace ANX.Framework.Storage
|
||||
{
|
||||
public sealed class StorageDevice
|
||||
{
|
||||
public static event EventHandler<EventArgs> DeviceChanged;
|
||||
|
||||
public IAsyncResult BeginOpenContainer(string displayName, AsyncCallback callback, Object state)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
public static IAsyncResult BeginShowSelector(AsyncCallback callback, Object state)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
public static IAsyncResult BeginShowSelector(int sizeInBytes, int directoryCount, AsyncCallback callback, Object state)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
public static IAsyncResult BeginShowSelector(PlayerIndex player, AsyncCallback callback, Object state)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
public static IAsyncResult BeginShowSelector(PlayerIndex player, int sizeInBytes, int directoryCount, AsyncCallback callback, Object state)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
public void DeleteContainer(string titleName)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
public StorageContainer EndOpenContainer(IAsyncResult result)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
public static StorageDevice EndShowSelector(IAsyncResult result)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
public long FreeSpace
|
||||
{
|
||||
get
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
}
|
||||
|
||||
public bool IsConnected
|
||||
{
|
||||
get
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
}
|
||||
|
||||
public long TotalSpace
|
||||
{
|
||||
get
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
84
ANX.Framework/Storage/StorageDeviceNotConnectedException.cs
Normal file
84
ANX.Framework/Storage/StorageDeviceNotConnectedException.cs
Normal file
@ -0,0 +1,84 @@
|
||||
#region Using Statements
|
||||
using System;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Runtime.Serialization;
|
||||
|
||||
#endregion // Using Statements
|
||||
|
||||
#region License
|
||||
|
||||
//
|
||||
// This file is part of the ANX.Framework created by the "ANX.Framework developer group".
|
||||
//
|
||||
// This file is released under the Ms-PL license.
|
||||
//
|
||||
//
|
||||
//
|
||||
// Microsoft Public License (Ms-PL)
|
||||
//
|
||||
// This license governs use of the accompanying software. If you use the software, you accept this license.
|
||||
// If you do not accept the license, do not use the software.
|
||||
//
|
||||
// 1.Definitions
|
||||
// The terms "reproduce," "reproduction," "derivative works," and "distribution" have the same meaning
|
||||
// here as under U.S. copyright law.
|
||||
// A "contribution" is the original software, or any additions or changes to the software.
|
||||
// A "contributor" is any person that distributes its contribution under this license.
|
||||
// "Licensed patents" are a contributor's patent claims that read directly on its contribution.
|
||||
//
|
||||
// 2.Grant of Rights
|
||||
// (A) Copyright Grant- Subject to the terms of this license, including the license conditions and limitations
|
||||
// in section 3, each contributor grants you a non-exclusive, worldwide, royalty-free copyright license to
|
||||
// reproduce its contribution, prepare derivative works of its contribution, and distribute its contribution
|
||||
// or any derivative works that you create.
|
||||
// (B) Patent Grant- Subject to the terms of this license, including the license conditions and limitations in
|
||||
// section 3, each contributor grants you a non-exclusive, worldwide, royalty-free license under its licensed
|
||||
// patents to make, have made, use, sell, offer for sale, import, and/or otherwise dispose of its contribution
|
||||
// in the software or derivative works of the contribution in the software.
|
||||
//
|
||||
// 3.Conditions and Limitations
|
||||
// (A) No Trademark License- This license does not grant you rights to use any contributors' name, logo, or trademarks.
|
||||
// (B) If you bring a patent claim against any contributor over patents that you claim are infringed by the software, your
|
||||
// patent license from such contributor to the software ends automatically.
|
||||
// (C) If you distribute any portion of the software, you must retain all copyright, patent, trademark, and attribution
|
||||
// notices that are present in the software.
|
||||
// (D) If you distribute any portion of the software in source code form, you may do so only under this license by including
|
||||
// a complete copy of this license with your distribution. If you distribute any portion of the software in compiled or
|
||||
// object code form, you may only do so under a license that complies with this license.
|
||||
// (E) The software is licensed "as-is." You bear the risk of using it. The contributors give no express warranties, guarantees,
|
||||
// or conditions. You may have additional consumer rights under your local laws which this license cannot change. To the
|
||||
// extent permitted under your local laws, the contributors exclude the implied warranties of merchantability, fitness for a
|
||||
// particular purpose and non-infringement.
|
||||
|
||||
#endregion // License
|
||||
|
||||
namespace ANX.Framework.Storage
|
||||
{
|
||||
public class StorageDeviceNotConnectedException : ExternalException
|
||||
{
|
||||
public StorageDeviceNotConnectedException()
|
||||
: base()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
protected StorageDeviceNotConnectedException(SerializationInfo info, StreamingContext context)
|
||||
: base(info, context)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public StorageDeviceNotConnectedException(string message)
|
||||
: base(message)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public StorageDeviceNotConnectedException(string message, Exception innerException)
|
||||
: base(message, innerException)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user