本文整理汇总了C#中Gadgeteer.Stop方法的典型用法代码示例。如果您正苦于以下问题:C# Gadgeteer.Stop方法的具体用法?C# Gadgeteer.Stop怎么用?C# Gadgeteer.Stop使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Gadgeteer
的用法示例。
在下文中一共展示了Gadgeteer.Stop方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: hideMessage_Tick
void hideMessage_Tick(GT.Timer timer)
{
timer.Stop();
label.Visibility = Visibility.Collapsed;
imageDisplay.Visibility = Visibility.Visible;
}
示例2: connect
void connect(GT.Timer timer)
{
timer.Stop();
wifi.Interface.Open();
wifi.Interface.NetworkInterface.EnableDhcp();
WiFiNetworkInfo[] scanResults = wifi.Interface.Scan(ssid);
foreach (WiFiNetworkInfo result in scanResults)
{
wifi.Interface.Join(result, password);
Debug.Print("Network Joined");
break;
}
run();
}
示例3: t_Tick
public void t_Tick(GT.Timer timer)
{
timer.Stop();
update_hotspots();
connect_to_hotspot("oram_2.4Ghz", "theAardvarkDidIt");
get("http://oram.ca", req_ResponseReceived);
}
示例4: timer_Tick
void timer_Tick(GT.Timer timer)
{
timer.Stop();
}
示例5: startupTimer_Tick
void startupTimer_Tick(GT.Timer timer)
{
timer.Stop();
ChangeView(dashboardView);
idleTimer.Start();
controllerTimer.Start();
}
示例6: wifiTimer_Tick
void wifiTimer_Tick(GT.Timer timer)
{
Debug.Print("wifiTimer start - currentAP " + (currentAP != null ? currentAP.SSID : "(null)") + " wifiUp " + wifiConnected + (wifiConnected ? " IP " + wifi.Interface.NetworkInterface.IPAddress : ""));
if (sp != null)
{
var spMessage = BroadcastMessageWithNewline;
sp.Write(spMessage, 0, spMessage.Length);
}
if (SkipWifiTimer())
{
Debug.Print("aborting wifitimer tick since SkipWifiTimer delegate is true");
return;
}
if (wifiConnected && currentAP == null)
{
Debug.Print("ERROR: wifi is up but current AP is null! Disconnecting.");
currentAP = null;
wifiConnected = false;
SetLed();
SetScreen();
wifi.Interface.Disconnect();
WebServer.StopLocalServer();
return;
}
if (currentAP != null && !wifiConnected)
{
wifiUpTime++;
if (wifiUpTime == wifiUpTimeout)
{
Debug.Print("WARN: starting wifi for " + currentAP.SSID + " timeout - resetting currentAP");
currentAP = null;
wifiConnected = false;
SetLed();
SetScreen();
wifi.Interface.Disconnect();
WebServer.StopLocalServer();
return;
}
}
if (wifiConnected && currentAP != null && APDetails.IsSetupAP(currentAP))
{
if (GT.Timer.GetMachineTime() - joinTime > maxTimeOnSetupNetwork)
{
Debug.Print("Disconnecting from setup AP due to timeout (setup should not take this long)");
currentAP = null;
wifiConnected = false;
SetLed();
SetScreen();
wifi.Interface.Disconnect();
WebServer.StopLocalServer();
return;
}
else
{
// only sending unsolicited beacons when we're not on the home network
Debug.Print("Sending unsolicited UDP beacon since we're on a setup network");
SendUDPBroadcast(BeaconPort);
}
}
if (wifiConnected && currentAP != null)
{
if (!WebServer.IsRunning()) WebServer.StartLocalServer(wifi.Interface.NetworkInterface.IPAddress, 80);
}
// skip scanning when connected since it fails
if (currentAP == null)
{
try
{
var scan = wifi.Interface.Scan();
Thread.Sleep(1);
foreach (var ap in scan)
{
Debug.Print("Scanned AP " + ap.SSID + " rssi " + ap.RSSI);
}
if (scan != null) foreach (APDetails knownAP in wifiNetworks)
{
// APs are in priority order, so break once we see the current ap
if (knownAP.Matches(currentAP)) break;
WiFiNetworkInfo joinAP = null;
foreach (var scanAP in scan)
{
if (!knownAP.Matches(scanAP)) continue;
if (joinAP == null) joinAP = scanAP;
if (joinAP.RSSI > scanAP.RSSI) joinAP = scanAP; // lower RSSI is better
}
if (joinAP == null) continue;
try
{
if (currentAP != null)
{
Debug.Print("Disconnecting from WiFi network " + currentAP + " to join " + joinAP.SSID);
wifi.Interface.Disconnect();
//.........这里部分代码省略.........