\hypertarget{class_csharp_u_s_b_joystick_1_1_u_s_b___joystick}{\section{Csharp\-U\-S\-B\-Joystick.\-U\-S\-B\-\_\-\-Joystick Class Reference}
\label{class_csharp_u_s_b_joystick_1_1_u_s_b___joystick}\index{Csharp\-U\-S\-B\-Joystick.\-U\-S\-B\-\_\-\-Joystick@{Csharp\-U\-S\-B\-Joystick.\-U\-S\-B\-\_\-\-Joystick}}
}


Class to handle joystick input using Microsoft Direct\-X.  


\subsection*{Public Types}
\begin{DoxyCompactItemize}
\item 
enum \hyperlink{class_csharp_u_s_b_joystick_1_1_u_s_b___joystick_af84f3eabf2318dd720053c1ca0fa81c2}{Joystick\-Button} \-: byte \{ \hyperlink{class_csharp_u_s_b_joystick_1_1_u_s_b___joystick_af84f3eabf2318dd720053c1ca0fa81c2a56b0e36e076d9a60a8f0ea1b3bdba519}{B\-U\-T\-T\-O\-N\-\_\-\-T\-R\-I\-G\-G\-E\-R} = 1, 
\hyperlink{class_csharp_u_s_b_joystick_1_1_u_s_b___joystick_af84f3eabf2318dd720053c1ca0fa81c2a53737c1583ca0829eea745bd50b48416}{B\-U\-T\-T\-O\-N\-\_\-\-U\-P\-P\-E\-R\-\_\-\-T\-R\-I\-G\-G\-E\-R\-\_\-1} = 2, 
\hyperlink{class_csharp_u_s_b_joystick_1_1_u_s_b___joystick_af84f3eabf2318dd720053c1ca0fa81c2ab8886848a6a88461215ffa5eda4650a0}{B\-U\-T\-T\-O\-N\-\_\-\-U\-P\-P\-E\-R\-\_\-\-T\-R\-I\-G\-G\-E\-R\-\_\-2} = 3
 \}
