private bool LoadSettings() { bool ok = true; try { string monoVersion = "Unknown"; Type type = Type.GetType("Mono.Runtime"); if (type != null) { MethodInfo displayName = type.GetMethod("GetDisplayName", BindingFlags.NonPublic | BindingFlags.Static); if (displayName != null) monoVersion = (string)displayName.Invoke(null, null); } string monoCLR = System.Reflection.Assembly.GetExecutingAssembly().ImageRuntimeVersion; var currentVersion = UpdateHelper.InstalledVersion (); string ip = WiFiDevice.GetIpAddress(); information = new Information(); information.FirmwareVersion = currentVersion.Firmware; information.ImageVersion = currentVersion.Image; information.IpAddress = ip; information.MonoCLRVersion = monoCLR; information.MonoVersion = monoVersion; } catch { ok = false; } return ok; }
private void OnInformationLoaded(Information info) { information = info; }