using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Controls;
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.Internal.Framework.Controls;
using ArcGIS.Desktop.Framework.Dialogs;
using ArcGIS.Desktop.Framework.Threading.Tasks;
using ArcGIS.Desktop.Mapping;
using OliviaAddInPro.Helper;
using OliviaAddInPro.Model;
using Button = ArcGIS.Desktop.Framework.Contracts.Button;

namespace OliviaAddInPro
{
    internal class ButtonConfig : Button
    { 
        protected override void OnClick()
        {
            if (OliviaGlob.TipoView == TiposEjecucion.Ninguno)
            {
                OliviaGlob.SetFlagTipEjec(TiposEjecucion.Props);
                OliviaGlob.ViewSetFlagTipEjec(TiposEjecucion.Props);

                DockpaneConfigViewModel.Reset();
                DockpaneConfigViewModel.Show();
            }
            else
            {
                HelperGlobal.ponMsg(Resource1.String_existe_ejec, System.Windows.MessageBoxImage.Warning);
            }
        }
    }
}
