Exemplo n.º 1
0
		public static OperationResult<bool> GKUpdateFirmware(XDevice device, string fileName, string userName)
		{
			Stop();
			var firmwareUpdateHelper = new FirmwareUpdateHelper();
			firmwareUpdateHelper.Update(device, fileName, userName);
			Start();
			if (firmwareUpdateHelper.ErrorList.Count > 0)
				return new OperationResult<bool>(firmwareUpdateHelper.ErrorList.Aggregate((a,b)=> a + "\n" + b)) { Result = false };
			return new OperationResult<bool> { Result = true };
		}
Exemplo n.º 2
0
		public static OperationResult<bool> GKUpdateFirmware(GKDevice device, List<byte> firmwareBytes, string userName, Guid clientUID)
		{
			Stop();
			var firmwareUpdateHelper = new FirmwareUpdateHelper();
			string updateResult = firmwareUpdateHelper.Update(device, firmwareBytes, userName, clientUID);
			Start();
			if (updateResult != null)
				return OperationResult<bool>.FromError(updateResult, false);
			return new OperationResult<bool>(true);
		}