Merge branch 'Gerardo/Configuraciones' into develop
# Conflicts: # OliviaAddInPro.csprojConfiguracionSimplificada
commit
0e12a80b03
|
|
@ -27,7 +27,8 @@ namespace OliviaAddInPro
|
|||
{
|
||||
if (OliviaGlob.TipoEjec == TiposEjecucion.Ninguno)
|
||||
{
|
||||
//OliviaGlob.tipEjec = TiposEjecucion.Config;
|
||||
OliviaGlob.TipoEjec = TiposEjecucion.Config;
|
||||
DockpaneConfigViewModel.Show();
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
|
|||
15
Config.daml
15
Config.daml
|
|
@ -1,5 +1,9 @@
|
|||
<ArcGIS defaultAssembly="OliviaAddInPro.dll" defaultNamespace="OliviaAddInPro" xmlns="http://schemas.esri.com/DADF/Registry" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://schemas.esri.com/DADF/Registry file:///C:/Users/Elena/AppData/Local/Programs/ArcGIS/Pro/bin/ArcGIS.Desktop.Framework.xsd">
|
||||
<AddInInfo id="{10742570-cf59-42f2-bea2-2a38002a06ee}" version="1.0" desktopVersion="2.5.22081">
|
||||
<ArcGIS defaultAssembly="OliviaAddInPro.dll"
|
||||
defaultNamespace="OliviaAddInPro"
|
||||
xmlns="http://schemas.esri.com/DADF/Registry"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://schemas.esri.com/DADF/Registry file:///C:/Program%20Files/ArcGIS/Pro/bin/ArcGIS.Desktop.Framework.xsd">
|
||||
<AddInInfo id="{10742570-cf59-42f2-bea2-2a38002a06ee}" version="1.0" desktopVersion="2.8.29751">
|
||||
<Name>OliviaAddInPro</Name>
|
||||
<Description>AddIn de Optimización de la Limpieza Viaria para ArcGIs Pro</Description>
|
||||
<Image>Images\AddinDesktop32.png</Image>
|
||||
|
|
@ -46,8 +50,11 @@
|
|||
</button>
|
||||
</controls>
|
||||
<dockPanes>
|
||||
<dockPane id="OliviaAddInPro_DockpaneLimpieza" caption="OLIVIA | Limpieza" className="DockpaneLimpiezaViewModel" dock="group" dockWith="esri_core_contentsDockPane">
|
||||
<content className="DockpaneLimpiezaView" />
|
||||
<dockPane id="OliviaAddInPro_DockpaneLimpieza" caption="OLIVIA | Limpieza" className="DockpaneLimpiezaViewModel" dock="group" dockWith="esri_core_contentsDockPane">
|
||||
<content className="DockpaneLimpiezaView" />
|
||||
</dockPane>
|
||||
<dockPane id="OliviaAddInPro_DockpaneConfig" caption="OLIVIA | Configuración" className="DockpaneConfigViewModel" dock="group" dockWith="esri_core_contentsDockPane">
|
||||
<content className="DockPaneConfigView" />
|
||||
</dockPane>
|
||||
<dockPane id="OliviaAddInPro_DockpaneRecogida" caption="OLIVIA | Recogida" className="DockpaneRecogidaViewModel" dock="group" dockWith="esri_core_contentsDockPane">
|
||||
<content className="DockpaneRecogidaView" />
|
||||
|
|
|
|||
|
|
@ -0,0 +1,235 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace OliviaAddInPro.Model
|
||||
{
|
||||
class OliviaConf
|
||||
{
|
||||
private static OliviaConf conf=null;
|
||||
|
||||
public OliviaConf()
|
||||
{
|
||||
|
||||
}
|
||||
#region PropiedadesOcultas
|
||||
|
||||
#region Paths
|
||||
[Browsable(false)]
|
||||
public string path_work { get; set; }
|
||||
|
||||
[Browsable(false)]
|
||||
public string path_exe { get; set; }
|
||||
|
||||
[Browsable(false)]
|
||||
public string path_temp { get; set; }
|
||||
|
||||
[Browsable(false)]
|
||||
public string path_data { get; set; }
|
||||
|
||||
#endregion
|
||||
|
||||
#endregion
|
||||
[Category("General")]
|
||||
[DisplayName("Red de carreteras")]
|
||||
[Description("Red de carreteras que se usara para la navegación")]
|
||||
public string red_carreteras { get; set; }
|
||||
|
||||
[Category("General")]
|
||||
[DisplayName("Puerto")]
|
||||
[Description("Puerto de conexión con el proceso olivia")]
|
||||
public int puerto { get; set; }
|
||||
|
||||
[Category("General")]
|
||||
[DisplayName("Buffer de exportado (m)")]
|
||||
[Description("Buuffer extra, en metros, que se va a exportar de la red de carreteras")]
|
||||
public int buffer_export { get; set; }
|
||||
|
||||
[Category("Capas Generales")]
|
||||
[DisplayName("Eje de via")]
|
||||
[Description("Capa de eje de via que se usara")]
|
||||
public string eje_via { get; set; }
|
||||
|
||||
[Category("Capas Generales")]
|
||||
[DisplayName("Capa municipios")]
|
||||
[Description("Capa municipios")]
|
||||
public string municipios { get; set; }
|
||||
|
||||
[Category("Campos Limpieza")]
|
||||
[DisplayName("Tipo entidad")]
|
||||
[Description("Nombre del campo tipo de entidad")]
|
||||
public string cons_tip_ent { get; set; }
|
||||
|
||||
[Category("Campos Limpieza")]
|
||||
[DisplayName("Mecanizable")]
|
||||
[Description("Nombre del campo que indica si es mecanizable")]
|
||||
public string cons_mecaniz { get; set; }
|
||||
|
||||
[Category("Campos Limpieza")]
|
||||
[DisplayName("Observaciones")]
|
||||
[Description("Nombre del campo de observaciones")]
|
||||
public string cons_obser { get; set; }
|
||||
|
||||
[Category("Campos Limpieza")]
|
||||
[DisplayName("Ancho aceras")]
|
||||
[Description("Nombre del campo que indica el ancho de las aceras")]
|
||||
public string cons_anch_tip { get; set; }
|
||||
|
||||
[Category("Campos Limpieza")]
|
||||
[DisplayName("Tipo de aparcamiento")]
|
||||
[Description("Nombre del campo que indica el tipo de aparcamiento")]
|
||||
public string cons_tipolo { get; set; }
|
||||
|
||||
[Category("Atributos limpieza")]
|
||||
[DisplayName("Acera")]
|
||||
[Description("Valor para el atributo acera")]
|
||||
public string atr_acera { get; set; }
|
||||
|
||||
[Category("Atributos limpieza")]
|
||||
[DisplayName("Banda Aparcamiento")]
|
||||
[Description("Valor para el atributo banda de aparcamiento")]
|
||||
public int atr_aparc { get; set; }
|
||||
|
||||
[Category("Atributos limpieza")]
|
||||
[DisplayName("Bordillo libre")]
|
||||
[Description("Valor para el atributo de bordillo libre")]
|
||||
public string atr_bord { get; set; }
|
||||
|
||||
[Category("Atributos limpieza")]
|
||||
[DisplayName("Caída de hoja")]
|
||||
[Description("Valor para el atributo caída hoja")]
|
||||
public string atr_hoja { get; set; }
|
||||
|
||||
[Category("Atributos limpieza")]
|
||||
[DisplayName("Peatonales")]
|
||||
[Description("Valor para el atributo calle peatonal")]
|
||||
public string atr_peat { get; set; }
|
||||
|
||||
[Category("Atributos limpieza")]
|
||||
[DisplayName("Mecanizable")]
|
||||
[Description("Valor para el atributo de si es mecanizable")]
|
||||
public int atr_mec_s { get; set; }
|
||||
|
||||
[Category("Atributos limpieza")]
|
||||
[DisplayName("No mecanizable")]
|
||||
[Description("Valor para el atributo de si no es mecanizable")]
|
||||
public string atr_mec_n { get; set; }
|
||||
|
||||
[Category("Atributos limpieza")]
|
||||
[DisplayName("Escaleras")]
|
||||
[Description("Valor para el atributo escaleras")]
|
||||
public string atr_esca { get; set; }
|
||||
|
||||
[Category("Atributos limpieza")]
|
||||
[DisplayName("Fuentes")]
|
||||
[Description("Valor para el atributo fuentes")]
|
||||
public string atr_fuent { get; set; }
|
||||
|
||||
[Category("Atributos limpieza")]
|
||||
[DisplayName("Juegos infantiles")]
|
||||
[Description("Valor para el atributo juegos infantiles")]
|
||||
public string atr_infan { get; set; }
|
||||
|
||||
[Category("Atributos limpieza")]
|
||||
[DisplayName("Papelera")]
|
||||
[Description("Valor para el atributo papelera")]
|
||||
public int atr_pape { get; set; }
|
||||
|
||||
[Category("Atributos limpieza")]
|
||||
[DisplayName("Paso a nivel")]
|
||||
[Description("Valor para el atributo papelera para el atributo paso a nivel")]
|
||||
public string atr_paso_niv { get; set; }
|
||||
|
||||
[Category("Atributos limpieza")]
|
||||
[DisplayName("Pipican")]
|
||||
[Description("Valor para el atributo pipican")]
|
||||
public string atr_pipi { get; set; }
|
||||
|
||||
[Category("Atributos limpieza")]
|
||||
[DisplayName("Sanecan")]
|
||||
[Description("Valor para el atributo saneacan")]
|
||||
public string atr_sane { get; set; }
|
||||
|
||||
[Category("Atributos limpieza")]
|
||||
[DisplayName("Areas Terrizas")]
|
||||
[Description("Valor para el atributo areas terrizas")]
|
||||
public int atr_terri { get; set; }
|
||||
|
||||
[Category("Atributos limpieza")]
|
||||
[DisplayName("Ocio")]
|
||||
[Description("Valor para el atributo Ocio")]
|
||||
public string atr_ocio { get; set; }
|
||||
|
||||
[Category("Atributos limpieza")]
|
||||
[DisplayName("Organismos oficiales")]
|
||||
[Description("Valor para el atributo organismos oficiales")]
|
||||
public string atr_org_ofi { get; set; }
|
||||
|
||||
[Category("Atributos limpieza")]
|
||||
[DisplayName("Organismos oficiales")]
|
||||
[Description("Valor para el atributo parques")]
|
||||
public string atr_parq { get; set; }
|
||||
|
||||
[Category("Atributos limpieza")]
|
||||
[DisplayName("Parquin")]
|
||||
[Description("Valor para el atributo parquin")]
|
||||
public string atr_park { get; set; }
|
||||
|
||||
[Category("Atributos limpieza")]
|
||||
[DisplayName("Playa")]
|
||||
[Description("Valor para el atributo playa")]
|
||||
public int atr_play { get; set; }
|
||||
|
||||
[Category("Atributos limpieza")]
|
||||
[DisplayName("Polideportivo")]
|
||||
[Description("Valor para el atributo polideportivo")]
|
||||
public string atr_polid { get; set; }
|
||||
|
||||
[Category("Atributos limpieza")]
|
||||
[DisplayName("P. interes turistico")]
|
||||
[Description("Valor para el atributo los puntos de interes turistico")]
|
||||
public string atr_turis { get; set; }
|
||||
|
||||
[Category("Atributos limpieza")]
|
||||
[DisplayName("Solares")]
|
||||
[Description("Valor para el atributo solares")]
|
||||
public string atr_solar { get; set; }
|
||||
|
||||
[Category("Atributos limpieza")]
|
||||
[DisplayName("Suelo")]
|
||||
[Description("Valor para el atributo uso del suelo")]
|
||||
public string atr_suelo { get; set; }
|
||||
|
||||
[Category("Atributos limpieza")]
|
||||
[DisplayName("Aparcamiento en linea")]
|
||||
[Description("Valor para el atributo aparcamiento en linea")]
|
||||
public int atr_ap_lin { get; set; }
|
||||
|
||||
[Category("Atributos limpieza")]
|
||||
[DisplayName("Aparacamiento en bateria")]
|
||||
[Description("Valor para el atributo aparcamiento en bateria")]
|
||||
public string atr_ap_bat { get; set; }
|
||||
/*
|
||||
[Category("Atributos limpieza")]
|
||||
[DisplayName("")]
|
||||
[Description("")]
|
||||
public string puerto { get; set; }
|
||||
|
||||
[Category("Atributos limpieza")]
|
||||
[DisplayName("")]
|
||||
[Description("")]
|
||||
public string puerto { get; set; }
|
||||
|
||||
/*
|
||||
[Category("")]
|
||||
[DisplayName("")]
|
||||
[Description("")]
|
||||
public string puerto { get; set; }
|
||||
|
||||
}*/
|
||||
|
||||
}
|
||||
}
|
||||
|
|
@ -137,9 +137,13 @@
|
|||
<Compile Include="Model\TratamientoComun.cs" />
|
||||
<Compile Include="Model\Limpieza.cs" />
|
||||
<Compile Include="Model\LimpiezaDef.cs" />
|
||||
<Compile Include="Services\EjecServ.cs" />
|
||||
<Compile Include="Model\OliviaConf.cs" />
|
||||
<Compile Include="Model\OliviaDef.cs" />
|
||||
<Compile Include="Services\EjecServ.cs" />
|
||||
<Compile Include="Services\ConfigServ.cs" />
|
||||
<Compile Include="Services\LimpiezaServ.cs" />
|
||||
<Compile Include="ViewModel\Configuracion\DockpaneConfigViewModel.cs" />
|
||||
<Compile Include="ViewModel\Configuracion\PaneConfigViewModel.cs" />
|
||||
<Compile Include="ViewModel\OptionsMenuItem.cs" />
|
||||
<Compile Include="ViewModel\PaneEjecutarViewModel.cs" />
|
||||
<Compile Include="ViewModel\PaneLimpiezaSub4ViewModel.cs" />
|
||||
|
|
@ -147,6 +151,12 @@
|
|||
<Compile Include="ViewModel\PaneLimpiezaSub2ViewModel.cs" />
|
||||
<Compile Include="ViewModel\PaneLimpiezaViewModel.cs" />
|
||||
<Compile Include="ViewModel\PanelViewModelBase.cs" />
|
||||
<Compile Include="View\Configuracion\DockPaneConfig.xaml.cs">
|
||||
<DependentUpon>DockPaneConfig.xaml</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="View\Configuracion\PaneConfigView.xaml.cs">
|
||||
<DependentUpon>PaneConfigView.xaml</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="View\PaneEjecutar.xaml.cs">
|
||||
<DependentUpon>PaneEjecutar.xaml</DependentUpon>
|
||||
</Compile>
|
||||
|
|
@ -207,6 +217,14 @@
|
|||
<Resource Include="OliviaIconPro.ico" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Page Include="View\Configuracion\DockPaneConfig.xaml">
|
||||
<SubType>Designer</SubType>
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
</Page>
|
||||
<Page Include="View\Configuracion\PaneConfigView.xaml">
|
||||
<SubType>Designer</SubType>
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
</Page>
|
||||
<Page Include="View\PaneEjecutar.xaml">
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
<SubType>Designer</SubType>
|
||||
|
|
@ -317,11 +335,11 @@
|
|||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||
<PackageAction>BuildDefault</PackageAction>
|
||||
</PropertyGroup>
|
||||
<UsingTask AssemblyFile="C:\Users\Elena\AppData\Local\Programs\ArcGIS\Pro\bin\proapp-sdk-MSBuild.dll" TaskName="proapp_sdk_MSBuild.PackageAddIn" />
|
||||
<UsingTask AssemblyFile="C:\Users\Elena\AppData\Local\Programs\ArcGIS\Pro\bin\proapp-sdk-MSBuild.dll" TaskName="proapp_sdk_MSBuild.CleanAddIn" />
|
||||
<UsingTask AssemblyFile="C:\Users\Elena\AppData\Local\Programs\ArcGIS\Pro\bin\proapp-sdk-MSBuild.dll" TaskName="proapp_sdk_MSBuild.ConvertToRelativePath" />
|
||||
<UsingTask AssemblyFile="$(ArcGISFolder)\bin\proapp-sdk-MSBuild.dll" TaskName="proapp_sdk_MSBuild.PackageAddIn" />
|
||||
<UsingTask AssemblyFile="$(ArcGISFolder)\bin\proapp-sdk-MSBuild.dll" TaskName="proapp_sdk_MSBuild.CleanAddIn" />
|
||||
<UsingTask AssemblyFile="$(ArcGISFolder)\bin\proapp-sdk-MSBuild.dll" TaskName="proapp_sdk_MSBuild.ConvertToRelativePath" />
|
||||
<!--<Import Project="Esri.ArcGISPro.Extensions.targets" Condition="Exists('Esri.ArcGISPro.Extensions.targets')" />-->
|
||||
<Import Project="C:\Users\Elena\AppData\Local\Programs\ArcGIS\Pro\bin\Esri.ProApp.SDK.Desktop.targets" Condition="Exists('C:\Users\Elena\AppData\Local\Programs\ArcGIS\Pro\bin\Esri.ProApp.SDK.Desktop.targets') AND !Exists('Esri.ArcGISPro.Extensions.targets')" />
|
||||
<Import Project="$(ArcGISFolder)\bin\Esri.ProApp.SDK.Desktop.targets" Condition="Exists('$(ArcGISFolder)\bin\Esri.ProApp.SDK.Desktop.targets') AND !Exists('Esri.ArcGISPro.Extensions.targets')" />
|
||||
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
|
||||
Other similar extension points exist, see Microsoft.Common.targets.
|
||||
<Target Name="BeforeBuild">
|
||||
|
|
|
|||
|
|
@ -60,6 +60,15 @@ namespace OliviaAddInPro {
|
|||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Busca una cadena traducida similar a General.
|
||||
/// </summary>
|
||||
internal static string String_ConfigGeneralView {
|
||||
get {
|
||||
return ResourceManager.GetString("String_ConfigGeneralView", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Busca una cadena traducida similar a Control.
|
||||
/// </summary>
|
||||
|
|
@ -87,6 +96,15 @@ namespace OliviaAddInPro {
|
|||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Busca una cadena traducida similar a OLIVIA | Configuración.
|
||||
/// </summary>
|
||||
internal static string String_header_Config {
|
||||
get {
|
||||
return ResourceManager.GetString("String_header_Config", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Busca una cadena traducida similar a OLIVIA | Limpieza.
|
||||
/// </summary>
|
||||
|
|
|
|||
|
|
@ -117,6 +117,9 @@
|
|||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<data name="String_ConfigGeneralView" xml:space="preserve">
|
||||
<value>General</value>
|
||||
</data>
|
||||
<data name="String_ctrol" xml:space="preserve">
|
||||
<value>Control</value>
|
||||
</data>
|
||||
|
|
@ -126,6 +129,9 @@
|
|||
<data name="String_existe_ejec" xml:space="preserve">
|
||||
<value>Ya existe una ejecución en marcha</value>
|
||||
</data>
|
||||
<data name="String_header_Config" xml:space="preserve">
|
||||
<value>OLIVIA | Configuración</value>
|
||||
</data>
|
||||
<data name="String_header_limpieza" xml:space="preserve">
|
||||
<value>OLIVIA | Limpieza</value>
|
||||
</data>
|
||||
|
|
|
|||
|
|
@ -0,0 +1,34 @@
|
|||
using OliviaAddInPro.Model;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace OliviaAddInPro.Services
|
||||
{
|
||||
class ConfigServ
|
||||
{
|
||||
private static ConfigServ configServ=null;
|
||||
|
||||
public static ConfigServ Serv
|
||||
{
|
||||
get {
|
||||
if (configServ == null)
|
||||
configServ = new ConfigServ();
|
||||
return configServ;
|
||||
}
|
||||
}
|
||||
|
||||
public OliviaConf Leer()
|
||||
{
|
||||
return new OliviaConf();
|
||||
}
|
||||
|
||||
public void Guardar(OliviaConf conf)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,28 @@
|
|||
<UserControl x:Class="OliviaAddInPro.DockPaneConfigView"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:ui="clr-namespace:OliviaAddInPro"
|
||||
xmlns:viewModel="clr-namespace:OliviaAddInPro"
|
||||
xmlns:extensions="clr-namespace:ArcGIS.Desktop.Extensions;assembly=ArcGIS.Desktop.Extensions"
|
||||
xmlns:view="clr-namespace:OliviaAddInPro"
|
||||
mc:Ignorable="d"
|
||||
d:DesignHeight="300" d:DesignWidth="300"
|
||||
d:DataContext="{Binding Path=viewModel.DockpaneConfigViewModel}">
|
||||
<UserControl.Resources>
|
||||
<ResourceDictionary>
|
||||
<ResourceDictionary.MergedDictionaries>
|
||||
<extensions:DesignOnlyResourceDictionary Source="pack://application:,,,/ArcGIS.Desktop.Framework;component\Themes\Default.xaml"/>
|
||||
</ResourceDictionary.MergedDictionaries>
|
||||
<DataTemplate DataType="{x:Type viewModel:PaneConfigViewModel}">
|
||||
<view:PaneConfigView />
|
||||
</DataTemplate>
|
||||
</ResourceDictionary>
|
||||
</UserControl.Resources>
|
||||
<ScrollViewer Height="Auto">
|
||||
|
||||
<ContentPresenter Content="{Binding CurrentPage}"></ContentPresenter>
|
||||
|
||||
</ScrollViewer>
|
||||
</UserControl>
|
||||
|
|
@ -0,0 +1,27 @@
|
|||
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.Shapes;
|
||||
|
||||
namespace OliviaAddInPro
|
||||
{
|
||||
/// <summary>
|
||||
/// Lógica de interacción para DockPaneConfig.xaml
|
||||
/// </summary>
|
||||
public partial class DockPaneConfigView : UserControl
|
||||
{
|
||||
public DockPaneConfigView()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,29 @@
|
|||
<UserControl x:Class="OliviaAddInPro.PaneConfigView"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:extensions="clr-namespace:ArcGIS.Desktop.Extensions;assembly=ArcGIS.Desktop.Extensions"
|
||||
xmlns:xctk="http://schemas.xceed.com/wpf/xaml/toolkit" xmlns:xcdg="http://schemas.xceed.com/wpf/xaml/datagrid"
|
||||
xmlns:local="clr-namespace:OliviaAddInPro"
|
||||
xmlns:ui="clr-namespace:OliviaAddInPro"
|
||||
mc:Ignorable="d"
|
||||
d:DesignHeight="450" d:DesignWidth="800"
|
||||
d:DataContext="{Binding Path=ui.PaneConfigViewModel}">
|
||||
<StackPanel Height="auto" VerticalAlignment="Top" >
|
||||
<Grid Height="auto" >
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
<ColumnDefinition Width="Auto"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<Button Content="Guardar" Grid.Column="0" VerticalAlignment="Top" Width="75" Style="{DynamicResource Esri_Button}" Click="OnGuardar"/>
|
||||
<Button Content="Resetear" Grid.Column="1" VerticalAlignment="Top" Width="75" Style="{DynamicResource Esri_Button}" Click="OnRefres"/>
|
||||
</Grid>
|
||||
<xctk:PropertyGrid x:Name="Configuracion" ShowAdvancedOptions="True" SelectedObject="{Binding Configuracion}" HorizontalAlignment="Stretch">
|
||||
<!-- Only the following properties will be displayed in the PropertyGrid -->
|
||||
|
||||
</xctk:PropertyGrid>
|
||||
</StackPanel>
|
||||
|
||||
|
||||
</UserControl>
|
||||
|
|
@ -0,0 +1,44 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
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;
|
||||
|
||||
namespace OliviaAddInPro
|
||||
{
|
||||
/// <summary>
|
||||
/// Lógica de interacción para PaneConfigView.xaml
|
||||
/// </summary>
|
||||
public partial class PaneConfigView : UserControl
|
||||
{
|
||||
public PaneConfigView()
|
||||
{
|
||||
InitializeComponent();
|
||||
|
||||
}
|
||||
private void OnGuardar(object sender, RoutedEventArgs e)
|
||||
{
|
||||
|
||||
if (DataContext is PaneConfigViewModel mod)
|
||||
mod.OnGuardar();
|
||||
}
|
||||
|
||||
private void OnRefres(object sender, RoutedEventArgs e)
|
||||
{
|
||||
if (DataContext is PaneConfigViewModel mod)
|
||||
mod.OnRefres();
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,82 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using ArcGIS.Core.CIM;
|
||||
using ArcGIS.Core.Data;
|
||||
using ArcGIS.Core.Geometry;
|
||||
using ArcGIS.Desktop.Catalog;
|
||||
using ArcGIS.Desktop.Core;
|
||||
using ArcGIS.Desktop.Editing;
|
||||
using ArcGIS.Desktop.Extensions;
|
||||
using ArcGIS.Desktop.Framework;
|
||||
using ArcGIS.Desktop.Framework.Controls;
|
||||
using ArcGIS.Desktop.Framework.Contracts;
|
||||
using ArcGIS.Desktop.Framework.Dialogs;
|
||||
using ArcGIS.Desktop.Framework.Threading.Tasks;
|
||||
using ArcGIS.Desktop.Mapping;
|
||||
using OliviaAddInPro.Model;
|
||||
using OliviaAddInPro.View;
|
||||
|
||||
namespace OliviaAddInPro
|
||||
{
|
||||
internal class DockpaneConfigViewModel : DockPane
|
||||
{
|
||||
private bool firstTimeShow = true;
|
||||
private const string _dockPaneID = "OliviaAddInPro_DockpaneConfig";
|
||||
protected DockpaneConfigViewModel()
|
||||
{
|
||||
_currentPage = new PaneConfigViewModel();
|
||||
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Show the DockPane.
|
||||
/// </summary>
|
||||
internal static void Show()
|
||||
{
|
||||
DockPane pane = FrameworkApplication.DockPaneManager.Find(_dockPaneID);
|
||||
if (pane == null)
|
||||
return;
|
||||
|
||||
pane.Activate();
|
||||
}
|
||||
|
||||
//The parameter passed to this method will be true if the Dockpane is being opened and it is false when you close the dockpane
|
||||
//also false the first time
|
||||
protected override void OnShow(bool isVisible)
|
||||
{
|
||||
if (isVisible == false && !firstTimeShow)
|
||||
{
|
||||
//avisa de cerrar la ventana
|
||||
OliviaGlob.TipoEjec = TiposEjecucion.Ninguno;
|
||||
}
|
||||
if (firstTimeShow)
|
||||
firstTimeShow = false;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Text shown near the top of the DockPane.
|
||||
/// </summary>
|
||||
private string _heading = Resource1.String_header_Config;
|
||||
public string Heading
|
||||
{
|
||||
get { return _heading; }
|
||||
set
|
||||
{
|
||||
SetProperty(ref _heading, value, () => Heading);
|
||||
}
|
||||
}
|
||||
|
||||
private PanelViewModelBase _currentPage;
|
||||
public PanelViewModelBase CurrentPage
|
||||
{
|
||||
get { return _currentPage; }
|
||||
set
|
||||
{
|
||||
SetProperty(ref _currentPage, value, () => CurrentPage);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,47 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using OliviaAddInPro.Model;
|
||||
using OliviaAddInPro.Services;
|
||||
namespace OliviaAddInPro
|
||||
{
|
||||
class PaneConfigViewModel : PanelViewModelBase
|
||||
{
|
||||
private OliviaConf conf=null;
|
||||
public PaneConfigViewModel()
|
||||
{
|
||||
OnRefres();
|
||||
}
|
||||
|
||||
|
||||
public override string DisplayName
|
||||
{
|
||||
get { return Resource1.String_ConfigGeneralView; }
|
||||
}
|
||||
|
||||
public OliviaConf Configuracion
|
||||
{
|
||||
get { return conf; }
|
||||
set
|
||||
{
|
||||
base.SetProperty(ref conf, value, () => conf);
|
||||
ConfiguracioProperty.Update();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public void OnGuardar()
|
||||
{
|
||||
ConfigServ.Serv.Guardar(Configuracion);
|
||||
}
|
||||
|
||||
public void OnRefres()
|
||||
{
|
||||
Configuracion = ConfigServ.Serv.Leer();
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
Loading…
Reference in New Issue