modos de viaje
parent
dcc3040cef
commit
4b81570591
|
|
@ -32,8 +32,12 @@
|
||||||
<ComboBox x:Name="comboBox_tto" IsEnabled="{Binding Path=CapaAbierta, Mode = TwoWay}" ItemsSource="{Binding Path=TiposTto, Mode = TwoWay}" HorizontalAlignment="Left" Margin="20,0,0,0"
|
<ComboBox x:Name="comboBox_tto" IsEnabled="{Binding Path=CapaAbierta, Mode = TwoWay}" ItemsSource="{Binding Path=TiposTto, Mode = TwoWay}" HorizontalAlignment="Left" Margin="20,0,0,0"
|
||||||
VerticalAlignment="Top" Width="260" DropDownOpened="ComboBox_DropDownOpened" SelectionChanged="comboBox_tto_SelectionChanged"
|
VerticalAlignment="Top" Width="260" DropDownOpened="ComboBox_DropDownOpened" SelectionChanged="comboBox_tto_SelectionChanged"
|
||||||
SelectedIndex="{Binding Path=TipoTto, Mode = TwoWay}"/>
|
SelectedIndex="{Binding Path=TipoTto, Mode = TwoWay}"/>
|
||||||
|
<Label Content="Modos de viaje" HorizontalAlignment="Left" Margin="15,0,0,0" VerticalAlignment="Top" FontWeight="DemiBold"/>
|
||||||
|
<ComboBox x:Name="comboBox_mv" IsEnabled="{Binding Path=CapaAbierta, Mode = TwoWay}" ItemsSource="{Binding Path=TiposMv, Mode = TwoWay}" HorizontalAlignment="Left" Margin="20,0,0,0"
|
||||||
|
VerticalAlignment="Top" Width="260" SelectionChanged="comboBox_mv_SelectionChanged"
|
||||||
|
SelectedIndex="{Binding Path=TipoMv, Mode = TwoWay}"/>
|
||||||
<Label Content="Ámbitos de Trabajo" HorizontalAlignment="Left" Margin="15,0,0,0" VerticalAlignment="Top" RenderTransformOrigin="-0.391,-0.203" FontWeight="DemiBold"/>
|
<Label Content="Ámbitos de Trabajo" HorizontalAlignment="Left" Margin="15,0,0,0" VerticalAlignment="Top" RenderTransformOrigin="-0.391,-0.203" FontWeight="DemiBold"/>
|
||||||
<ComboBox x:Name="comboBox_ambitos" IsEnabled="{Binding Path=CapaAbierta, Mode = TwoWay}" ItemsSource="{Binding Path=OpsAmbs, Mode = TwoWay}" HorizontalAlignment="Left" Margin="20,0,0,0"
|
<ComboBox x:Name="comboBox_ambitos" IsEnabled="{Binding Path=CapaAbierta, Mode = TwoWay}" ItemsSource="{Binding Path=tiposMv, Mode = TwoWay}" HorizontalAlignment="Left" Margin="20,0,0,0"
|
||||||
VerticalAlignment="Top" Width="260" SelectionChanged="comboBox_ambitos_SelectionChanged"
|
VerticalAlignment="Top" Width="260" SelectionChanged="comboBox_ambitos_SelectionChanged"
|
||||||
SelectedIndex="{Binding Path=SelOpAmb, Mode = TwoWay}"/>
|
SelectedIndex="{Binding Path=SelOpAmb, Mode = TwoWay}"/>
|
||||||
<ListBox x:Name="listBox_ambitos" IsEnabled="{Binding Path=CapaAbierta, Mode = TwoWay}" ItemsSource="{Binding Path=Ambitos, Mode = TwoWay}" HorizontalAlignment="Left" Height="100"
|
<ListBox x:Name="listBox_ambitos" IsEnabled="{Binding Path=CapaAbierta, Mode = TwoWay}" ItemsSource="{Binding Path=Ambitos, Mode = TwoWay}" HorizontalAlignment="Left" Height="100"
|
||||||
|
|
|
||||||
|
|
@ -80,7 +80,20 @@ namespace OliviaAddInPro
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
private void comboBox_mv_SelectionChanged(object sender, SelectionChangedEventArgs e)
|
||||||
|
{
|
||||||
|
int i = -1;
|
||||||
|
if (sender is System.Windows.Controls.ComboBox combo)
|
||||||
|
{
|
||||||
|
i = combo.SelectedIndex;
|
||||||
|
|
||||||
|
if (DataContext is PaneLimpiezaSub1ViewModel mod)
|
||||||
|
{
|
||||||
|
mod.ComboMvSel(i);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
private void comboBox_ambitos_SelectionChanged(object sender, SelectionChangedEventArgs e)
|
private void comboBox_ambitos_SelectionChanged(object sender, SelectionChangedEventArgs e)
|
||||||
{
|
{
|
||||||
int i = -1;
|
int i = -1;
|
||||||
|
|
|
||||||
|
|
@ -5,7 +5,7 @@
|
||||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||||
xmlns:extensions="clr-namespace:ArcGIS.Desktop.Extensions;assembly=ArcGIS.Desktop.Extensions"
|
xmlns:extensions="clr-namespace:ArcGIS.Desktop.Extensions;assembly=ArcGIS.Desktop.Extensions"
|
||||||
xmlns:ui="clr-namespace:OliviaAddInPro"
|
xmlns:ui="clr-namespace:OliviaAddInPro"
|
||||||
mc:Ignorable="d" d:DesignWidth="300" Height="390"
|
mc:Ignorable="d" d:DesignWidth="300" Height="422"
|
||||||
d:DataContext="{Binding Path=ui.PaneRecogidaSub1ViewModel}" Loaded="UserControl_Loaded" Unloaded="UserControl_Unloaded" >
|
d:DataContext="{Binding Path=ui.PaneRecogidaSub1ViewModel}" Loaded="UserControl_Loaded" Unloaded="UserControl_Unloaded" >
|
||||||
<UserControl.Resources>
|
<UserControl.Resources>
|
||||||
<ResourceDictionary>
|
<ResourceDictionary>
|
||||||
|
|
@ -94,6 +94,10 @@
|
||||||
<TextBox x:Name="txtBox_kgCapac" IsEnabled="{Binding Path=CapaAbierta, Mode = TwoWay}" Grid.Column="1" Margin="5,0,0,3" TextWrapping="NoWrap" Text="{Binding Path=TextKgCapac, Mode = TwoWay}" TextAlignment="Right" MaxLength="8" PreviewTextInput="txtBox_kgCapac_PreviewTextInput"/>
|
<TextBox x:Name="txtBox_kgCapac" IsEnabled="{Binding Path=CapaAbierta, Mode = TwoWay}" Grid.Column="1" Margin="5,0,0,3" TextWrapping="NoWrap" Text="{Binding Path=TextKgCapac, Mode = TwoWay}" TextAlignment="Right" MaxLength="8" PreviewTextInput="txtBox_kgCapac_PreviewTextInput"/>
|
||||||
<Label x:Name="label_kgmax" Grid.Column="2" Content="kg máx. por viaje" Margin="0,-1,0,0"/>
|
<Label x:Name="label_kgmax" Grid.Column="2" Content="kg máx. por viaje" Margin="0,-1,0,0"/>
|
||||||
</Grid>
|
</Grid>
|
||||||
|
<Label Content="Modos de viaje" HorizontalAlignment="Left" Margin="15,0,0,0" VerticalAlignment="Top" FontWeight="DemiBold"/>
|
||||||
|
<ComboBox x:Name="comboBox_mv" IsEnabled="{Binding Path=CapaAbierta, Mode = TwoWay}" ItemsSource="{Binding Path=TiposMv, Mode = TwoWay}" HorizontalAlignment="Left" Margin="20,0,0,0"
|
||||||
|
VerticalAlignment="Top" Width="260" SelectionChanged="comboBox_mv_SelectionChanged"
|
||||||
|
SelectedIndex="{Binding Path=TipoMv, Mode = TwoWay}"/>
|
||||||
<Label Content="Tiempo de vaciado de contenedor" HorizontalAlignment="Left" Margin="15,0,0,0" VerticalAlignment="Top" RenderTransformOrigin="-0.391,-0.203" FontWeight="DemiBold"/>
|
<Label Content="Tiempo de vaciado de contenedor" HorizontalAlignment="Left" Margin="15,0,0,0" VerticalAlignment="Top" RenderTransformOrigin="-0.391,-0.203" FontWeight="DemiBold"/>
|
||||||
<Grid Margin="20,0,0,0">
|
<Grid Margin="20,0,0,0">
|
||||||
<Grid.ColumnDefinitions>
|
<Grid.ColumnDefinitions>
|
||||||
|
|
|
||||||
|
|
@ -110,7 +110,20 @@ namespace OliviaAddInPro
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
private void comboBox_mv_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.ComboMvSel(i);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
private void comboBox_tipoCapac_SelectionChanged(object sender, SelectionChangedEventArgs e)
|
private void comboBox_tipoCapac_SelectionChanged(object sender, SelectionChangedEventArgs e)
|
||||||
{
|
{
|
||||||
int i = -1;
|
int i = -1;
|
||||||
|
|
|
||||||
|
|
@ -27,6 +27,7 @@ namespace OliviaAddInPro
|
||||||
{
|
{
|
||||||
|
|
||||||
private ObservableCollection<string> tiposTto = new ObservableCollection<string>(LimpiezaDef.tipos_tto_str);
|
private ObservableCollection<string> tiposTto = new ObservableCollection<string>(LimpiezaDef.tipos_tto_str);
|
||||||
|
private ObservableCollection<string> tiposMv = new ObservableCollection<string>();
|
||||||
private ObservableCollection<string> opsAmbs=new ObservableCollection<string>();
|
private ObservableCollection<string> opsAmbs=new ObservableCollection<string>();
|
||||||
private int selOpAmb = -1;
|
private int selOpAmb = -1;
|
||||||
private ObservableCollection<CheckedListItem<string>> ambitos = new ObservableCollection<CheckedListItem<string>>();
|
private ObservableCollection<CheckedListItem<string>> ambitos = new ObservableCollection<CheckedListItem<string>>();
|
||||||
|
|
@ -114,6 +115,25 @@ namespace OliviaAddInPro
|
||||||
base.NotifyPropertyChanged("TiposTto");
|
base.NotifyPropertyChanged("TiposTto");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
public ObservableCollection<string> TiposMv
|
||||||
|
{
|
||||||
|
get { return tiposMv; }
|
||||||
|
set
|
||||||
|
{
|
||||||
|
tiposMv = value;
|
||||||
|
base.NotifyPropertyChanged("TiposMv");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
private int tipoMv = -1;
|
||||||
|
public int TipoMv
|
||||||
|
{
|
||||||
|
get { return tipoMv; }
|
||||||
|
set
|
||||||
|
{
|
||||||
|
tipoMv = value;
|
||||||
|
base.NotifyPropertyChanged("TipoMv");
|
||||||
|
}
|
||||||
|
}
|
||||||
private int tipoTto = -1;
|
private int tipoTto = -1;
|
||||||
public int TipoTto
|
public int TipoTto
|
||||||
{
|
{
|
||||||
|
|
@ -199,6 +219,7 @@ namespace OliviaAddInPro
|
||||||
lblUdsVeloDespl = "km/h";
|
lblUdsVeloDespl = "km/h";
|
||||||
limpServ = new LimpiezaServ(null); //no hace falta instancia limp
|
limpServ = new LimpiezaServ(null); //no hace falta instancia limp
|
||||||
textAnchoVia = LimpiezaDef.Parametros.ancho_via.ToString();
|
textAnchoVia = LimpiezaDef.Parametros.ancho_via.ToString();
|
||||||
|
tiposMv = limpServ.GetNombreModosViajes();
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* Realiza las comprobaciones para cuando se ha abierto una capa
|
* Realiza las comprobaciones para cuando se ha abierto una capa
|
||||||
|
|
@ -244,6 +265,10 @@ namespace OliviaAddInPro
|
||||||
CapaElems = capa;
|
CapaElems = capa;
|
||||||
CapaAbierta = true;
|
CapaAbierta = true;
|
||||||
return true;
|
return true;
|
||||||
|
}
|
||||||
|
public void ComboMvSel(int tto)
|
||||||
|
{
|
||||||
|
tipoMv = tto;
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* Realiza los cambios en los ámbitos cuando se ha seleccionado un tratamiento
|
* Realiza los cambios en los ámbitos cuando se ha seleccionado un tratamiento
|
||||||
|
|
|
||||||
|
|
@ -32,7 +32,7 @@ namespace OliviaAddInPro
|
||||||
private ObservableCollection<string> tiposVehic = new ObservableCollection<string>();
|
private ObservableCollection<string> tiposVehic = new ObservableCollection<string>();
|
||||||
private ObservableCollection<string> tiposCapac = new ObservableCollection<string>();
|
private ObservableCollection<string> tiposCapac = new ObservableCollection<string>();
|
||||||
private RecogidaServ recoServ = new RecogidaServ(null); //no hace falta instancia reco aquí
|
private RecogidaServ recoServ = new RecogidaServ(null); //no hace falta instancia reco aquí
|
||||||
|
private ObservableCollection<string> tiposMv = new ObservableCollection<string>();
|
||||||
/**
|
/**
|
||||||
* Array de booleanos enumerando si se existen en la capa seleccionada los tipos de fracción
|
* Array de booleanos enumerando si se existen en la capa seleccionada los tipos de fracción
|
||||||
*/
|
*/
|
||||||
|
|
@ -47,6 +47,29 @@ namespace OliviaAddInPro
|
||||||
public bool[] tipos_vehic_bool = new bool[(int)RecogidaDef.TiposVehic.N];
|
public bool[] tipos_vehic_bool = new bool[(int)RecogidaDef.TiposVehic.N];
|
||||||
|
|
||||||
#region Properties
|
#region Properties
|
||||||
|
public ObservableCollection<string> TiposMv
|
||||||
|
{
|
||||||
|
get { return tiposMv; }
|
||||||
|
set
|
||||||
|
{
|
||||||
|
tiposMv = value;
|
||||||
|
base.NotifyPropertyChanged("TiposMv");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
private int tipoMv = -1;
|
||||||
|
public int TipoMv
|
||||||
|
{
|
||||||
|
get { return tipoMv; }
|
||||||
|
set
|
||||||
|
{
|
||||||
|
tipoMv = value;
|
||||||
|
base.NotifyPropertyChanged("TipoMv");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
public void ComboMvSel(int tto)
|
||||||
|
{
|
||||||
|
tipoMv = tto;
|
||||||
|
}
|
||||||
|
|
||||||
public override string DisplayName
|
public override string DisplayName
|
||||||
{
|
{
|
||||||
|
|
@ -261,6 +284,7 @@ namespace OliviaAddInPro
|
||||||
{
|
{
|
||||||
KgCont = RecogidaDef.kgrec_cont;
|
KgCont = RecogidaDef.kgrec_cont;
|
||||||
}
|
}
|
||||||
|
tiposMv = new LimpiezaServ(null).GetNombreModosViajes();
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* Realiza las comprobaciones para cuando se ha abierto una capa
|
* Realiza las comprobaciones para cuando se ha abierto una capa
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue