public static OperationResult<XDeviceConfiguration> GKReadConfigurationFromGKFile(XDevice device, string userName) { AddGKMessage(EventName.Чтение_конфигурации_из_прибора, "", device, userName, true); SuspendMonitoring(device); var gkFileReaderWriter = new GKFileReaderWriter(); var deviceConfiguration = gkFileReaderWriter.ReadConfigFileFromGK(device); ResumeMonitoring(device); return new OperationResult<XDeviceConfiguration> { HasError = gkFileReaderWriter.Error != null, Error = gkFileReaderWriter.Error, Result = deviceConfiguration }; }
public static OperationResult<string> GKReadConfigurationFromGKFile(GKDevice device, string userName, GKProgressCallback progressCallback, Guid clientUID) { AddGKMessage(JournalEventNameType.Чтение_конфигурации_из_прибора, JournalEventDescriptionType.NULL, "", device, userName); SuspendMonitoring(device); var gkFileReaderWriter = new GKFileReaderWriter(); var filePath = gkFileReaderWriter.ReadConfigFileFromGK(device, progressCallback, clientUID); ResumeMonitoring(device); return filePath; }