public override string ToString() { var sb = new StringBuilder("RuyiNetworkTestResult("); bool __first = true; if (Localconnection != null && __isset.localconnection) { if (!__first) { sb.Append(", "); } __first = false; sb.Append("Localconnection: "); sb.Append(Localconnection == null ? "<null>" : Localconnection.ToString()); } if (Ipaddress != null && __isset.ipaddress) { if (!__first) { sb.Append(", "); } __first = false; sb.Append("Ipaddress: "); sb.Append(Ipaddress == null ? "<null>" : Ipaddress.ToString()); } if (Internetconnection != null && __isset.internetconnection) { if (!__first) { sb.Append(", "); } __first = false; sb.Append("Internetconnection: "); sb.Append(Internetconnection == null ? "<null>" : Internetconnection.ToString()); } sb.Append(")"); return(sb.ToString()); }
void Wnd1(int id) { if (focusWindow) { GUI.FocusWindow(id); GUI.BringWindowToFront(id); } focusWindow = false; bool onMouseOver; GUI.BeginGroup(new Rect(8f, 27f, 329f, 81f), ""); GUI.Box(new Rect(0, 0, 329f, 81f), ""); GUI.Label(new Rect(17f, 30f, 80f, 21.96f), @"ip address"); if (vipaddress) { if (focusIpaddress) { focusIpaddress = false; GUI.FocusControl("Ipaddress"); } GUI.SetNextControlName("Ipaddress"); if (rIpaddress) { GUI.Label(new Rect(103.3f, 30f, 123f, 14f), Ipaddress.ToString()); } else { try { Ipaddress = GUI.TextField(new Rect(103.3f, 30f, 123f, 14f), Ipaddress, 100); }catch {} }; } GUI.Label(new Rect(64.38f, 48f, 32.32333f, 21.96f), @"port"); if (vport) { if (focusPort) { focusPort = false; GUI.FocusControl("Port"); } GUI.SetNextControlName("Port"); if (rPort) { GUI.Label(new Rect(103.3f, 48f, 123f, 14f), Port.ToString()); } else { try { Port = int.Parse(GUI.TextField(new Rect(103.3f, 48f, 123f, 14f), Port.ToString(), 100)); }catch {} }; } if (vconnect) { if (focusConnect) { focusConnect = false; GUI.FocusControl("Connect"); } GUI.SetNextControlName("Connect"); bool oldConnect = Connect; Connect = GUI.Button(new Rect(244f, 30f, 75f, 32f), new GUIContent(@"Connect", "")); if (Connect != oldConnect && Connect) { Action("Connect"); onButtonClick(); } onMouseOver = new Rect(244f, 30f, 75f, 32f).Contains(Event.current.mousePosition); if (oldMouseOverConnect != onMouseOver && onMouseOver) { onOver(); } oldMouseOverConnect = onMouseOver; } GUI.EndGroup(); GUI.BeginGroup(new Rect(8f, 112f, 723f, 355f), ""); GUI.Box(new Rect(0, 0, 723f, 355f), ""); if (vServersTable) { if (focusServersTable) { focusServersTable = false; GUI.FocusControl("ServersTable"); } GUI.SetNextControlName("ServersTable"); GUI.Box(new Rect(8f, 48f, 707f, 299f), ""); sServersTable = GUI.BeginScrollView(new Rect(8f, 48f, 707f, 299f), sServersTable, new Rect(0, 0, 697f, lServersTable.Length * 15f)); int oldServersTable = iServersTable; iServersTable = GUI.SelectionGrid(new Rect(0, 0, 697f, lServersTable.Length * 15f), iServersTable, lServersTable, 1, GUI.skin.customStyles[0]); if (iServersTable != oldServersTable) { Action("ServersTable"); } GUI.EndScrollView(); } GUI.Label(new Rect(0f, 0f, 114.45f, 14f), @"Server List"); if (vRefresh) { if (focusRefresh) { focusRefresh = false; GUI.FocusControl("Refresh"); } GUI.SetNextControlName("Refresh"); bool oldRefresh = Refresh; Refresh = GUI.Button(new Rect(633f, 4.04f, 82f, 21.96f), new GUIContent(@"Refresh", "")); if (Refresh != oldRefresh && Refresh) { Action("Refresh"); onButtonClick(); } onMouseOver = new Rect(633f, 4.04f, 82f, 21.96f).Contains(Event.current.mousePosition); if (oldMouseOverRefresh != onMouseOver && onMouseOver) { onOver(); } oldMouseOverRefresh = onMouseOver; } if (vserversTitle) { if (focusServersTitle) { focusServersTitle = false; GUI.FocusControl("ServersTitle"); } GUI.SetNextControlName("ServersTitle"); if (rServersTitle) { GUI.Label(new Rect(8f, 30f, 707f, 14f), ServersTitle.ToString(), GUI.skin.customStyles[2]); } else { try { ServersTitle = GUI.TextField(new Rect(8f, 30f, 707f, 14f), ServersTitle, 100, GUI.skin.customStyles[2]); }catch {} }; } GUI.EndGroup(); GUI.Label(new Rect(8f, 27f, 56.61f, 14f), @"Server"); if (vhostCount) { if (focusHostCount) { focusHostCount = false; GUI.FocusControl("HostCount"); } GUI.SetNextControlName("HostCount"); if (rHostCount) { GUI.Label(new Rect(550f, 476f, 39f, 14f), HostCount.ToString(), GUI.skin.customStyles[2]); } else { try { HostCount = int.Parse(GUI.TextField(new Rect(550f, 476f, 39f, 14f), HostCount.ToString(), 100, GUI.skin.customStyles[2])); }catch {} }; } if (GUI.Button(new Rect(739f - 25, 5, 20, 15), "X")) { enabled = false; onButtonClick(); Action("Close"); } }