当前位置: 首页>>代码示例>>C#>>正文


C# Gadgeteer.Stop方法代码示例

本文整理汇总了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;
        }
开发者ID:BigRunningBack,项目名称:gadgeteer_book,代码行数:7,代码来源:Program.cs

示例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();
        }
开发者ID:michboon,项目名称:comp2014,代码行数:17,代码来源:Program.cs

示例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);
        }
开发者ID:curtisstpierre,项目名称:distillery_controller,代码行数:8,代码来源:WifiWidget.cs

示例4: timer_Tick

 void timer_Tick(GT.Timer timer)
 {
     timer.Stop();
 }
开发者ID:jfcaiceo,项目名称:HomeSecurityGadgeteer,代码行数:4,代码来源:CameraClass.cs

示例5: startupTimer_Tick

 void startupTimer_Tick(GT.Timer timer)
 {
     timer.Stop();
     ChangeView(dashboardView);
     idleTimer.Start();
     controllerTimer.Start();
 }
开发者ID:Jlhaynes,项目名称:TemperatureControllerV2,代码行数:7,代码来源:TemperatureController.cs

示例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();
//.........这里部分代码省略.........
开发者ID:donnaknew,项目名称:programmingProject,代码行数:101,代码来源:HomeOSGadgeteerDevice.cs


注:本文中的Gadgeteer.Stop方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。