\begin{DoxyCompactList}\small\item\em Frequently used joystick buttons. \end{DoxyCompactList}\end{DoxyCompactItemize}
\subsection*{Public Member Functions}
\begin{DoxyCompactItemize}
\item 
\hyperlink{class_csharp_u_s_b_joystick_1_1_u_s_b___joystick_aeee55d76fbff77a9b22b5232a4294e6c}{U\-S\-B\-\_\-\-Joystick} (int range\-Min, int range\-Max, double threshold\-Perc, System.\-Windows.\-Forms.\-Form form)
\begin{DoxyCompactList}\small\item\em Creates a new \hyperlink{class_csharp_u_s_b_joystick_1_1_u_s_b___joystick}{U\-S\-B\-\_\-\-Joystick} object and initializes the minimum and maximum range values of the joystick along with the threshold percentage. \end{DoxyCompactList}\item 
\hyperlink{class_csharp_u_s_b_joystick_1_1_u_s_b___joystick_aed75796542200890b024094490b2e112}{U\-S\-B\-\_\-\-Joystick} (int range\-Min, int range\-Max, System.\-Windows.\-Forms.\-Form form)
\begin{DoxyCompactList}\small\item\em Creates a new \hyperlink{class_csharp_u_s_b_joystick_1_1_u_s_b___joystick}{U\-S\-B\-\_\-\-Joystick} object and initializes the minimum and maximum range values of the joystick, along with setting the threshold percentage to a default value. \end{DoxyCompactList}\item 
\hyperlink{class_csharp_u_s_b_joystick_1_1_u_s_b___joystick_a410941059b6967b4f885b4a0e466bc40}{U\-S\-B\-\_\-\-Joystick} (System.\-Windows.\-Forms.\-Form form)
\begin{DoxyCompactList}\small\item\em Creates a new \hyperlink{class_csharp_u_s_b_joystick_1_1_u_s_b___joystick}{U\-S\-B\-\_\-\-Joystick} object and sets the minimum/maximum range values along the threshold percentage of the joystick to default values. 
\begin{DoxyParams}{Parameters}
{\em form} & Form to set the cooperative level for the joystick.\\
\hline
\end{DoxyParams}
\end{DoxyCompactList}\item 
string \hyperlink{class_csharp_u_s_b_joystick_1_1_u_s_b___joystick_a3695a2bb23d1ecbd6b1c75f57425d9b1}{Button\-Value} (int index)
\begin{DoxyCompactList}\small\item\em Returns the value of the specified button. \end{DoxyCompactList}\item 
bool \hyperlink{class_csharp_u_s_b_joystick_1_1_u_s_b___joystick_a301e7a4c3d3532618910914387cfadc0}{Button\-Pressed} (int index)
\begin{DoxyCompactList}\small\item\em Returns the state of a button. \end{DoxyCompactList}\item 
bool \hyperlink{class_csharp_u_s_b_joystick_1_1_u_s_b___joystick_ad7fed270bb9b08746ce89ef3422b149d}{Button\-Clicked} (int index)
\begin{DoxyCompactList}\small\item\em Returns true if specified button has been clicked. \end{DoxyCompactList}\item 
bool \hyperlink{class_csharp_u_s_b_joystick_1_1_u_s_b___joystick_aa914470ff88139042d5548f23822b50c}{Is\-X\-Outside\-Threshold} ()
\begin{DoxyCompactList}\small\item\em Returns true if the joystick's current X position is outside of the threshold. \end{DoxyCompactList}\item 
bool \hyperlink{class_csharp_u_s_b_joystick_1_1_u_s_b___joystick_ad7e46b6c7e9138f2230864d7f1a8c0d2}{Is\-Y\-Outside\-Threshold} ()
\begin{DoxyCompactList}\small\item\em Returns true if the joystick's current Y position is outside of the threshold. \end{DoxyCompactList}\item 
void \hyperlink{class_csharp_u_s_b_joystick_1_1_u_s_b___joystick_a27915252af119aac4d20add0f0c372a6}{Get\-Data} ()
\begin{DoxyCompactList}\small\item\em Acquires the joystick if necessary, and starts polling the joystick for information. Uses the same concepts behind the Direct\-X 9 S\-D\-K Joystick sample download. \end{DoxyCompactList}\item 
void \hyperlink{class_csharp_u_s_b_joystick_1_1_u_s_b___joystick_abb08bd5563df975dd3b037559b7552c3}{Preset\-Values} ()
\begin{DoxyCompactList}\small\item\em Presets all of the values that are required to use an object of the \hyperlink{class_csharp_u_s_b_joystick_1_1_u_s_b___joystick}{U\-S\-B\-\_\-\-Joystick} class. \end{DoxyCompactList}\item 
void \hyperlink{class_csharp_u_s_b_joystick_1_1_u_s_b___joystick_a4041238aff7075e9415eec93f4d92065}{Unacquire\-App\-Device} ()
\begin{DoxyCompactList}\small\item\em Unacquires the device \end{DoxyCompactList}\item 
void \hyperlink{class_csharp_u_s_b_joystick_1_1_u_s_b___joystick_a571c68848f0096827c3f55a761112bc4}{Dispose} ()
\begin{DoxyCompactList}\small\item\em Calls the methods that are used to dispose of this object, and all objects contained within. \end{DoxyCompactList}\end{DoxyCompactItemize}
\subsection*{Properties}
\begin{DoxyCompactItemize}
\item 
double \hyperlink{class_csharp_u_s_b_joystick_1_1_u_s_b___joystick_ad5c030d06a53bcb41875bab45ce5a690}{Threshold\-Perc}\hspace{0.3cm}{\ttfamily  \mbox{[}get, set\mbox{]}}
\begin{DoxyCompactList}\small\item\em Gets or sets the threshold based on a percentage scale. \end{DoxyCompactList}\item 
int \hyperlink{class_csharp_u_s_b_joystick_1_1_u_s_b___joystick_a4e86e4beedcfa4b8891025aabb9654f4}{Threshold\-Min}\hspace{0.3cm}{\ttfamily  \mbox{[}get\mbox{]}}
\begin{DoxyCompactList}\small\item\em Returns the minimum value of the threshold. \end{DoxyCompactList}\item 
Joystick\-State \hyperlink{class_csharp_u_s_b_joystick_1_1_u_s_b___joystick_ac1196c81942f1622c416d07df9ed0983}{State}\hspace{0.3cm}{\ttfamily  \mbox{[}get\mbox{]}}
\begin{DoxyCompactList}\small\item\em Returns the current Joystick state. \end{DoxyCompactList}\item 
int \hyperlink{class_csharp_u_s_b_joystick_1_1_u_s_b___joystick_ace3b09e64898bc5ab7e08a2ace75b815}{Threshold\-Max}\hspace{0.3cm}{\ttfamily  \mbox{[}get\mbox{]}}
\begin{DoxyCompactList}\small\item\em Returns the maximum value of the threshold. \end{DoxyCompactList}\item 
System.\-Drawing.\-Point\-F \hyperlink{class_csharp_u_s_b_joystick_1_1_u_s_b___joystick_a345d6b7cca7a8c09ef73024d356de36d}{Get\-Raw\-X\-Y\-Perc}\hspace{0.3cm}{\ttfamily  \mbox{[}get\mbox{]}}
\begin{DoxyCompactList}\small\item\em Returns the raw value of the joystick's X and Y coordinates converted into a percent. \end{DoxyCompactList}\item 
int \hyperlink{class_csharp_u_s_b_joystick_1_1_u_s_b___joystick_a8aebeb2d525f77e58f456bf88c178977}{Number\-Of\-Buttons}\hspace{0.3cm}{\ttfamily  \mbox{[}get\mbox{]}}
\begin{DoxyCompactList}\small\item\em Returns the number of buttons on the joystick. \end{DoxyCompactList}\item 
bool \hyperlink{class_csharp_u_s_b_joystick_1_1_u_s_b___joystick_a2306dcd10f49238d9fac1eea9e60e9a1}{Is\-X\-Y\-Inside\-Threshold}\hspace{0.3cm}{\ttfamily  \mbox{[}get\mbox{]}}
\begin{DoxyCompactList}\small\item\em Returns true if the joystick's current position is inside the threshold \end{DoxyCompactList}\end{DoxyCompactItemize}
\subsection*{Private Member Functions}
\begin{DoxyCompactItemize}
\item 
void \hyperlink{class_csharp_u_s_b_joystick_1_1_u_s_b___joystick_a0aa4daaf2fee81febf3126b9f0fd9b6c}{Set\-Threshold} ()
\begin{DoxyCompactList}\small\item\em Sets the threshold of the X and Y joystick values. \end{DoxyCompactList}\item 
bool \hyperlink{class_csharp_u_s_b_joystick_1_1_u_s_b___joystick_aa554ef4f3ab8f58e558b9f7d70791677}{Init\-Direct\-Input} (System.\-Windows.\-Forms.\-Form Form1)
\begin{DoxyCompactList}\small\item\em Finds the first joystick attached, and initializes it. Uses the same concepts behind the Direct\-X 9 Joystick sample download. \end{DoxyCompactList}\end{DoxyCompactItemize}


\subsection{Detailed Description}
Class to handle joystick input using Microsoft Direct\-X. 



Definition at line 82 of file U\-S\-B\-Joystick.\-cs.



