using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using ArcGIS.Desktop.Framework; using ArcGIS.Desktop.Framework.Contracts; namespace OliviaAddInPro { internal class ShowProWindowSaveFileName : Button { private ProWindowSaveFileName _prowindowsavefilename = null; private string texto; public string Texto { get { return texto; } set { base.SetProperty(ref texto, value, () => Texto); } } public ShowProWindowSaveFileName(string text_in) { Texto = text_in; crea(); } public string GetName() { bool? res = _prowindowsavefilename.ShowDialog(); if (res ?? true) { return Texto; } return string.Empty; } private void crea() { //already open? if (_prowindowsavefilename != null) return; _prowindowsavefilename = new ProWindowSaveFileName(); _prowindowsavefilename.Owner = FrameworkApplication.Current.MainWindow; } } }