// // Unity Methods // private void Awake() { LocalizationManager.Instance.OnLanguageChanged += OnLanguageChanged; contoursTool = ComponentManager.Instance.Get <ContoursTool>(); UpdateNote(); Init(); }
// // Unity Methods // private void Awake() { // Components var componentManager = ComponentManager.Instance; inspectorTool = componentManager.Get <InspectorTool>(); contoursTool = componentManager.Get <ContoursTool>(); dataLayers = componentManager.Get <DataLayers>(); gridLayerController = inspectorTool.Map.GetLayerController <GridLayerController>(); translator = LocalizationManager.Instance; areaPSUIRef.Init(translator); contourPSUIRef.Init(translator); // Initialize dropdowns inspectorOutputDropdowns = new InspectorOutputDropdown[] { new InspectorOutputDropdown(areaTypeDropdown, AreaTypeOptions), new InspectorOutputDropdown(areaPSUIRef.summaryDropdown, PSO.AreaSummaryOptions), new InspectorOutputDropdown(areaPSUIRef.metricsDropdown, PSO.MetricsOptions), }; InitDropdowns(); // Initialize properties and summaries int maxInspectionCount = inspectorTool.maxInspectionCount; areaPS = new AreaPS[maxInspectionCount]; for (int i = 0; i < maxInspectionCount; ++i) { areaPS[i] = new AreaPS(); } contourPS = new ContourPS(); // Initialize listeners gridLayerController.OnShowGrid += OnShowGrid; LocalizationManager.Instance.OnLanguageChanged += OnLanguageChanged; areaTypeDropdown.onValueChanged.AddListener(UpdatePropertiesAndSummariesPanel); areaPSUIRef.summaryDropdown.onValueChanged.AddListener(UpdateAreaPanel); areaPSUIRef.computeCorrelationButton.onClick.AddListener(OnComputeCorrelationClicked); // Update panels UpdatePropertiesAndSummariesPanel(Area); UpdateAreaPanel(AreaPS.SelectedArea); UpdateContourPanel(); ResetAndClearOutput(); // If contours tool is already open and there is a selected contour if (contoursTool != null && inspectorTool.InspectOutput != null) { inspectorTool.InspectOutput.AreaOutput.UpdateContourInspectorOutput(dataLayers); } }
// // Unity Methods // private void Awake() { // Window events closeButton.onClick.AddListener(OnCloseClick); // Component references var componentManager = ComponentManager.Instance; contoursTool = componentManager.Get <ContoursTool>(); dialogManager = componentManager.Get <ModalDialogManager>(); translator = LocalizationManager.Instance; //translator.OnLanguageChanged += OnLanguageChanged; }