\subsection{Member Enumeration Documentation}
\hypertarget{class_csharp_u_s_b_joystick_1_1_u_s_b___joystick_af84f3eabf2318dd720053c1ca0fa81c2}{\index{Csharp\-U\-S\-B\-Joystick\-::\-U\-S\-B\-\_\-\-Joystick@{Csharp\-U\-S\-B\-Joystick\-::\-U\-S\-B\-\_\-\-Joystick}!Joystick\-Button@{Joystick\-Button}}
\index{Joystick\-Button@{Joystick\-Button}!CsharpUSBJoystick::USB_Joystick@{Csharp\-U\-S\-B\-Joystick\-::\-U\-S\-B\-\_\-\-Joystick}}
\subsubsection[{Joystick\-Button}]{\setlength{\rightskip}{0pt plus 5cm}enum {\bf Csharp\-U\-S\-B\-Joystick.\-U\-S\-B\-\_\-\-Joystick.\-Joystick\-Button} \-: byte}}\label{class_csharp_u_s_b_joystick_1_1_u_s_b___joystick_af84f3eabf2318dd720053c1ca0fa81c2}


Frequently used joystick buttons. 

\begin{Desc}
\item[Enumerator]\par
\begin{description}
\index{B\-U\-T\-T\-O\-N\-\_\-\-T\-R\-I\-G\-G\-E\-R@{B\-U\-T\-T\-O\-N\-\_\-\-T\-R\-I\-G\-G\-E\-R}!Csharp\-U\-S\-B\-Joystick\-::\-U\-S\-B\-\_\-\-Joystick@{Csharp\-U\-S\-B\-Joystick\-::\-U\-S\-B\-\_\-\-Joystick}}\index{Csharp\-U\-S\-B\-Joystick\-::\-U\-S\-B\-\_\-\-Joystick@{Csharp\-U\-S\-B\-Joystick\-::\-U\-S\-B\-\_\-\-Joystick}!B\-U\-T\-T\-O\-N\-\_\-\-T\-R\-I\-G\-G\-E\-R@{B\-U\-T\-T\-O\-N\-\_\-\-T\-R\-I\-G\-G\-E\-R}}\item[{\em 
\hypertarget{class_csharp_u_s_b_joystick_1_1_u_s_b___joystick_af84f3eabf2318dd720053c1ca0fa81c2a56b0e36e076d9a60a8f0ea1b3bdba519}{B\-U\-T\-T\-O\-N\-\_\-\-T\-R\-I\-G\-G\-E\-R}\label{class_csharp_u_s_b_joystick_1_1_u_s_b___joystick_af84f3eabf2318dd720053c1ca0fa81c2a56b0e36e076d9a60a8f0ea1b3bdba519}
}]Front trigger button. \index{B\-U\-T\-T\-O\-N\-\_\-\-U\-P\-P\-E\-R\-\_\-\-T\-R\-I\-G\-G\-E\-R\-\_\-1@{B\-U\-T\-T\-O\-N\-\_\-\-U\-P\-P\-E\-R\-\_\-\-T\-R\-I\-G\-G\-E\-R\-\_\-1}!Csharp\-U\-S\-B\-Joystick\-::\-U\-S\-B\-\_\-\-Joystick@{Csharp\-U\-S\-B\-Joystick\-::\-U\-S\-B\-\_\-\-Joystick}}\index{Csharp\-U\-S\-B\-Joystick\-::\-U\-S\-B\-\_\-\-Joystick@{Csharp\-U\-S\-B\-Joystick\-::\-U\-S\-B\-\_\-\-Joystick}!B\-U\-T\-T\-O\-N\-\_\-\-U\-P\-P\-E\-R\-\_\-\-T\-R\-I\-G\-G\-E\-R\-\_\-1@{B\-U\-T\-T\-O\-N\-\_\-\-U\-P\-P\-E\-R\-\_\-\-T\-R\-I\-G\-G\-E\-R\-\_\-1}}\item[{\em 
\hypertarget{class_csharp_u_s_b_joystick_1_1_u_s_b___joystick_af84f3eabf2318dd720053c1ca0fa81c2a53737c1583ca0829eea745bd50b48416}{B\-U\-T\-T\-O\-N\-\_\-\-U\-P\-P\-E\-R\-\_\-\-T\-R\-I\-G\-G\-E\-R\-\_\-1}\label{class_csharp_u_s_b_joystick_1_1_u_s_b___joystick_af84f3eabf2318dd720053c1ca0fa81c2a53737c1583ca0829eea745bd50b48416}
}]Top-\/rear trigger button. \index{B\-U\-T\-T\-O\-N\-\_\-\-U\-P\-P\-E\-R\-\_\-\-T\-R\-I\-G\-G\-E\-R\-\_\-2@{B\-U\-T\-T\-O\-N\-\_\-\-U\-P\-P\-E\-R\-\_\-\-T\-R\-I\-G\-G\-E\-R\-\_\-2}!Csharp\-U\-S\-B\-Joystick\-::\-U\-S\-B\-\_\-\-Joystick@{Csharp\-U\-S\-B\-Joystick\-::\-U\-S\-B\-\_\-\-Joystick}}\index{Csharp\-U\-S\-B\-Joystick\-::\-U\-S\-B\-\_\-\-Joystick@{Csharp\-U\-S\-B\-Joystick\-::\-U\-S\-B\-\_\-\-Joystick}!B\-U\-T\-T\-O\-N\-\_\-\-U\-P\-P\-E\-R\-\_\-\-T\-R\-I\-G\-G\-E\-R\-\_\-2@{B\-U\-T\-T\-O\-N\-\_\-\-U\-P\-P\-E\-R\-\_\-\-T\-R\-I\-G\-G\-E\-R\-\_\-2}}\item[{\em 
\hypertarget{class_csharp_u_s_b_joystick_1_1_u_s_b___joystick_af84f3eabf2318dd720053c1ca0fa81c2ab8886848a6a88461215ffa5eda4650a0}{B\-U\-T\-T\-O\-N\-\_\-\-U\-P\-P\-E\-R\-\_\-\-T\-R\-I\-G\-G\-E\-R\-\_\-2}\label{class_csharp_u_s_b_joystick_1_1_u_s_b___joystick_af84f3eabf2318dd720053c1ca0fa81c2ab8886848a6a88461215ffa5eda4650a0}
}]Top-\/front trigger button. \end{description}
\end{Desc}


Definition at line 90 of file U\-S\-B\-Joystick.\-cs.



\subsection{Constructor \& Destructor Documentation}
\hypertarget{class_csharp_u_s_b_joystick_1_1_u_s_b___joystick_aeee55d76fbff77a9b22b5232a4294e6c}{\index{Csharp\-U\-S\-B\-Joystick\-::\-U\-S\-B\-\_\-\-Joystick@{Csharp\-U\-S\-B\-Joystick\-::\-U\-S\-B\-\_\-\-Joystick}!U\-S\-B\-\_\-\-Joystick@{U\-S\-B\-\_\-\-Joystick}}
\index{U\-S\-B\-\_\-\-Joystick@{U\-S\-B\-\_\-\-Joystick}!CsharpUSBJoystick::USB_Joystick@{Csharp\-U\-S\-B\-Joystick\-::\-U\-S\-B\-\_\-\-Joystick}}
\subsubsection[{U\-S\-B\-\_\-\-Joystick}]{\setlength{\rightskip}{0pt plus 5cm}Csharp\-U\-S\-B\-Joystick.\-U\-S\-B\-\_\-\-Joystick.\-U\-S\-B\-\_\-\-Joystick (
\begin{DoxyParamCaption}
\item[{int}]{range\-Min, }
\item[{int}]{range\-Max, }
\item[{double}]{threshold\-Perc, }
\item[{System.\-Windows.\-Forms.\-Form}]{form}
\end{DoxyParamCaption}
)}}\label{class_csharp_u_s_b_joystick_1_1_u_s_b___joystick_aeee55d76fbff77a9b22b5232a4294e6c}


Creates a new \hyperlink{class_csharp_u_s_b_joystick_1_1_u_s_b___joystick}{U\-S\-B\-\_\-\-Joystick} object and initializes the minimum and maximum range values of the joystick along with the threshold percentage. 


\begin{DoxyParams}{Parameters}
{\em range\-Min} & The minimum value for the range of the joystick.\\
\hline
{\em range\-Max} & The maximum value for the range of the joystick.\\
\hline
{\em threshold\-Perc} & The threshold percentage. Value must be between 0.\-0 and .99.\\
\hline
{\em form} & Form to set the cooperative level for the joystick.\\
\hline
\end{DoxyParams}


Definition at line 130 of file U\-S\-B\-Joystick.\-cs.

\hypertarget{class_csharp_u_s_b_joystick_1_1_u_s_b___joystick_aed75796542200890b024094490b2e112}{\index{Csharp\-U\-S\-B\-Joystick\-::\-U\-S\-B\-\_\-\-Joystick@{Csharp\-U\-S\-B\-Joystick\-::\-U\-S\-B\-\_\-\-Joystick}!U\-S\-B\-\_\-\-Joystick@{U\-S\-B\-\_\-\-Joystick}}
\index{U\-S\-B\-\_\-\-Joystick@{U\-S\-B\-\_\-\-Joystick}!CsharpUSBJoystick::USB_Joystick@{Csharp\-U\-S\-B\-Joystick\-::\-U\-S\-B\-\_\-\-Joystick}}
\subsubsection[{U\-S\-B\-\_\-\-Joystick}]{\setlength{\rightskip}{0pt plus 5cm}Csharp\-U\-S\-B\-Joystick.\-U\-S\-B\-\_\-\-Joystick.\-U\-S\-B\-\_\-\-Joystick (
\begin{DoxyParamCaption}
\item[{int}]{range\-Min, }
\item[{int}]{range\-Max, }
\item[{System.\-Windows.\-Forms.\-Form}]{form}
\end{DoxyParamCaption}
)}}\label{class_csharp_u_s_b_joystick_1_1_u_s_b___joystick_aed75796542200890b024094490b2e112}


Creates a new \hyperlink{class_csharp_u_s_b_joystick_1_1_u_s_b___joystick}{U\-S\-B\-\_\-\-Joystick} object and initializes the minimum and maximum range values of the joystick, along with setting the threshold percentage to a default value. 


\begin{DoxyParams}{Parameters}
{\em range\-Min} & The minimum value for the range of the joystick.\\
\hline
{\em range\-Max} & The maximum value for the range of the joystick.\\
\hline
{\em form} & Form to set the cooperative level for the joystick.\\
\hline
\end{DoxyParams}


Definition at line 157 of file U\-S\-B\-Joystick.\-cs.

\hypertarget{class_csharp_u_s_b_joystick_1_1_u_s_b___joystick_a410941059b6967b4f885b4a0e466bc40}{\index{Csharp\-U\-S\-B\-Joystick\-::\-U\-S\-B\-\_\-\-Joystick@{Csharp\-U\-S\-B\-Joystick\-::\-U\-S\-B\-\_\-\-Joystick}!U\-S\-B\-\_\-\-Joystick@{U\-S\-B\-\_\-\-Joystick}}
\index{U\-S\-B\-\_\-\-Joystick@{U\-S\-B\-\_\-\-Joystick}!CsharpUSBJoystick::USB_Joystick@{Csharp\-U\-S\-B\-Joystick\-::\-U\-S\-B\-\_\-\-Joystick}}
\subsubsection[{U\-S\-B\-\_\-\-Joystick}]{\setlength{\rightskip}{0pt plus 5cm}Csharp\-U\-S\-B\-Joystick.\-U\-S\-B\-\_\-\-Joystick.\-U\-S\-B\-\_\-\-Joystick (
\begin{DoxyParamCaption}
\item[{System.\-Windows.\-Forms.\-Form}]{form}
\end{DoxyParamCaption}
)}}\label{class_csharp_u_s_b_joystick_1_1_u_s_b___joystick_a410941059b6967b4f885b4a0e466bc40}


Creates a new \hyperlink{class_csharp_u_s_b_joystick_1_1_u_s_b___joystick}{U\-S\-B\-\_\-\-Joystick} object and sets the minimum/maximum range values along the threshold percentage of the joystick to default values. 
\begin{DoxyParams}{Parameters}
{\em form} & Form to set the cooperative level for the joystick.\\
\hline
\end{DoxyParams}




Definition at line 166 of file U\-S\-B\-Joystick.\-cs.



\subsection{Member Function Documentation}
\hypertarget{class_csharp_u_s_b_joystick_1_1_u_s_b___joystick_ad7fed270bb9b08746ce89ef3422b149d}{\index{Csharp\-U\-S\-B\-Joystick\-::\-U\-S\-B\-\_\-\-Joystick@{Csharp\-U\-S\-B\-Joystick\-::\-U\-S\-B\-\_\-\-Joystick}!Button\-Clicked@{Button\-Clicked}}
\index{Button\-Clicked@{Button\-Clicked}!CsharpUSBJoystick::USB_Joystick@{Csharp\-U\-S\-B\-Joystick\-::\-U\-S\-B\-\_\-\-Joystick}}
\subsubsection[{Button\-Clicked}]{\setlength{\rightskip}{0pt plus 5cm}bool Csharp\-U\-S\-B\-Joystick.\-U\-S\-B\-\_\-\-Joystick.\-Button\-Clicked (
\begin{DoxyParamCaption}
\item[{int}]{index}
\end{DoxyParamCaption}
)}}\label{class_csharp_u_s_b_joystick_1_1_u_s_b___joystick_ad7fed270bb9b08746ce89ef3422b149d}


Returns true if specified button has been clicked. 


\begin{DoxyParams}{Parameters}
{\em index} & Index of button.\\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
True if button has been clicked.
\end{DoxyReturn}


Definition at line 284 of file U\-S\-B\-Joystick.\-cs.

\hypertarget{class_csharp_u_s_b_joystick_1_1_u_s_b___joystick_a301e7a4c3d3532618910914387cfadc0}{\index{Csharp\-U\-S\-B\-Joystick\-::\-U\-S\-B\-\_\-\-Joystick@{Csharp\-U\-S\-B\-Joystick\-::\-U\-S\-B\-\_\-\-Joystick}!Button\-Pressed@{Button\-Pressed}}
\index{Button\-Pressed@{Button\-Pressed}!CsharpUSBJoystick::USB_Joystick@{Csharp\-U\-S\-B\-Joystick\-::\-U\-S\-B\-\_\-\-Joystick}}
\subsubsection[{Button\-Pressed}]{\setlength{\rightskip}{0pt plus 5cm}bool Csharp\-U\-S\-B\-Joystick.\-U\-S\-B\-\_\-\-Joystick.\-Button\-Pressed (
\begin{DoxyParamCaption}
\item[{int}]{index}
\end{DoxyParamCaption}
)}}\label{class_csharp_u_s_b_joystick_1_1_u_s_b___joystick_a301e7a4c3d3532618910914387cfadc0}


Returns the state of a button. 


\begin{DoxyParams}{Parameters}
{\em index} & The index of the button to be used to test whether it has been pressed.\\
\hline
\end{DoxyParams}


Definition at line 267 of file U\-S\-B\-Joystick.\-cs.

\hypertarget{class_csharp_u_s_b_joystick_1_1_u_s_b___joystick_a3695a2bb23d1ecbd6b1c75f57425d9b1}{\index{Csharp\-U\-S\-B\-Joystick\-::\-U\-S\-B\-\_\-\-Joystick@{Csharp\-U\-S\-B\-Joystick\-::\-U\-S\-B\-\_\-\-Joystick}!Button\-Value@{Button\-Value}}
\index{Button\-Value@{Button\-Value}!CsharpUSBJoystick::USB_Joystick@{Csharp\-U\-S\-B\-Joystick\-::\-U\-S\-B\-\_\-\-Joystick}}
\subsubsection[{Button\-Value}]{\setlength{\rightskip}{0pt plus 5cm}string Csharp\-U\-S\-B\-Joystick.\-U\-S\-B\-\_\-\-Joystick.\-Button\-Value (
\begin{DoxyParamCaption}
\item[{int}]{index}
\end{DoxyParamCaption}
)}}\label{class_csharp_u_s_b_joystick_1_1_u_s_b___joystick_a3695a2bb23d1ecbd6b1c75f57425d9b1}


Returns the value of the specified button. 


\begin{DoxyParams}{Parameters}
{\em index} & Index of the button being pressed.\\
\hline
\end{DoxyParams}


Definition at line 257 of file U\-S\-B\-Joystick.\-cs.

\hypertarget{class_csharp_u_s_b_joystick_1_1_u_s_b___joystick_a571c68848f0096827c3f55a761112bc4}{\index{Csharp\-U\-S\-B\-Joystick\-::\-U\-S\-B\-\_\-\-Joystick@{Csharp\-U\-S\-B\-Joystick\-::\-U\-S\-B\-\_\-\-Joystick}!Dispose@{Dispose}}
\index{Dispose@{Dispose}!CsharpUSBJoystick::USB_Joystick@{Csharp\-U\-S\-B\-Joystick\-::\-U\-S\-B\-\_\-\-Joystick}}
\subsubsection[{Dispose}]{\setlength{\rightskip}{0pt plus 5cm}void Csharp\-U\-S\-B\-Joystick.\-U\-S\-B\-\_\-\-Joystick.\-Dispose (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
)}}\label{class_csharp_u_s_b_joystick_1_1_u_s_b___joystick_a571c68848f0096827c3f55a761112bc4}


Calls the methods that are used to dispose of this object, and all objects contained within. 



Definition at line 466 of file U\-S\-B\-Joystick.\-cs.

\hypertarget{class_csharp_u_s_b_joystick_1_1_u_s_b___joystick_a27915252af119aac4d20add0f0c372a6}{\index{Csharp\-U\-S\-B\-Joystick\-::\-U\-S\-B\-\_\-\-Joystick@{Csharp\-U\-S\-B\-Joystick\-::\-U\-S\-B\-\_\-\-Joystick}!Get\-Data@{Get\-Data}}
\index{Get\-Data@{Get\-Data}!CsharpUSBJoystick::USB_Joystick@{Csharp\-U\-S\-B\-Joystick\-::\-U\-S\-B\-\_\-\-Joystick}}
\subsubsection[{Get\-Data}]{\setlength{\rightskip}{0pt plus 5cm}void Csharp\-U\-S\-B\-Joystick.\-U\-S\-B\-\_\-\-Joystick.\-Get\-Data (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
)}}\label{class_csharp_u_s_b_joystick_1_1_u_s_b___joystick_a27915252af119aac4d20add0f0c372a6}


Acquires the joystick if necessary, and starts polling the joystick for information. Uses the same concepts behind the Direct\-X 9 S\-D\-K Joystick sample download. 



Definition at line 369 of file U\-S\-B\-Joystick.\-cs.

\hypertarget{class_csharp_u_s_b_joystick_1_1_u_s_b___joystick_aa554ef4f3ab8f58e558b9f7d70791677}{\index{Csharp\-U\-S\-B\-Joystick\-::\-U\-S\-B\-\_\-\-Joystick@{Csharp\-U\-S\-B\-Joystick\-::\-U\-S\-B\-\_\-\-Joystick}!Init\-Direct\-Input@{Init\-Direct\-Input}}
\index{Init\-Direct\-Input@{Init\-Direct\-Input}!CsharpUSBJoystick::USB_Joystick@{Csharp\-U\-S\-B\-Joystick\-::\-U\-S\-B\-\_\-\-Joystick}}
\subsubsection[{Init\-Direct\-Input}]{\setlength{\rightskip}{0pt plus 5cm}bool Csharp\-U\-S\-B\-Joystick.\-U\-S\-B\-\_\-\-Joystick.\-Init\-Direct\-Input (
\begin{DoxyParamCaption}
\item[{System.\-Windows.\-Forms.\-Form}]{Form1}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily [private]}}}\label{class_csharp_u_s_b_joystick_1_1_u_s_b___joystick_aa554ef4f3ab8f58e558b9f7d70791677}


Finds the first joystick attached, and initializes it. Uses the same concepts behind the Direct\-X 9 Joystick sample download. 


\begin{DoxyParams}{Parameters}
{\em Form1} & Form to set the cooperative level for the joystick.\\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
Returns true if the joystick was successfully created.
\end{DoxyReturn}


Definition at line 411 of file U\-S\-B\-Joystick.\-cs.

\hypertarget{class_csharp_u_s_b_joystick_1_1_u_s_b___joystick_aa914470ff88139042d5548f23822b50c}{\index{Csharp\-U\-S\-B\-Joystick\-::\-U\-S\-B\-\_\-\-Joystick@{Csharp\-U\-S\-B\-Joystick\-::\-U\-S\-B\-\_\-\-Joystick}!Is\-X\-Outside\-Threshold@{Is\-X\-Outside\-Threshold}}
\index{Is\-X\-Outside\-Threshold@{Is\-X\-Outside\-Threshold}!CsharpUSBJoystick::USB_Joystick@{Csharp\-U\-S\-B\-Joystick\-::\-U\-S\-B\-\_\-\-Joystick}}
\subsubsection[{Is\-X\-Outside\-Threshold}]{\setlength{\rightskip}{0pt plus 5cm}bool Csharp\-U\-S\-B\-Joystick.\-U\-S\-B\-\_\-\-Joystick.\-Is\-X\-Outside\-Threshold (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
)}}\label{class_csharp_u_s_b_joystick_1_1_u_s_b___joystick_aa914470ff88139042d5548f23822b50c}


Returns true if the joystick's current X position is outside of the threshold. 



Definition at line 304 of file U\-S\-B\-Joystick.\-cs.

\hypertarget{class_csharp_u_s_b_joystick_1_1_u_s_b___joystick_ad7e46b6c7e9138f2230864d7f1a8c0d2}{\index{Csharp\-U\-S\-B\-Joystick\-::\-U\-S\-B\-\_\-\-Joystick@{Csharp\-U\-S\-B\-Joystick\-::\-U\-S\-B\-\_\-\-Joystick}!Is\-Y\-Outside\-Threshold@{Is\-Y\-Outside\-Threshold}}
\index{Is\-Y\-Outside\-Threshold@{Is\-Y\-Outside\-Threshold}!CsharpUSBJoystick::USB_Joystick@{Csharp\-U\-S\-B\-Joystick\-::\-U\-S\-B\-\_\-\-Joystick}}
\subsubsection[{Is\-Y\-Outside\-Threshold}]{\setlength{\rightskip}{0pt plus 5cm}bool Csharp\-U\-S\-B\-Joystick.\-U\-S\-B\-\_\-\-Joystick.\-Is\-Y\-Outside\-Threshold (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
)}}\label{class_csharp_u_s_b_joystick_1_1_u_s_b___joystick_ad7e46b6c7e9138f2230864d7f1a8c0d2}


Returns true if the joystick's current Y position is outside of the threshold. 



Definition at line 320 of file U\-S\-B\-Joystick.\-cs.

\hypertarget{class_csharp_u_s_b_joystick_1_1_u_s_b___joystick_abb08bd5563df975dd3b037559b7552c3}{\index{Csharp\-U\-S\-B\-Joystick\-::\-U\-S\-B\-\_\-\-Joystick@{Csharp\-U\-S\-B\-Joystick\-::\-U\-S\-B\-\_\-\-Joystick}!Preset\-Values@{Preset\-Values}}
\index{Preset\-Values@{Preset\-Values}!CsharpUSBJoystick::USB_Joystick@{Csharp\-U\-S\-B\-Joystick\-::\-U\-S\-B\-\_\-\-Joystick}}
\subsubsection[{Preset\-Values}]{\setlength{\rightskip}{0pt plus 5cm}void Csharp\-U\-S\-B\-Joystick.\-U\-S\-B\-\_\-\-Joystick.\-Preset\-Values (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
)}}\label{class_csharp_u_s_b_joystick_1_1_u_s_b___joystick_abb08bd5563df975dd3b037559b7552c3}


