|
|
|
|
using ESRI.ArcGIS.Carto;
|
|
|
|
|
using KGIS.Framework.Maps;
|
|
|
|
|
using KGIS.Framework.Utils;
|
|
|
|
|
using KGIS.Framework.Utils.Helper;
|
|
|
|
|
using Kingo.PluginServiceInterface;
|
|
|
|
|
using Kingo.PluginServiceInterface.Model;
|
|
|
|
|
using KUI.Windows;
|
|
|
|
|
using System;
|
|
|
|
|
using System.IO;
|
|
|
|
|
using System.Windows;
|
|
|
|
|
using System.Windows.Controls;
|
|
|
|
|
|
|
|
|
|
namespace Kingo.Plugin.YJJK.View
|
|
|
|
|
{
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 增量数据生成
|
|
|
|
|
/// IncrementalDataGeneration.xaml 的交互逻辑
|
|
|
|
|
/// </summary>
|
|
|
|
|
public partial class ViewZLHZ_TQ : UserControl, IWizardFramework
|
|
|
|
|
{
|
|
|
|
|
public object Parameter
|
|
|
|
|
{
|
|
|
|
|
get;
|
|
|
|
|
set;
|
|
|
|
|
}
|
|
|
|
|
private string m_strDescription = "根据年度变更规则生成变更一览表";
|
|
|
|
|
public string Description
|
|
|
|
|
{
|
|
|
|
|
get { return m_strDescription; }
|
|
|
|
|
set { m_strDescription = value; }
|
|
|
|
|
}
|
|
|
|
|
private string m_strCaption = "增量汇总";
|
|
|
|
|
public string Caption
|
|
|
|
|
{
|
|
|
|
|
get { return m_strCaption; }
|
|
|
|
|
set { m_strCaption = value; }
|
|
|
|
|
}
|
|
|
|
|
private bool m_bIsFinalSuccess = false;
|
|
|
|
|
public bool IsFinalSuccess
|
|
|
|
|
{
|
|
|
|
|
get { return m_bIsFinalSuccess; }
|
|
|
|
|
set { m_bIsFinalSuccess = value; }
|
|
|
|
|
}
|
|
|
|
|
private bool m_IsSkip = false;
|
|
|
|
|
public bool IsSkip
|
|
|
|
|
{
|
|
|
|
|
get { return m_IsSkip; }
|
|
|
|
|
set { m_IsSkip = value; }
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public ViewZLHZ_TQ()
|
|
|
|
|
{
|
|
|
|
|
InitializeComponent();
|
|
|
|
|
}
|
|
|
|
|
private void btn_oK_Click(object sender, RoutedEventArgs e)
|
|
|
|
|
{
|
|
|
|
|
try
|
|
|
|
|
{
|
|
|
|
|
this.ShowLoading("正在进行增量汇总...", 0, 0);
|
|
|
|
|
IFeatureLayer jcDLTBLayer = MapsManager.Instance.MapService.GetFeatureLayerByLayerName("地类图斑");
|
|
|
|
|
//ZLHZHelper zLHZHelper = new ZLHZHelper();
|
|
|
|
|
//zLHZHelper.Implement();
|
|
|
|
|
IDGParameter Parm = new IDGParameter();
|
|
|
|
|
ProjectInfo prjInfo = MapsManager.Instance.CurrProjectInfo as ProjectInfo;
|
|
|
|
|
Parm.StrProjInfo = Path.Combine(prjInfo.ProjDir, prjInfo.ProjName + prjInfo.ProjSuffix);
|
|
|
|
|
//Parm.PrjInfo = MapsManager.Instance.CurrProjectInfo as ProjectInfo;
|
|
|
|
|
Parm.ExeZLHZ = true;
|
|
|
|
|
ProcesHelper.Instance.ProgressHandle = (o) =>
|
|
|
|
|
{
|
|
|
|
|
this.UpdateMsg(o.ToString());
|
|
|
|
|
};
|
|
|
|
|
string result = ProcesHelper.Instance.ExeGPForProces(Parm);
|
|
|
|
|
this.CloseLoading();
|
|
|
|
|
|
|
|
|
|
if (result.Contains("Err"))
|
|
|
|
|
{
|
|
|
|
|
MessageHelper.ShowTips("变更一览表生成失败,失败信息请查看系统日志!");
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
MessageHelper.ShowTips("变更一览表生成完成!");
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
catch (Exception ex)
|
|
|
|
|
{
|
|
|
|
|
MessageHelper.ShowError("执行增量汇总错误:" + ex.Message);
|
|
|
|
|
}
|
|
|
|
|
finally
|
|
|
|
|
{
|
|
|
|
|
this.CloseLoading();
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
private void btn_nO_Click(object sender, RoutedEventArgs e)
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public bool Execute()
|
|
|
|
|
{
|
|
|
|
|
try
|
|
|
|
|
{
|
|
|
|
|
this.ShowLoading("正在进行增量汇总...", 0, 0);
|
|
|
|
|
m_bIsFinalSuccess = true;
|
|
|
|
|
}
|
|
|
|
|
catch (Exception ex)
|
|
|
|
|
{
|
|
|
|
|
LogAPI.Debug("执行增量汇总错误:" + ex.Message);
|
|
|
|
|
MessageHelper.ShowError("执行增量汇总错误:" + ex.Message);
|
|
|
|
|
return m_bIsFinalSuccess;
|
|
|
|
|
}
|
|
|
|
|
finally
|
|
|
|
|
{
|
|
|
|
|
this.CloseLoading();
|
|
|
|
|
}
|
|
|
|
|
return m_bIsFinalSuccess;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public void Intializing(bool IsSkip = false)
|
|
|
|
|
{
|
|
|
|
|
if (IsSkip)
|
|
|
|
|
{
|
|
|
|
|
m_IsSkip = IsSkip;
|
|
|
|
|
(Parameter as IDGParameter).ExeZLHZ = false;
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
(Parameter as IDGParameter).ExeZLHZ = true;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public bool Validating()
|
|
|
|
|
{
|
|
|
|
|
//Parameter = new IDGParameter();
|
|
|
|
|
//ProjectInfo prjInfo = MapsManager.Instance.CurrProjectInfo as ProjectInfo;
|
|
|
|
|
//(Parameter as IDGParameter).StrProjInfo = Path.Combine(prjInfo.ProjDir, prjInfo.ProjName + prjInfo.ProjSuffix);
|
|
|
|
|
//(Parameter as IDGParameter).ExeZLHZ = true;
|
|
|
|
|
return true;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public void Back()
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|