134 lines
3.8 KiB
C#
134 lines
3.8 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.Desktop.Core;
|
|
using ArcGIS.Desktop.Internal.Framework.Controls;
|
|
using OliviaAddInPro.Helper;
|
|
|
|
namespace OliviaAddInPro
|
|
{
|
|
/// <summary>
|
|
/// Interaction logic for PaneRecogidaSub1View.xaml
|
|
/// </summary>
|
|
public partial class PaneRecogidaSub1View : UserControl
|
|
{
|
|
public PaneRecogidaSub1View()
|
|
{
|
|
InitializeComponent();
|
|
}
|
|
|
|
private void Button_Click(object sender, RoutedEventArgs e)
|
|
{
|
|
string capa=HelperGdb.OpenFileDialog(HelperGdb.TiposOpenFileDlg.OpenFtrClassPoint);
|
|
if (!string.IsNullOrEmpty(capa))
|
|
{
|
|
label_capareco.Content = System.IO.Path.GetFileNameWithoutExtension(capa);
|
|
if (DataContext is PaneRecogidaSub1ViewModel mod)
|
|
{
|
|
if(!mod.AbiertaCapa(capa))
|
|
label_capareco.Content = Resource1.String_selec_capa;
|
|
}
|
|
}
|
|
else
|
|
{
|
|
label_capareco.Content = Resource1.String_selec_capa;
|
|
if (DataContext is PaneRecogidaSub1ViewModel mod)
|
|
mod.AbiertaCapa(null);
|
|
}
|
|
}
|
|
|
|
|
|
private void UserControl_Loaded(object sender, RoutedEventArgs e)
|
|
{
|
|
}
|
|
|
|
private void UserControl_Unloaded(object sender, RoutedEventArgs e)
|
|
{
|
|
|
|
}
|
|
|
|
private void txtBox_kgCapac_PreviewTextInput(object sender, TextCompositionEventArgs e)
|
|
{
|
|
e.Handled = !PanelGlobal.IsValid(((TextBox)sender).Text + e.Text, 1, 10000);
|
|
}
|
|
|
|
private void comboBox_frac_SelectionChanged(object sender, SelectionChangedEventArgs e)
|
|
{
|
|
int i = -1;
|
|
if (sender is System.Windows.Controls.ComboBox combo)
|
|
{
|
|
i = combo.SelectedIndex;
|
|
|
|
if (DataContext is PaneRecogidaSub1ViewModel mod)
|
|
{
|
|
mod.ComboFracSel(i);
|
|
}
|
|
}
|
|
|
|
}
|
|
|
|
private void comboBox_tipoCarg_SelectionChanged(object sender, SelectionChangedEventArgs e)
|
|
{
|
|
int i = -1;
|
|
if (sender is System.Windows.Controls.ComboBox combo)
|
|
{
|
|
i = combo.SelectedIndex;
|
|
|
|
if (DataContext is PaneRecogidaSub1ViewModel mod)
|
|
{
|
|
mod.ComboCargSel(i);
|
|
}
|
|
}
|
|
}
|
|
|
|
private void comboBox_tipoVehic_SelectionChanged(object sender, SelectionChangedEventArgs e)
|
|
{
|
|
int i = -1;
|
|
if (sender is System.Windows.Controls.ComboBox combo)
|
|
{
|
|
i = combo.SelectedIndex;
|
|
|
|
if (DataContext is PaneRecogidaSub1ViewModel mod)
|
|
{
|
|
mod.ComboVehicSel(i);
|
|
}
|
|
}
|
|
}
|
|
|
|
private void comboBox_tipoCapac_SelectionChanged(object sender, SelectionChangedEventArgs e)
|
|
{
|
|
int i = -1;
|
|
if (sender is System.Windows.Controls.ComboBox combo)
|
|
{
|
|
i = combo.SelectedIndex;
|
|
|
|
if (DataContext is PaneRecogidaSub1ViewModel mod)
|
|
{
|
|
mod.ComboCapacSel(i);
|
|
}
|
|
}
|
|
}
|
|
|
|
private void txtBox_densCont_PreviewTextInput(object sender, TextCompositionEventArgs e)
|
|
{
|
|
|
|
}
|
|
|
|
private void comboBox_tipoLat_SelectionChanged(object sender, SelectionChangedEventArgs e)
|
|
{
|
|
|
|
}
|
|
}
|
|
}
|