Presets all of the values that are required to use an object of the \hyperlink{class_csharp_u_s_b_joystick_1_1_u_s_b___joystick}{U\-S\-B\-\_\-\-Joystick} class. 



Definition at line 445 of file U\-S\-B\-Joystick.\-cs.

\hypertarget{class_csharp_u_s_b_joystick_1_1_u_s_b___joystick_a0aa4daaf2fee81febf3126b9f0fd9b6c}{\index{Csharp\-U\-S\-B\-Joystick\-::\-U\-S\-B\-\_\-\-Joystick@{Csharp\-U\-S\-B\-Joystick\-::\-U\-S\-B\-\_\-\-Joystick}!Set\-Threshold@{Set\-Threshold}}
\index{Set\-Threshold@{Set\-Threshold}!CsharpUSBJoystick::USB_Joystick@{Csharp\-U\-S\-B\-Joystick\-::\-U\-S\-B\-\_\-\-Joystick}}
\subsubsection[{Set\-Threshold}]{\setlength{\rightskip}{0pt plus 5cm}void Csharp\-U\-S\-B\-Joystick.\-U\-S\-B\-\_\-\-Joystick.\-Set\-Threshold (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily [private]}}}\label{class_csharp_u_s_b_joystick_1_1_u_s_b___joystick_a0aa4daaf2fee81febf3126b9f0fd9b6c}


Sets the threshold of the X and Y joystick values. 



Definition at line 355 of file U\-S\-B\-Joystick.\-cs.

\hypertarget{class_csharp_u_s_b_joystick_1_1_u_s_b___joystick_a4041238aff7075e9415eec93f4d92065}{\index{Csharp\-U\-S\-B\-Joystick\-::\-U\-S\-B\-\_\-\-Joystick@{Csharp\-U\-S\-B\-Joystick\-::\-U\-S\-B\-\_\-\-Joystick}!Unacquire\-App\-Device@{Unacquire\-App\-Device}}
\index{Unacquire\-App\-Device@{Unacquire\-App\-Device}!CsharpUSBJoystick::USB_Joystick@{Csharp\-U\-S\-B\-Joystick\-::\-U\-S\-B\-\_\-\-Joystick}}
\subsubsection[{Unacquire\-App\-Device}]{\setlength{\rightskip}{0pt plus 5cm}void Csharp\-U\-S\-B\-Joystick.\-U\-S\-B\-\_\-\-Joystick.\-Unacquire\-App\-Device (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
)}}\label{class_csharp_u_s_b_joystick_1_1_u_s_b___joystick_a4041238aff7075e9415eec93f4d92065}


Unacquires the device 



Definition at line 454 of file U\-S\-B\-Joystick.\-cs.



\subsection{Property Documentation}
\hypertarget{class_csharp_u_s_b_joystick_1_1_u_s_b___joystick_a345d6b7cca7a8c09ef73024d356de36d}{\index{Csharp\-U\-S\-B\-Joystick\-::\-U\-S\-B\-\_\-\-Joystick@{Csharp\-U\-S\-B\-Joystick\-::\-U\-S\-B\-\_\-\-Joystick}!Get\-Raw\-X\-Y\-Perc@{Get\-Raw\-X\-Y\-Perc}}
\index{Get\-Raw\-X\-Y\-Perc@{Get\-Raw\-X\-Y\-Perc}!CsharpUSBJoystick::USB_Joystick@{Csharp\-U\-S\-B\-Joystick\-::\-U\-S\-B\-\_\-\-Joystick}}
\subsubsection[{Get\-Raw\-X\-Y\-Perc}]{\setlength{\rightskip}{0pt plus 5cm}System.\-Drawing.\-Point\-F Csharp\-U\-S\-B\-Joystick.\-U\-S\-B\-\_\-\-Joystick.\-Get\-Raw\-X\-Y\-Perc\hspace{0.3cm}{\ttfamily [get]}}}\label{class_csharp_u_s_b_joystick_1_1_u_s_b___joystick_a345d6b7cca7a8c09ef73024d356de36d}


Returns the raw value of the joystick's X and Y coordinates converted into a percent. 



Definition at line 230 of file U\-S\-B\-Joystick.\-cs.

\hypertarget{class_csharp_u_s_b_joystick_1_1_u_s_b___joystick_a2306dcd10f49238d9fac1eea9e60e9a1}{\index{Csharp\-U\-S\-B\-Joystick\-::\-U\-S\-B\-\_\-\-Joystick@{Csharp\-U\-S\-B\-Joystick\-::\-U\-S\-B\-\_\-\-Joystick}!Is\-X\-Y\-Inside\-Threshold@{Is\-X\-Y\-Inside\-Threshold}}
\index{Is\-X\-Y\-Inside\-Threshold@{Is\-X\-Y\-Inside\-Threshold}!CsharpUSBJoystick::USB_Joystick@{Csharp\-U\-S\-B\-Joystick\-::\-U\-S\-B\-\_\-\-Joystick}}
\subsubsection[{Is\-X\-Y\-Inside\-Threshold}]{\setlength{\rightskip}{0pt plus 5cm}bool Csharp\-U\-S\-B\-Joystick.\-U\-S\-B\-\_\-\-Joystick.\-Is\-X\-Y\-Inside\-Threshold\hspace{0.3cm}{\ttfamily [get]}}}\label{class_csharp_u_s_b_joystick_1_1_u_s_b___joystick_a2306dcd10f49238d9fac1eea9e60e9a1}


Returns true if the joystick's current position is inside the threshold 



Definition at line 337 of file U\-S\-B\-Joystick.\-cs.

