| | |
| | | |
| | | BaseActivity.NetworkStateChanged += (int obj) => |
| | | { |
| | | |
| | | if (!IsEnterBackground) |
| | | { |
| | | BusSocket.Stop(); |
| | | //BusSocket.Stop(); |
| | | new System.Threading.Thread(() => |
| | | { |
| | | System.Threading.Thread.Sleep(1000); |
| | | BusSocket.Start(6000); |
| | | //BusSocket.Start(); |
| | | }) |
| | | { IsBackground = true }.Start(); |
| | | } |
| | |
| | | BaseActivity.OnDestroyAction += (activity) => |
| | | { |
| | | Console.WriteLine("OnDestroyAction"); |
| | | BusSocket.Stop(); |
| | | //BusSocket.Stop(); |
| | | OnAppConfig.Instance.unlockTime = DateTime.Now; |
| | | }; |
| | | |
| | |
| | | void BusSocketStop() |
| | | { |
| | | IsEnterBackground = true; |
| | | BusSocket.Stop(); |
| | | //BusSocket.Stop(); |
| | | OnAppConfig.Instance.unlockTime = DateTime.Now; |
| | | } |
| | | |
| | |
| | | { |
| | | IsEnterBackground = false; |
| | | |
| | | BusSocket.Start(6000); |
| | | //BusSocket.Start(); |
| | | } |
| | | } |
| | | } |