年度变更建库软件5.0版本
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

56 lines
1.7 KiB

using ESRI.ArcGIS.Controls;
using KGIS.Framework.Commands;
using KGIS.Framework.Utils;
using Kingo.Plugin.DTBJK_XJ.View;
using System;
namespace Kingo.Plugin.DTBJK_XJ.Commands
{
public class CmdUploadTask : BaseMenuCommand
{
private IEngineEditor m_pEditor { get; set; }
private UCUploadTask uCUploadTask { get; set; }
public override void OnClick()
{
try
{
if (uCUploadTask == null)
{
uCUploadTask = new UCUploadTask()
{
Title = "任务数据上报",
WindowStartupLocation = System.Windows.WindowStartupLocation.CenterScreen
};
uCUploadTask.Closed += LoadDTBJKData_CloseViewHandler;
}
uCUploadTask.ShowInMainWindow(true);
}
catch (Exception ex)
{
LogAPI.Debug("Kingo.Plugin.DTBJK_XJ.Commands.CmdUploadTask:OnClick" + ex.Message);
LogAPI.Debug("Kingo.Plugin.DTBJK_XJ.Commands.CmdUploadTask:OnClick" + ex.StackTrace);
}
}
public override void OnCreate(object Hook)
{
m_pEditor = new EngineEditorClass();
}
private void LoadDTBJKData_CloseViewHandler(object sender, EventArgs e)
{
try
{
if (uCUploadTask != null)
{
uCUploadTask.DataContext = null;
uCUploadTask = null;
}
}
catch (Exception ex)
{
LogAPI.Debug(ex);
}
}
}
}