\hypertarget{class_csharp_u_s_b_joystick_1_1_u_s_b___joystick_a8aebeb2d525f77e58f456bf88c178977}{\index{Csharp\-U\-S\-B\-Joystick\-::\-U\-S\-B\-\_\-\-Joystick@{Csharp\-U\-S\-B\-Joystick\-::\-U\-S\-B\-\_\-\-Joystick}!Number\-Of\-Buttons@{Number\-Of\-Buttons}}
\index{Number\-Of\-Buttons@{Number\-Of\-Buttons}!CsharpUSBJoystick::USB_Joystick@{Csharp\-U\-S\-B\-Joystick\-::\-U\-S\-B\-\_\-\-Joystick}}
\subsubsection[{Number\-Of\-Buttons}]{\setlength{\rightskip}{0pt plus 5cm}int Csharp\-U\-S\-B\-Joystick.\-U\-S\-B\-\_\-\-Joystick.\-Number\-Of\-Buttons\hspace{0.3cm}{\ttfamily [get]}}}\label{class_csharp_u_s_b_joystick_1_1_u_s_b___joystick_a8aebeb2d525f77e58f456bf88c178977}


Returns the number of buttons on the joystick. 



Definition at line 243 of file U\-S\-B\-Joystick.\-cs.

\hypertarget{class_csharp_u_s_b_joystick_1_1_u_s_b___joystick_ac1196c81942f1622c416d07df9ed0983}{\index{Csharp\-U\-S\-B\-Joystick\-::\-U\-S\-B\-\_\-\-Joystick@{Csharp\-U\-S\-B\-Joystick\-::\-U\-S\-B\-\_\-\-Joystick}!State@{State}}
\index{State@{State}!CsharpUSBJoystick::USB_Joystick@{Csharp\-U\-S\-B\-Joystick\-::\-U\-S\-B\-\_\-\-Joystick}}
\subsubsection[{State}]{\setlength{\rightskip}{0pt plus 5cm}Joystick\-State Csharp\-U\-S\-B\-Joystick.\-U\-S\-B\-\_\-\-Joystick.\-State\hspace{0.3cm}{\ttfamily [get]}}}\label{class_csharp_u_s_b_joystick_1_1_u_s_b___joystick_ac1196c81942f1622c416d07df9ed0983}


Returns the current Joystick state. 



Definition at line 206 of file U\-S\-B\-Joystick.\-cs.

\hypertarget{class_csharp_u_s_b_joystick_1_1_u_s_b___joystick_ace3b09e64898bc5ab7e08a2ace75b815}{\index{Csharp\-U\-S\-B\-Joystick\-::\-U\-S\-B\-\_\-\-Joystick@{Csharp\-U\-S\-B\-Joystick\-::\-U\-S\-B\-\_\-\-Joystick}!Threshold\-Max@{Threshold\-Max}}
\index{Threshold\-Max@{Threshold\-Max}!CsharpUSBJoystick::USB_Joystick@{Csharp\-U\-S\-B\-Joystick\-::\-U\-S\-B\-\_\-\-Joystick}}
\subsubsection[{Threshold\-Max}]{\setlength{\rightskip}{0pt plus 5cm}int Csharp\-U\-S\-B\-Joystick.\-U\-S\-B\-\_\-\-Joystick.\-Threshold\-Max\hspace{0.3cm}{\ttfamily [get]}}}\label{class_csharp_u_s_b_joystick_1_1_u_s_b___joystick_ace3b09e64898bc5ab7e08a2ace75b815}


Returns the maximum value of the threshold. 



Definition at line 218 of file U\-S\-B\-Joystick.\-cs.

\hypertarget{class_csharp_u_s_b_joystick_1_1_u_s_b___joystick_a4e86e4beedcfa4b8891025aabb9654f4}{\index{Csharp\-U\-S\-B\-Joystick\-::\-U\-S\-B\-\_\-\-Joystick@{Csharp\-U\-S\-B\-Joystick\-::\-U\-S\-B\-\_\-\-Joystick}!Threshold\-Min@{Threshold\-Min}}
\index{Threshold\-Min@{Threshold\-Min}!CsharpUSBJoystick::USB_Joystick@{Csharp\-U\-S\-B\-Joystick\-::\-U\-S\-B\-\_\-\-Joystick}}
\subsubsection[{Threshold\-Min}]{\setlength{\rightskip}{0pt plus 5cm}int Csharp\-U\-S\-B\-Joystick.\-U\-S\-B\-\_\-\-Joystick.\-Threshold\-Min\hspace{0.3cm}{\ttfamily [get]}}}\label{class_csharp_u_s_b_joystick_1_1_u_s_b___joystick_a4e86e4beedcfa4b8891025aabb9654f4}


Returns the minimum value of the threshold. 



Definition at line 194 of file U\-S\-B\-Joystick.\-cs.

\hypertarget{class_csharp_u_s_b_joystick_1_1_u_s_b___joystick_ad5c030d06a53bcb41875bab45ce5a690}{\index{Csharp\-U\-S\-B\-Joystick\-::\-U\-S\-B\-\_\-\-Joystick@{Csharp\-U\-S\-B\-Joystick\-::\-U\-S\-B\-\_\-\-Joystick}!Threshold\-Perc@{Threshold\-Perc}}
\index{Threshold\-Perc@{Threshold\-Perc}!CsharpUSBJoystick::USB_Joystick@{Csharp\-U\-S\-B\-Joystick\-::\-U\-S\-B\-\_\-\-Joystick}}
\subsubsection[{Threshold\-Perc}]{\setlength{\rightskip}{0pt plus 5cm}double Csharp\-U\-S\-B\-Joystick.\-U\-S\-B\-\_\-\-Joystick.\-Threshold\-Perc\hspace{0.3cm}{\ttfamily [get]}, {\ttfamily [set]}}}\label{class_csharp_u_s_b_joystick_1_1_u_s_b___joystick_ad5c030d06a53bcb41875bab45ce5a690}


Gets or sets the threshold based on a percentage scale. 



Definition at line 177 of file U\-S\-B\-Joystick.\-cs.



The documentation for this class was generated from the following file\-:\begin{DoxyCompactItemize}
\item 
C\-:/\-Users/\-Ondra/\-Desktop/\-Wheelchair Control/U\-S\-B\-Joystick.\-cs\end{DoxyCompactItemize}
