Añadida Ventana marchandoUnaDe
parent
2e87fb3240
commit
24e0cd9697
|
|
@ -158,6 +158,7 @@
|
|||
<Compile Include="Services\LimpiezaServ.cs" />
|
||||
<Compile Include="Services\ProcesoEjecServ.cs" />
|
||||
<Compile Include="Services\RecogidaServ.cs" />
|
||||
<Compile Include="ViewModel\Comun\MarchandoUnaDeViewModel.cs" />
|
||||
<Compile Include="ViewModel\Configuracion\DockpaneConfigViewModel.cs" />
|
||||
<Compile Include="ViewModel\Configuracion\PaneConfigViewModel.cs" />
|
||||
<Compile Include="ViewModel\OptionsMenuItem.cs" />
|
||||
|
|
@ -168,6 +169,9 @@
|
|||
<Compile Include="ViewModel\Limpieza\PaneLimpiezaViewModel.cs" />
|
||||
<Compile Include="ViewModel\PanelViewModelBase.cs" />
|
||||
<Compile Include="ViewModel\Recogida\PaneRecogidaSub1ViewModel.cs" />
|
||||
<Compile Include="View\Comun\MarchandoUnaDe.xaml.cs">
|
||||
<DependentUpon>MarchandoUnaDe.xaml</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="View\Configuracion\PropertyGridFilePickerLine.xaml.cs">
|
||||
<DependentUpon>PropertyGridFilePickerLine.xaml</DependentUpon>
|
||||
</Compile>
|
||||
|
|
@ -241,6 +245,10 @@
|
|||
<Resource Include="OliviaIconPro.ico" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Page Include="View\Comun\MarchandoUnaDe.xaml">
|
||||
<SubType>Designer</SubType>
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
</Page>
|
||||
<Page Include="View\Configuracion\PropertyGridFilePickerLine.xaml">
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
<SubType>Designer</SubType>
|
||||
|
|
|
|||
|
|
@ -0,0 +1,17 @@
|
|||
<Window x:Class="OliviaAddInPro.MarchandoUnaDe"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:ui="clr-namespace:OliviaAddInPro"
|
||||
xmlns:local="clr-namespace:OliviaAddInPro"
|
||||
mc:Ignorable="d"
|
||||
Title="MarchandoUnaDe" Height="165" Width="462"
|
||||
d:DataContext="{Binding Path=ui.MarchandoUnaDeViewModel}">
|
||||
|
||||
<Grid>
|
||||
<Label Content="{Binding TextProceso}" HorizontalAlignment="Left" Margin="76,24,0,0" VerticalAlignment="Top" Width="303" Height="26"/>
|
||||
<ProgressBar Minimum="0" Maximum="100" HorizontalAlignment="Left" Value="{Binding Progreso, UpdateSourceTrigger=PropertyChanged}" Height="20" Margin="76,66,0,0" VerticalAlignment="Top" Width="303"/>
|
||||
<Label Content="{Binding TextEstado}" HorizontalAlignment="Left" Margin="95,91,0,0" VerticalAlignment="Top" Width="265" Height="28"/>
|
||||
</Grid>
|
||||
</Window>
|
||||
|
|
@ -0,0 +1,35 @@
|
|||
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 MarchandoUnaDe.xaml
|
||||
/// </summary>
|
||||
public partial class MarchandoUnaDe : Window
|
||||
{
|
||||
public MarchandoUnaDe()
|
||||
{
|
||||
InitializeComponent();
|
||||
DataContext = new MarchandoUnaDeViewModel();
|
||||
}
|
||||
|
||||
public MarchandoUnaDeViewModel GetViewModel()
|
||||
{
|
||||
if (DataContext is MarchandoUnaDeViewModel m)
|
||||
return m;
|
||||
return null;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,35 @@
|
|||
using ArcGIS.Desktop.Framework.Contracts;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace OliviaAddInPro
|
||||
{
|
||||
public class MarchandoUnaDeViewModel : PropertyChangedBase
|
||||
{
|
||||
|
||||
private string textProceso;
|
||||
public string TextProceso
|
||||
{
|
||||
get { return textProceso; }
|
||||
set { base.SetProperty(ref textProceso, value, () => TextProceso); }
|
||||
}
|
||||
|
||||
private string textEstado;
|
||||
public string TextEstado
|
||||
{
|
||||
get { return textEstado; }
|
||||
set { base.SetProperty(ref textEstado, value, () => TextEstado); }
|
||||
}
|
||||
private double progreso;
|
||||
|
||||
public double Progreso
|
||||
{
|
||||
get { return progreso; }
|
||||
set { base.SetProperty(ref progreso, value, () => Progreso); }
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
|
@ -10,13 +10,14 @@ using OliviaAddInPro.Helper;
|
|||
using static OliviaAddInPro.Model.ComunDef;
|
||||
using ArcGIS.Desktop.Framework.Threading.Tasks;
|
||||
using ArcGIS.Desktop.Framework.Contracts;
|
||||
|
||||
namespace OliviaAddInPro
|
||||
{
|
||||
class PaneLimpiezaViewModel : PanelViewModelBase
|
||||
{
|
||||
private PaneLimpiezaSub1ViewModel _subPanel1ViewModel;
|
||||
Limpieza limp;
|
||||
|
||||
Limpieza limp;
|
||||
public MarchandoUnaDe marchando;
|
||||
public PaneLimpiezaViewModel()
|
||||
{
|
||||
_subPanel1ViewModel = new PaneLimpiezaSub1ViewModel();
|
||||
|
|
@ -176,20 +177,32 @@ namespace OliviaAddInPro
|
|||
public void Ejecuta(OliviaAddInPro.Services.ModosEjec modo)
|
||||
{
|
||||
string err = "";
|
||||
marchando = new MarchandoUnaDe();
|
||||
marchando.Show();
|
||||
var vm= marchando.GetViewModel();
|
||||
//marchando
|
||||
|
||||
|
||||
OliviaGlob.progrDialog.Show();
|
||||
//oculta la ventana
|
||||
OliviaGlob.ShowHidePane(false);
|
||||
|
||||
if (!Lee(out err))
|
||||
vm.Progreso = 50.0;
|
||||
vm.TextProceso = "Proceso";
|
||||
vm.TextEstado = "Estado";
|
||||
using (var prog = new ProgressDialog("Procesando", Resource1.String_cancel_progreso, 100, false))
|
||||
{
|
||||
HelperGlobal.ponMsg(err);
|
||||
return;
|
||||
}
|
||||
OliviaGlob.progrDialog = prog;
|
||||
OliviaGlob.Limp.ProgrSrc = new MyCancelableProgressorSource(OliviaGlob.progrDialog);
|
||||
OliviaGlob.progrDialog.Show();
|
||||
|
||||
Action<TareaRes> ac = OliviaGlob.finEjecuta;
|
||||
OliviaGlob.Limp.EjecutaAsync(modo, ac);
|
||||
//oculta la ventana
|
||||
OliviaGlob.ShowHidePane(false);
|
||||
|
||||
if (!Lee(out err))
|
||||
{
|
||||
HelperGlobal.ponMsg(err);
|
||||
return;
|
||||
}
|
||||
|
||||
Action<TareaRes> ac = OliviaGlob.finEjecuta;
|
||||
OliviaGlob.Limp.EjecutaAsync2(modo, ac);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue