using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using ArcGIS.Core.CIM; using ArcGIS.Core.Data; using ArcGIS.Core.Geometry; using ArcGIS.Desktop.Catalog; using ArcGIS.Desktop.Core; using ArcGIS.Desktop.Editing; using ArcGIS.Desktop.Extensions; using ArcGIS.Desktop.Framework; using ArcGIS.Desktop.Framework.Contracts; using ArcGIS.Desktop.Framework.Dialogs; using ArcGIS.Desktop.Framework.Threading.Tasks; using ArcGIS.Desktop.Mapping; using OliviaAddInPro.Model; namespace OliviaAddInPro { internal class DockpaneRecogidaViewModel : DockPane { private bool firstTimeShow = true; private const string _dockPaneID = "OliviaAddInPro_DockpaneRecogida"; protected DockpaneRecogidaViewModel() { } /// /// Show the DockPane. /// internal static void Show() { DockPane pane = FrameworkApplication.DockPaneManager.Find(_dockPaneID); if (pane == null) return; pane.Activate(); } internal static void Hide_() { DockPane pane = FrameworkApplication.DockPaneManager.Find(_dockPaneID); if (pane == null) return; pane.Hide(); } //The parameter passed to this method will be true if the Dockpane is being opened and it is false when you close the dockpane //also false the first time protected override void OnShow(bool isVisible) { if (isVisible == false && !firstTimeShow) { //avisa de cerrar la ventana OliviaGlob.TipoEjec = TiposEjecucion.Ninguno; } if (firstTimeShow) firstTimeShow = false; } /// /// Text shown near the top of the DockPane. /// private string _heading = "My DockPane"; public string Heading { get { return _heading; } set { SetProperty(ref _heading, value, () => Heading); } } } }