void FillElementItems(ItemList.ElementItem[] elementItems, SynesisRegionRuleModel model) { elementItems.ForEach(x => { switch (x.name) { case "DirectionAlarm": model.DirectionAlarm = x.any.Deserialize<synesis.DirectionAlarm>(); break; case "LoiteringAlarm": model.LoiteringAlarm = x.any.Deserialize<synesis.LoiteringAlarm>(); break; case "Points": model.Points = x.any.Deserialize<synesis.RegionPoints>(); ScalePointsInput(model.Points); break; case "SpeedAlarm": model.SpeedAlarm = x.any.Deserialize<synesis.SpeedAlarm>(); break; case "AbandonedItemAlarm": model.AbandonedItemAlarm = x.any.Deserialize<synesis.AbandonedItemAlarm>(); break; case "RegionMotionAlarm": model.RegionMotionAlarm = x.any.Deserialize<synesis.RegionMotionAlarm>(); break; } }); }
void FillSimpleItems(ItemList.SimpleItem[] simpleItems, SynesisTripWireRuleModel model) { simpleItems.ForEach(x => { switch (x.name) { case "Direction": switch (x.value) { case "FromLeft": model.TripDirection = controls.GraphEditor.TripWireEditor.TripWireDirection.FromLeft; break; case "FromRight": model.TripDirection = controls.GraphEditor.TripWireEditor.TripWireDirection.FromRight; break; case "FromBoth": model.TripDirection = controls.GraphEditor.TripWireEditor.TripWireDirection.FromBoth; break; } //model.ruleId = XmlConvert.ToInt32(x.Value); break; } }); }
void FillElementItems(ItemList.ElementItem[] elementItems, SynesisTripWireRuleModel model) { elementItems.ForEach(x => { switch (x.name) { case "Points": model.TripPoints = x.any.Deserialize<synesis.TripWirePoints>(); ScalePointsInput(model.TripPoints); break; //case "Direction": // int i = 0; // //model.TripDirection = x.Any.Deserialize<synesis.TripWireDirection>(); // break; } }); }
void FillData(ItemList.SimpleItem[] simpleItems, SynesisAnalyticsModel model) { simpleItems.ForEach(simple => { switch (simple.name) { case "EnableMovingRects": model.EnableMovingRects = DataConverter.StringToBool(simple.value); break; case "EnableSpeed": model.EnableSpeed = DataConverter.StringToBool(simple.value); break; case "EnableTimestamp": model.EnableTimestamp = DataConverter.StringToBool(simple.value); break; case "EnableSystemInformation": model.EnableSystemInformation = DataConverter.StringToBool(simple.value); break; case "EnableChannelName": model.EnableChannelName = DataConverter.StringToBool(simple.value); break; case "EnableTracking": model.EnableTracking = DataConverter.StringToBool(simple.value); break; case "EnableUserRegion": model.EnableUserRegion = DataConverter.StringToBool(simple.value); break; case "EnableRules": model.EnableRules = DataConverter.StringToBool(simple.value); break; case "EnableCalibrationResults": model.EnableCalibrationResults = DataConverter.StringToBool(simple.value); break; } }); }
void FillElementItems(ItemList.ElementItem[] elementItems, SynesisAnalyticsModel model) { elementItems.ForEach(x => { switch (x.name) { case "AntishakerCrop": model.AntishakerCrop = x.any.Deserialize<synesis.AntishakerCrop>(); ScaleAntishakerCropInput(model.AntishakerCrop); break; case "MarkerCalibration": model.Markers = x.any.Deserialize<synesis.MarkerCalibration>(); ScaleMarkersInput(model.Markers); break; case "UserRegion": model.UserRegion = x.any.Deserialize<synesis.UserRegion>(); ScaleUserRegionInput(model.UserRegion); break; } }); }
void FillSimpleItems(ItemList.SimpleItem[] simpleItems, SynesisAnalyticsModel model) { simpleItems.ForEach(x => { switch (x.name) { case "StabilizationTime": model.StabilizationTime = DataConverter.StringToInt(x.value); break; case "ShiftOutputPicture": model.ShiftOutputPicture = DataConverter.StringToBool(x.value); break; case "UseObjectTracker": model.UseObjectTracker = DataConverter.StringToBool(x.value); break; case "MaxObjectArea": model.MaxObjectArea = DataConverter.StringToFloat(x.value); break; case "MinObjectArea": model.MinObjectArea = DataConverter.StringToFloat(x.value); break; case "MaxObjectSpeed": model.MaxObjectSpeed = DataConverter.StringToFloat(x.value); break; case "DisplacementSensitivity": model.DisplacementSensivity = DataConverter.StringToInt(x.value); break; case "CameraObstructed": model.CameraObstructed = DataConverter.StringToBool(x.value); break; case "UseAntishaker": model.UseAntishaker = DataConverter.StringToBool(x.value); break; case "CameraRedirected": model.CameraRedirected = DataConverter.StringToBool(x.value); break; case "ContrastSensitivity": model.ContrastSensivity = DataConverter.StringToInt(x.value); break; case "ImageTooDark": model.ImageTooDark = DataConverter.StringToBool(x.value); break; case "ImageTooBlurry": model.ImageTooBlurry = DataConverter.StringToBool(x.value); break; case "ImageTooBright": model.ImageTooBright = DataConverter.StringToBool(x.value); break; case "ImageTooNoisy": model.ImageTooNoisy = DataConverter.StringToBool(x.value); break; } }); }