/* * Copyright (c) 2025 LG Electronics Inc. * SPDX-License-Identifier: LicenseRef-LGE-Proprietary */ using Aurora.Api; using VisionCommon; using System; using System.Collections.Generic; using System.Linq; using System.Windows; namespace VisionCommon { public class FovCameraViewWindowParam { public FovInfo fovInfo { get; set; } public eDisplayType displayType { get; set; } } public class CamViewWindowUtil { public static Dictionary _IsFovCamViewWindowActivateds = new Dictionary(); public static void SetFovCamViewWindowActivated(FovInfo fovInfo, eDisplayType displayType, bool isActivated) { var fovRecipe = VisionRecipeManager.GetFovRecipe(fovInfo); var fovUiPos = VisionRecipeManager.GetFovUiPos(fovRecipe, displayType); if (!_IsFovCamViewWindowActivateds.ContainsKey(fovUiPos)) { _IsFovCamViewWindowActivateds.Add(fovUiPos, isActivated); } else { _IsFovCamViewWindowActivateds[fovUiPos] = isActivated; } } public static bool IsFovCamViewWindowActivated(FovInfo fovInfo, eDisplayType displayType) { var fovRecipe = VisionRecipeManager.GetFovRecipe(fovInfo); var fovUiPos = VisionRecipeManager.GetFovUiPos(fovRecipe, displayType); if (_IsFovCamViewWindowActivateds.ContainsKey(fovUiPos)) { return _IsFovCamViewWindowActivateds[fovUiPos]; } else { return false; } } public static string GetFovCamViewWindowTitle(FovInfo fovInfo, eDisplayType displayType) { var fovRecipe = VisionRecipeManager.GetFovRecipe(fovInfo); var fovUiPos = VisionRecipeManager.GetFovUiPos(fovRecipe, displayType); if (IsFovCamViewWindowActivated(fovInfo, displayType)) { return VisionKeys.Title_FovCameraViewWindow + " " + $"[{fovUiPos}]"; } return VisionKeys.Title_FovCameraViewWindow; } } }