本文整理汇总了C#中Waiter.Stop方法的典型用法代码示例。如果您正苦于以下问题:C# Waiter.Stop方法的具体用法?C# Waiter.Stop怎么用?C# Waiter.Stop使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Waiter
的用法示例。
在下文中一共展示了Waiter.Stop方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Test
public void Test()
{
var waiter = new Waiter();
waiter.Start();
Console.WriteLine("Waiter started");
Thread.Sleep(5000);
waiter.Stop();
Console.WriteLine("Waiter stopped");
}
示例2: AppbarItemSelected
void AppbarItemSelected()
{
Waiter w;
int i = frmMainAppbar.SelectedIndex;
frmMainAppbar.RemoveMenuItemAt(i);
if (_running)
{
_running = !_running;
w = new Waiter("Terminating Pacman", Fonts.Calibri14);
w.Start();
Graphics.Host.TerminateApplication(Graphics.Host.RunningApplications[0]);
w.Stop();
frmMainAppbar.AddMenuItem("Launch Pacman");
}
else
{
if (!sdCard.IsCardMounted)
{
if (!sdCard.IsCardInserted)
{
Prompt.Show("Insert SD", "Cannot run without SD card and files", Fonts.Calibri18Bold, Fonts.Calibri14, PromptType.OK);
return;
}
sdCard.MountSDCard();
}
_running = !_running;
w = new Waiter("Launching Pacman", Fonts.Calibri14);
w.Start();
Graphics.Host.LaunchApplication("\\SD\\Pacman\\TinkrPacManApp.pe");
w.Stop();
frmMainAppbar.AddMenuItem("Terminate Pacman");
}
}