void ConvertZonesBack(DeviceConfiguration deviceConfiguration, Firesec.Models.CoreConfiguration.config coreConfig)
		{
			var innerZones = new List<zoneType>();
			foreach (var zone in deviceConfiguration.Zones)
			{
				var innerZone = new zoneType()
				{
					name = zone.Name,
					idx = zone.No.ToString(),
					no = zone.No.ToString(),
					desc = zone.Description
				};
				if (innerZone.name != null)
					innerZone.name = innerZone.name.Replace('№', 'N');
				if (innerZone.desc != null)
					innerZone.desc = innerZone.desc.Replace('№', 'N');

				if (zone.ShapeIds != null && zone.ShapeIds.Count > 0)
				{
					var innerShapes = new List<shapeType>();
					foreach (var shapeId in zone.ShapeIds)
					{
						var innerShape = new shapeType()
						{
							id = shapeId
						};
						innerShapes.Add(innerShape);
					}
					innerZone.shape = innerShapes.ToArray();
				}

				var zoneParams = new List<paramType>();
				zoneParams.Add(new paramType()
				{
					name = "ZoneType",
					type = "Int",
					value = (zone.ZoneType == ZoneType.Fire) ? "0" : "1"
				});
				zoneParams.Add(new paramType()
				{
					name = "Skipped",
					type = "Bool",
					value = zone.Skipped ? "1" : "0"
				});
				zoneParams.Add(new paramType()
				{
					name = "EnableExitTime",
					type = "Bool",
					value = zone.EnableExitTime ? "1" : "0"
				});
				zoneParams.Add(new paramType()
				{
					name = "ExitRestoreType",
					type = "Int",
					value = (zone.ExitRestoreType == ExitRestoreType.SetTimer) ? "0" : "1"
				});
				zoneParams.Add(new paramType()
				{
					name = "GuardZoneType",
					type = "Int",
					value = ((int)zone.GuardZoneType).ToString()
				});
				if (zone.DetectorCount > 0)
				{
					zoneParams.Add(new paramType()
					{
						name = "FireDeviceCount",
						type = "Int",
						value = zone.DetectorCount.ToString()
					});
				}
				zoneParams.Add(new paramType()
				{
					name = "ExitTime",
					type = "SmallInt",
					value = zone.EvacuationTime.ToString()
				});
				zoneParams.Add(new paramType()
				{
					name = "AutoSet",
					type = "Int",
					value = zone.AutoSet.ToString()
				});
				zoneParams.Add(new paramType()
				{
					name = "Delay",
					type = "Int",
					value = zone.Delay.ToString()
				});

				if (zoneParams.Count > 0)
					innerZone.param = zoneParams.ToArray();

				innerZones.Add(innerZone);
			}

			if (innerZones.Count > 0)
				coreConfig.zone = innerZones.ToArray();
			else
				coreConfig.zone = null;
		}
		List<shapeType> AddShapes(Device device)
		{
			var shapeTypes = new List<shapeType>();
			if (device.ShapeIds != null)
			foreach (var shapeId in device.ShapeIds)
			{
				var shape = new shapeType()
				{
					id = shapeId
				};
				shapeTypes.Add(shape);
			}
			return shapeTypes;
		}