| | |
| | | public class RemoteOnePort : FrameLayout |
| | | { |
| | | #region 文本 |
| | | string text_Title = "远程连接"; |
| | | string text_Title = "远程"; |
| | | string text_userName = "用户名"; |
| | | string text_projectName ="工程名"; |
| | | string text_password = "密码"; |
| | | string text_entry_userName_tip = "请输入组名。"; |
| | | string text_entry_projectName_tip = "请输入工程名。"; |
| | | string text_entry_password_tip = "请输入密码。"; |
| | | string text_link = "连接一端口"; |
| | | string text_link = "连接并配置"; |
| | | string text_back = "后退"; |
| | | string text_reading = "读取中"; |
| | | /// <summary> |
| | |
| | | text_UnknownVersion = "Other version"; |
| | | text_readFailure = "Read failure"; |
| | | text_back = "Back"; |
| | | text_link = "Link"; |
| | | text_link = "Connect and configure"; |
| | | text_reading = "Reading"; |
| | | txt_breakLink = "Break link"; |
| | | txt_connectionSucceeded = "Connection succeeded"; |
| | |
| | | userNameView.AddChidren (tvUserName); |
| | | |
| | | var btnLine = new Button () { |
| | | Height = Application.GetRealHeight (1), |
| | | Height = Application.GetRealHeight (2), |
| | | BackgroundColor = SkinStyle.Current.LineColor, |
| | | }; |
| | | infoView.AddChidren (btnLine); |
| | |
| | | projectNameView.AddChidren (tvProjectName); |
| | | |
| | | var btnLine1 = new Button () { |
| | | Height = Application.GetRealHeight (1), |
| | | Height = Application.GetRealHeight (2), |
| | | BackgroundColor = SkinStyle.Current.LineColor, |
| | | }; |
| | | infoView.AddChidren (btnLine1); |
| | |
| | | passwrodView.AddChidren (tvPassword); |
| | | |
| | | var btnLine2 = new Button () { |
| | | Height = Application.GetRealHeight (1), |
| | | Height = Application.GetRealHeight (2), |
| | | BackgroundColor = SkinStyle.Current.LineColor, |
| | | }; |
| | | infoView.AddChidren (btnLine2); |
| | |
| | | CommonPage.RandomHigh = (byte)new Random ().Next (255); |
| | | CommonPage.RandomLow = (byte)new Random ().Next (255); |
| | | CommonPage.GateWayList.Clear (); |
| | | CommonPage.FindGateway = true; |
| | | //如果两次都没有数据反馈,就不读取 |
| | | int readCount = 2; |
| | | while (0 < readCount) { |
| | |
| | | readCount = 2; |
| | | } |
| | | } |
| | | CommonPage.FindGateway = false; |
| | | |
| | | |
| | | Application.RunOnMainThread (() => { |
| | |
| | | } else { |
| | | CommonPage.IsRemote = false; |
| | | Application.RunOnMainThread (() => { |
| | | MainPage.Loading.Hide (); |
| | | infoView.AddChidren (rightButton1); |
| | | rightButton1.Text = linkResult; |
| | | rightButton1.TextColor = 0x99ff0000; |
| | | MainPage.Loading.Hide (); |
| | | }); |
| | | } |
| | | }) { IsBackground = true }.Start (); |
| | |
| | | } |
| | | |
| | | |
| | | #if DEBUG |
| | | return; |
| | | #endif |
| | | var mobytes = Control.ControlBytesSendHasReturn (Command.SetGateWayModelInternetInfo, common.SubnetID, common.DeviceID, serverIPBytes); |
| | | if (mobytes == null || mobytes [0] == 0xF5) { |
| | | Application.RunOnMainThread (() => { |