hawkeye camera support(not tested)
This commit is contained in:
@@ -230,4 +230,78 @@ public class FindManyBlobsExtOperation : BaseOperation
|
||||
ReferenceId = new Guid(br.ReadString());
|
||||
SearchArea.Load(br);
|
||||
}
|
||||
|
||||
public override void Save(Dictionary<string, object> dict)
|
||||
{
|
||||
base.Save(dict);
|
||||
dict[nameof(MinArea)] = MinArea;
|
||||
dict[nameof(MaxArea)] = MaxArea;
|
||||
dict[nameof(MinRadius)] = MinRadius;
|
||||
dict[nameof(MaxRadius)] = MaxRadius;
|
||||
dict[nameof(CheckInternalRadius)] = CheckInternalRadius;
|
||||
dict[nameof(MinInternalRadius)] = MinInternalRadius;
|
||||
dict[nameof(MaxInternalRadius)] = MaxInternalRadius;
|
||||
dict[nameof(CheckWidth)] = CheckWidth;
|
||||
dict[nameof(MinWidth)] = MinWidth;
|
||||
dict[nameof(MaxWidth)] = MaxWidth;
|
||||
dict[nameof(CheckHeight)] = CheckHeight;
|
||||
dict[nameof(MinHeight)] = MinHeight;
|
||||
dict[nameof(MaxHeight)] = MaxHeight;
|
||||
dict[nameof(ReferenceId)] = ReferenceId.ToString();
|
||||
|
||||
// Save SearchArea properties manually
|
||||
dict["SearchArea_Editable"] = SearchArea.Editable;
|
||||
dict["SearchArea_IsGood"] = SearchArea.IsGood;
|
||||
dict["SearchArea_LocationX"] = SearchArea.Location.X;
|
||||
dict["SearchArea_LocationY"] = SearchArea.Location.Y;
|
||||
dict["SearchArea_OffsetX"] = SearchArea.Offset.X;
|
||||
dict["SearchArea_OffsetY"] = SearchArea.Offset.Y;
|
||||
dict["SearchArea_SizeX"] = SearchArea.Size.X;
|
||||
dict["SearchArea_SizeY"] = SearchArea.Size.Y;
|
||||
}
|
||||
|
||||
public override void Load(Dictionary<string, object> dict)
|
||||
{
|
||||
base.Load(dict);
|
||||
if (dict.ContainsKey(nameof(MinArea)))
|
||||
MinArea = Convert.ToInt32(dict[nameof(MinArea)]);
|
||||
if (dict.ContainsKey(nameof(MaxArea)))
|
||||
MaxArea = Convert.ToInt32(dict[nameof(MaxArea)]);
|
||||
if (dict.ContainsKey(nameof(MinRadius)))
|
||||
MinRadius = Convert.ToInt32(dict[nameof(MinRadius)]);
|
||||
if (dict.ContainsKey(nameof(MaxRadius)))
|
||||
MaxRadius = Convert.ToInt32(dict[nameof(MaxRadius)]);
|
||||
if (dict.ContainsKey(nameof(CheckInternalRadius)))
|
||||
CheckInternalRadius = Convert.ToBoolean(dict[nameof(CheckInternalRadius)]);
|
||||
if (dict.ContainsKey(nameof(MinInternalRadius)))
|
||||
MinInternalRadius = Convert.ToInt32(dict[nameof(MinInternalRadius)]);
|
||||
if (dict.ContainsKey(nameof(MaxInternalRadius)))
|
||||
MaxInternalRadius = Convert.ToInt32(dict[nameof(MaxInternalRadius)]);
|
||||
if (dict.ContainsKey(nameof(CheckWidth)))
|
||||
CheckWidth = Convert.ToBoolean(dict[nameof(CheckWidth)]);
|
||||
if (dict.ContainsKey(nameof(MinWidth)))
|
||||
MinWidth = Convert.ToInt32(dict[nameof(MinWidth)]);
|
||||
if (dict.ContainsKey(nameof(MaxWidth)))
|
||||
MaxWidth = Convert.ToInt32(dict[nameof(MaxWidth)]);
|
||||
if (dict.ContainsKey(nameof(CheckHeight)))
|
||||
CheckHeight = Convert.ToBoolean(dict[nameof(CheckHeight)]);
|
||||
if (dict.ContainsKey(nameof(MinHeight)))
|
||||
MinHeight = Convert.ToInt32(dict[nameof(MinHeight)]);
|
||||
if (dict.ContainsKey(nameof(MaxHeight)))
|
||||
MaxHeight = Convert.ToInt32(dict[nameof(MaxHeight)]);
|
||||
if (dict.ContainsKey(nameof(ReferenceId)))
|
||||
ReferenceId = new Guid(dict[nameof(ReferenceId)].ToString());
|
||||
|
||||
// Load SearchArea properties manually
|
||||
if (dict.ContainsKey("SearchArea_Editable"))
|
||||
SearchArea.Editable = Convert.ToBoolean(dict["SearchArea_Editable"]);
|
||||
if (dict.ContainsKey("SearchArea_IsGood"))
|
||||
SearchArea.IsGood = Convert.ToBoolean(dict["SearchArea_IsGood"]);
|
||||
if (dict.ContainsKey("SearchArea_LocationX") && dict.ContainsKey("SearchArea_LocationY"))
|
||||
SearchArea.Location = new Vector2(Convert.ToSingle(dict["SearchArea_LocationX"]), Convert.ToSingle(dict["SearchArea_LocationY"]));
|
||||
if (dict.ContainsKey("SearchArea_OffsetX") && dict.ContainsKey("SearchArea_OffsetY"))
|
||||
SearchArea.Offset = new Vector2(Convert.ToSingle(dict["SearchArea_OffsetX"]), Convert.ToSingle(dict["SearchArea_OffsetY"]));
|
||||
if (dict.ContainsKey("SearchArea_SizeX") && dict.ContainsKey("SearchArea_SizeY"))
|
||||
SearchArea.Size = new Vector2(Convert.ToSingle(dict["SearchArea_SizeX"]), Convert.ToSingle(dict["SearchArea_SizeY"]));
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user