diff --git a/Button/ButtonConfig.cs b/Button/ButtonConfig.cs
index 8d500ad..7916eb9 100644
--- a/Button/ButtonConfig.cs
+++ b/Button/ButtonConfig.cs
@@ -31,7 +31,7 @@ namespace OliviaAddInPro
}
else
{
- HelperGlobal.ponMsg(Resource1.String_existe_ejec, MessageType.Warning);
+ HelperGlobal.ponMsg(Resource1.String_existe_ejec, System.Windows.MessageBoxImage.Warning);
}
}
}
diff --git a/Button/ButtonLimp.cs b/Button/ButtonLimp.cs
index 3875446..3d8ab2d 100644
--- a/Button/ButtonLimp.cs
+++ b/Button/ButtonLimp.cs
@@ -32,7 +32,7 @@ namespace OliviaAddInPro
}
else
{
- HelperGlobal.ponMsg(Resource1.String_existe_ejec, MessageType.Warning);
+ HelperGlobal.ponMsg(Resource1.String_existe_ejec, System.Windows.MessageBoxImage.Warning);
}
}
}
diff --git a/Button/ButtonMaq.cs b/Button/ButtonMaq.cs
index bc8935b..9c7e629 100644
--- a/Button/ButtonMaq.cs
+++ b/Button/ButtonMaq.cs
@@ -31,7 +31,7 @@ namespace OliviaAddInPro
}
else
{
- HelperGlobal.ponMsg(Resource1.String_existe_ejec, MessageType.Warning);
+ HelperGlobal.ponMsg(Resource1.String_existe_ejec, System.Windows.MessageBoxImage.Warning);
}
}
}
diff --git a/Button/ButtonRec.cs b/Button/ButtonRec.cs
index 7929e28..a8fe161 100644
--- a/Button/ButtonRec.cs
+++ b/Button/ButtonRec.cs
@@ -32,7 +32,7 @@ namespace OliviaAddInPro
}
else
{
- HelperGlobal.ponMsg(Resource1.String_existe_ejec, MessageType.Warning);
+ HelperGlobal.ponMsg(Resource1.String_existe_ejec, System.Windows.MessageBoxImage.Warning);
}
}
}
diff --git a/Config.daml b/Config.daml
index d0c0405..74e317f 100644
--- a/Config.daml
+++ b/Config.daml
@@ -24,7 +24,7 @@
-
+
@@ -44,7 +44,10 @@
+
+
@@ -53,7 +56,7 @@
-
+
\ No newline at end of file
diff --git a/Helper/HelperGlobal.cs b/Helper/HelperGlobal.cs
index 1af1daf..c2fe388 100644
--- a/Helper/HelperGlobal.cs
+++ b/Helper/HelperGlobal.cs
@@ -5,17 +5,20 @@ using System.Linq;
using System.Text;
using System.Threading.Tasks;
using ArcGIS.Desktop.Internal.Framework.Controls;
+using ArcGIS.Desktop.Framework.Dialogs;
+using System.Windows;
namespace OliviaAddInPro.Helper
{
public static class HelperGlobal
{
- public static ErrorMessageDialog msg;
- public static void ponMsg(String mensaje, MessageType tipo, String titulo = "OLIVIA")
- {
- msg = new ErrorMessageDialog(titulo, mensaje, tipo);
- msg.ShowDialog();
+ public static void ponMsg(String mensaje, System.Windows.MessageBoxImage icon = MessageBoxImage.Information,
+ String titulo = "OLIVIA",
+ MessageBoxButton button= MessageBoxButton.OK)
+ {
+ //MessageBoxResult Show(string messageText, string caption, MessageBoxButton button, MessageBoxImage icon);
+ ArcGIS.Desktop.Framework.Dialogs.MessageBox.Show(mensaje, titulo, button, icon);
}
public static string RevisaText(string text)
{
diff --git a/OliviaAddInPro.csproj b/OliviaAddInPro.csproj
index 318f3b6..92ade20 100644
--- a/OliviaAddInPro.csproj
+++ b/OliviaAddInPro.csproj
@@ -138,11 +138,15 @@
+
+
+ PaneEjecutar.xaml
+
PaneLimpiezaSub4.xaml
@@ -200,6 +204,10 @@
+
+ MSBuild:Compile
+ Designer
+
MSBuild:Compile
Designer
diff --git a/View/DockpaneLimpieza.xaml b/View/DockpaneLimpieza.xaml
index 4227596..6a707c1 100644
--- a/View/DockpaneLimpieza.xaml
+++ b/View/DockpaneLimpieza.xaml
@@ -22,7 +22,7 @@
-
+
diff --git a/View/PaneEjecutar.xaml b/View/PaneEjecutar.xaml
new file mode 100644
index 0000000..d50e971
--- /dev/null
+++ b/View/PaneEjecutar.xaml
@@ -0,0 +1,31 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/View/PaneEjecutar.xaml.cs b/View/PaneEjecutar.xaml.cs
new file mode 100644
index 0000000..7a2cfe1
--- /dev/null
+++ b/View/PaneEjecutar.xaml.cs
@@ -0,0 +1,30 @@
+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;
+
+
+namespace OliviaAddInPro
+{
+ ///
+ /// Interaction logic for PaneEjecutarView.xaml
+ ///
+ public partial class PaneEjecutarView : UserControl
+ {
+ public PaneEjecutarView()
+ {
+ InitializeComponent();
+ }
+
+ }
+}
diff --git a/View/PaneLimpieza.xaml b/View/PaneLimpieza.xaml
index e5c03c6..510988f 100644
--- a/View/PaneLimpieza.xaml
+++ b/View/PaneLimpieza.xaml
@@ -39,6 +39,9 @@
+
+
+
@@ -46,8 +49,8 @@
-
-
+
+
-
-
+
+
diff --git a/View/PaneLimpiezaSub1.xaml b/View/PaneLimpiezaSub1.xaml
index e5f8471..fd3c9e3 100644
--- a/View/PaneLimpiezaSub1.xaml
+++ b/View/PaneLimpiezaSub1.xaml
@@ -5,7 +5,7 @@
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:extensions="clr-namespace:ArcGIS.Desktop.Extensions;assembly=ArcGIS.Desktop.Extensions"
xmlns:ui="clr-namespace:OliviaAddInPro"
- mc:Ignorable="d" d:DesignWidth="300" Height="380"
+ mc:Ignorable="d" d:DesignWidth="300" Height="350"
d:DataContext="{Binding Path=ui.PaneLimpiezaSub1ViewModel}" >
@@ -28,38 +28,42 @@
-
-
-
-
-
+
+
+
+
+
-
+
-
+
+
-
-
-
+
+
+
-
+
-
-
-
+
+
+
-
+
diff --git a/View/PaneLimpiezaSub1.xaml.cs b/View/PaneLimpiezaSub1.xaml.cs
index aa9f780..05e42da 100644
--- a/View/PaneLimpiezaSub1.xaml.cs
+++ b/View/PaneLimpiezaSub1.xaml.cs
@@ -47,10 +47,15 @@ namespace OliviaAddInPro
if (!string.IsNullOrEmpty(capa))
{
label_capalimp.Content = System.IO.Path.GetFileNameWithoutExtension(capa);
- ((PaneLimpiezaSub1ViewModel)DataContext).AbiertaCapa(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)
@@ -58,7 +63,8 @@ namespace OliviaAddInPro
int i = -1;
if (sender is ComboBox combo)
i = combo.SelectedIndex;
- ((PaneLimpiezaSub1ViewModel)DataContext).ComboTtoSel(i);
+ if(DataContext is PaneLimpiezaSub1ViewModel mod)
+ mod.ComboTtoSel(i);
}
@@ -67,7 +73,8 @@ namespace OliviaAddInPro
int i = -1;
if (sender is ComboBox combo)
i = combo.SelectedIndex;
- ((PaneLimpiezaSub1ViewModel)DataContext).ComboAmbSel(i);
+ if (DataContext is PaneLimpiezaSub1ViewModel mod)
+ mod.ComboAmbSel(i);
}
}
}
diff --git a/View/PaneLimpiezaSub2.xaml.cs b/View/PaneLimpiezaSub2.xaml.cs
index 5ea1f3d..ee146d3 100644
--- a/View/PaneLimpiezaSub2.xaml.cs
+++ b/View/PaneLimpiezaSub2.xaml.cs
@@ -57,7 +57,7 @@ namespace OliviaAddInPro
{
texto = Resource1.String_selec_capa;
if (HelperGdb.OutStr.Length > 0)
- HelperGlobal.ponMsg(HelperGdb.OutStr, MessageType.Error);
+ HelperGlobal.ponMsg(HelperGdb.OutStr, System.Windows.MessageBoxImage.Error);
}
_texto = texto;
diff --git a/View/PaneLimpiezaSub3.xaml b/View/PaneLimpiezaSub3.xaml
index dd57f0b..bbc5091 100644
--- a/View/PaneLimpiezaSub3.xaml
+++ b/View/PaneLimpiezaSub3.xaml
@@ -38,6 +38,7 @@
-
+
+
diff --git a/View/ProWndSelectFields.xaml.cs b/View/ProWndSelectFields.xaml.cs
index 9f5b99a..3237bf3 100644
--- a/View/ProWndSelectFields.xaml.cs
+++ b/View/ProWndSelectFields.xaml.cs
@@ -51,9 +51,9 @@ namespace OliviaAddInPro.View
if (elems.Count == 0)
{
if (HelperGdb.OutStr.Length > 0)
- HelperGlobal.ponMsg(HelperGdb.OutStr, MessageType.Error);
+ HelperGlobal.ponMsg(HelperGdb.OutStr, System.Windows.MessageBoxImage.Error);
else
- HelperGlobal.ponMsg(Resource1.String_error_elems_tabla, MessageType.Warning);
+ HelperGlobal.ponMsg(Resource1.String_error_elems_tabla, System.Windows.MessageBoxImage.Warning);
}
listBoxAttributes.ItemsSource = elems;
}
diff --git a/ViewModel/PaneEjecutarViewModel.cs b/ViewModel/PaneEjecutarViewModel.cs
new file mode 100644
index 0000000..f00d15a
--- /dev/null
+++ b/ViewModel/PaneEjecutarViewModel.cs
@@ -0,0 +1,44 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+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.Contracts;
+using ArcGIS.Desktop.Framework.Dialogs;
+using ArcGIS.Desktop.Framework.Threading.Tasks;
+using ArcGIS.Desktop.Mapping;
+
+namespace OliviaAddInPro
+{
+ internal class PaneEjecutarViewModel : PanelViewModelBase
+ {
+ public PaneEjecutarViewModel()
+ {
+
+ }
+
+
+ #region Properties
+
+ public override string DisplayName
+ {
+ get { return "Ejecutar"; }
+ }
+
+ private int numPtosCtrl;
+ public int NumPtosCtrl
+ {
+ get { return numPtosCtrl; }
+ set { base.SetProperty(ref numPtosCtrl, value, () => NumPtosCtrl); }
+ }
+
+ #endregion Properties
+ }
+}
diff --git a/ViewModel/PaneLimpiezaSub1ViewModel.cs b/ViewModel/PaneLimpiezaSub1ViewModel.cs
index 240d042..fdaf9f4 100644
--- a/ViewModel/PaneLimpiezaSub1ViewModel.cs
+++ b/ViewModel/PaneLimpiezaSub1ViewModel.cs
@@ -31,6 +31,7 @@ namespace OliviaAddInPro
private int selOpAmb = -1;
private ObservableCollection> ambitos = new ObservableCollection>();
private bool[] ambitosSel;
+ private bool capaAbierta = false;
/**
@@ -159,6 +160,15 @@ namespace OliviaAddInPro
base.NotifyPropertyChanged("OpsAmbs");
}
}
+ public bool CapaAbierta
+ {
+ get { return capaAbierta; }
+ set
+ {
+ capaAbierta = value;
+ base.NotifyPropertyChanged("CapaAbierta");
+ }
+ }
#endregion Properties
public PaneLimpiezaSub1ViewModel(Limpieza _limp)
@@ -177,11 +187,12 @@ namespace OliviaAddInPro
public void AbiertaCapa(string capa)
{
limp.CapaElems = capa;
+ CapaAbierta = false;
//comprueba los campos de limpieza
if (!limp.CompruebaCamposLimp())
{
string ss = limp.ErrStr;
- HelperGlobal.ponMsg(ss, ArcGIS.Desktop.Internal.Framework.Controls.MessageType.Warning);
+ HelperGlobal.ponMsg(ss, System.Windows.MessageBoxImage.Warning);
return;
}
@@ -198,13 +209,13 @@ namespace OliviaAddInPro
if (!hay_alguno)
{
HelperGlobal.ponMsg(Resource1.String_error_elems_tabla,
- ArcGIS.Desktop.Internal.Framework.Controls.MessageType.Warning);
+ System.Windows.MessageBoxImage.Warning);
return;
}
//hay elementos en la gdb
OpsAmbs.Clear();
Ambitos.Clear();
-
+ CapaAbierta = true;
}
/**
diff --git a/ViewModel/PaneLimpiezaSub3ViewModel.cs b/ViewModel/PaneLimpiezaSub3ViewModel.cs
index 8adf319..05803c9 100644
--- a/ViewModel/PaneLimpiezaSub3ViewModel.cs
+++ b/ViewModel/PaneLimpiezaSub3ViewModel.cs
@@ -60,6 +60,12 @@ namespace OliviaAddInPro
get { return checkAjustSect; }
set { base.SetProperty(ref checkAjustSect, value, () => CheckAjustSect); }
}
+ private bool checkIgnoAis;
+ public bool CheckIgnoAis
+ {
+ get { return checkIgnoAis; }
+ set { base.SetProperty(ref checkIgnoAis, value, () => CheckIgnoAis); }
+ }
#endregion Properties
}
diff --git a/ViewModel/PaneLimpiezaViewModel.cs b/ViewModel/PaneLimpiezaViewModel.cs
index 4fb5cbc..be881ce 100644
--- a/ViewModel/PaneLimpiezaViewModel.cs
+++ b/ViewModel/PaneLimpiezaViewModel.cs
@@ -15,12 +15,14 @@ namespace OliviaAddInPro
private PaneLimpiezaSub2ViewModel _subPanel2ViewModel;
private PaneLimpiezaSub3ViewModel _subPanel3ViewModel;
private PaneLimpiezaSub4ViewModel _subPanel4ViewModel;
+ private PaneEjecutarViewModel _subPanelEjecutar;
public PaneLimpiezaViewModel()
{
_subPanel1ViewModel = new PaneLimpiezaSub1ViewModel(OliviaGlob.Limp);
_subPanel2ViewModel = new PaneLimpiezaSub2ViewModel();
_subPanel3ViewModel = new PaneLimpiezaSub3ViewModel();
_subPanel4ViewModel = new PaneLimpiezaSub4ViewModel();
+ _subPanelEjecutar = new PaneEjecutarViewModel();
OptionsMenu = new ObservableCollection
{
@@ -49,6 +51,13 @@ namespace OliviaAddInPro
set { SetProperty(ref _currentSubPanelPage, value, () => CurrentSubPanelPage); }
}
+ private PanelViewModelBase _subPanelEjec;
+ public PanelViewModelBase SubPanelEjec
+ {
+ get { return _subPanelEjec; }
+ set { SetProperty(ref _subPanelEjec, value, () => SubPanelEjec); }
+ }
+
private OptionsMenuItem _selectionOption;
public OptionsMenuItem SelectedOption
{
diff --git a/ViewModel/ShowProWndSelectFields.cs b/ViewModel/ShowProWndSelectFields.cs
index 0ecc20b..a9ea72a 100644
--- a/ViewModel/ShowProWndSelectFields.cs
+++ b/ViewModel/ShowProWndSelectFields.cs
@@ -42,9 +42,9 @@ namespace OliviaAddInPro.View
if (fields.Count == 0)
{
if (HelperGdb.OutStr.Length > 0)
- HelperGlobal.ponMsg(HelperGdb.OutStr, MessageType.Error);
+ HelperGlobal.ponMsg(HelperGdb.OutStr, System.Windows.MessageBoxImage.Error);
else
- HelperGlobal.ponMsg(Resource1.String_error_elems_tabla, MessageType.Warning);
+ HelperGlobal.ponMsg(Resource1.String_error_elems_tabla, System.Windows.MessageBoxImage.Warning);
}
else
{