OliviaAddInPro/View/PaneLimpiezaSub2.xaml.cs

77 lines
2.1 KiB
C#

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;
using ArcGIS.Core.Data;
using ArcGIS.Desktop.Core;
using OliviaAddInPro.Helper;
using OliviaAddInPro.View;
namespace OliviaAddInPro
{
/// <summary>
/// Interaction logic for PaneLimpiezaSub2View.xaml
/// </summary>
public partial class PaneLimpiezaSub2View : UserControl
{
public PaneLimpiezaSub2View()
{
InitializeComponent();
}
private void TextBox_PreviewTextInput(object sender, TextCompositionEventArgs e)
{
e.Handled = !PanelGlobal.IsValid(((TextBox)sender).Text + e.Text,0,9999);
}
private void button_caparestr_Click(object sender, RoutedEventArgs e)
{
FeatureClass fc = HelperGdb.OpenFtClassDialog(HelperGdb.TiposOpenFileDlg.OpenFtrClassPolygon);
bool ok = false;
string texto="";
if (fc != null)
{
texto = System.IO.Path.GetFileName(fc.GetName());
//saca la ventana de selección de campo
ShowProWndSelectFields selfwnd = new ShowProWndSelectFields(fc, true);
if(selfwnd.SelAttributes.Count>0)
{
ok = true;
//HelperGdb.GetGeomSel(it.Path, selfwnd.SelField, selfwnd.SelAttributes, out texto);
}
}
if(!ok)
texto= Resource1.String_selec_capa;
label_caparestr.Content = texto;
}
private void button_capaniv_Click(object sender, RoutedEventArgs e)
{
}
private void button_capazon_Click(object sender, RoutedEventArgs e)
{
}
private void button_capainst_Click(object sender, RoutedEventArgs e)
{
}
}
}