private bool CheckSystemState(out string errorInfo) { errorInfo = string.Empty; bool flag = SystemInfo.GetAllNetInfo() != null; bool result; if (flag) { this.MacStr = SystemInfo.GetAllNetInfo()[0].PhysAddr; result = true; } else { errorInfo = "未联网,系统无法运行!"; result = false; } return(result); }