【发布时间】:2013-04-07 21:10:35
【问题描述】:
真的不知道如何正确地用这个词,所以请原谅糟糕的标题名称。
我正在使用计时器来检测我的 Xbox 上的按钮何时被按下。到目前为止它有效,但我用它在屏幕上打印文本。我需要它打印一次然后停止,在我关闭应用程序之前它会继续打印。
感谢任何帮助,
谢谢。
private void timer4_Tick(object sender, EventArgs e)
{
for (int i = 0; i <= 17; i++)
{// all client? yes
try
{
uint LB = buttonpressed(i);
uint RB = buttonpressed(i);
uint A = buttonpressed(i);
uint X = buttonpressed(i);
uint B = buttonpressed(i);
uint dpaddown = buttonpressed(i);
if (buttonpressed(0) == 0x4000)//Scrolling
{
scroll++;
}
else if (buttonpressed(0) == 0x8000)//Scrolling
{
scroll--;
}
if (MainMenu == 1 && scroll == 0)
{
Jtag.Call(0x82364E18, -1, 0, "v cg_chatHeight \"6\"");
Jtag.Call(0x82364E18, -1, 0, "v cg_chatTime \"60000\"");
Jtag.Call(0x82364E18, -1, 0, "v cg_hudsayposition \"250 250\"");
Jtag.Call(0x8233E8D8, 0, "say \"^4Option 1 Main Menu\"");
Jtag.Call(0x8233E8D8, 0, "say \"^1Option 2 Main Menu\"");
Jtag.Call(0x8233E8D8, 0, "say \"^1Option 3 Main Menu\"");
Jtag.Call(0x8233E8D8, 0, "say \"^1Option 4 Main Menu\"");
Jtag.Call(0x8233E8D8, 0, "say \"^1Option 5 Main Menu\"");
Jtag.Call(0x8233E8D8, 0, "say \"^1Option 6 Main Menu\"");
}
}
catch
{
MessageBox.Show("Error", "Not Connected");
}
}
}
`
【问题讨论】: