| | |
| | | using System; |
| | | using Shared.SimpleControl; |
| | | using Shared.SimpleControl.Phone; |
| | | |
| | | namespace Shared |
| | | { |
| | | public class Utlis |
| | |
| | | // return value; |
| | | //} |
| | | |
| | | /// <summary> |
| | | /// 全局打印 |
| | | /// </summary> |
| | | public static void WriteLine (object mes) |
| | | { |
| | | #if DEBUG |
| | | System.Console.WriteLine (mes); |
| | | #endif |
| | | } |
| | | |
| | | public static int StringToInt (string mStr) { |
| | | try { |
| | | return int.Parse (mStr); |
| | |
| | | } |
| | | } |
| | | |
| | | } |
| | | public static void ShowAppLinkStatus (AppLinkStatus mStatus) { |
| | | |
| | | switch (mStatus) { |
| | | case AppLinkStatus.CloudLink: |
| | | MainPage.WiFiStatus = "CrabtreeAdd/CloudLink.png"; |
| | | break; |
| | | case AppLinkStatus.CloudUnlink: |
| | | MainPage.WiFiStatus = "CrabtreeAdd/CloudUnlink.png"; |
| | | break; |
| | | case AppLinkStatus.CloudOffline: |
| | | MainPage.WiFiStatus = "CrabtreeAdd/CloudOffline.png"; |
| | | break; |
| | | case AppLinkStatus.WiFi: |
| | | MainPage.WiFiStatus = "CrabtreeAdd/WiFi.png"; |
| | | break; |
| | | case AppLinkStatus.WiFiUnlink: |
| | | MainPage.WiFiStatus = "CrabtreeAdd/WiFiUnlink.png"; |
| | | break; |
| | | case AppLinkStatus.WiFiOffline: |
| | | MainPage.WiFiStatus = "CrabtreeAdd/WiFiOffline.png"; |
| | | break; |
| | | default: |
| | | |
| | | |
| | | break; |
| | | } |
| | | |
| | | Shared.Application.RunOnMainThread (() => { |
| | | UserMiddle.btnLinkStatus.UnSelectedImagePath = MainPage.WiFiStatus; |
| | | }); |
| | | |
| | | } |
| | | |
| | | } |
| | | } |