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.Desktop.Core; using OliviaAddInPro.Helper; namespace OliviaAddInPro { /// /// Interaction logic for PaneLimpiezaSub1View.xaml /// public partial class PaneLimpiezaSub1View : UserControl { public PaneLimpiezaSub1View() { InitializeComponent(); } private void ComboBox_DropDownOpened(object sender, EventArgs e) { } private void TextBox_velodespl_PreviewTextInput(object sender, TextCompositionEventArgs e) { e.Handled = !PanelGlobal.IsValid(((TextBox)sender).Text + e.Text, 1, 100); } private void TextBox_tiempotto_PreviewTextInput(object sender, TextCompositionEventArgs e) { e.Handled = !PanelGlobal.IsValid(((TextBox)sender).Text + e.Text, 1, 100); } private void Button_Click(object sender, RoutedEventArgs e) { string capa=HelperGdb.OpenFileDialog(HelperGdb.TiposOpenFileDlg.OpenFtrClassLine | HelperGdb.TiposOpenFileDlg.OpenFtrClassPoint); if (!string.IsNullOrEmpty(capa)) { label_capalimp.Content = System.IO.Path.GetFileNameWithoutExtension(capa); if (DataContext is PaneLimpiezaSub1ViewModel mod) mod.AbiertaCapa(capa); } else { label_capalimp.Content = Resource1.String_selec_capa; if (DataContext is PaneLimpiezaSub1ViewModel mod) mod.CapaAbierta = false; } } private void comboBox_tto_SelectionChanged(object sender, SelectionChangedEventArgs e) { int i = -1; if (sender is ComboBox combo) i = combo.SelectedIndex; if(DataContext is PaneLimpiezaSub1ViewModel mod) mod.ComboTtoSel(i); } private void comboBox_ambitos_SelectionChanged(object sender, SelectionChangedEventArgs e) { int i = -1; if (sender is ComboBox combo) i = combo.SelectedIndex; if (DataContext is PaneLimpiezaSub1ViewModel mod) mod.ComboAmbSel(i); } } }