年度变更建库软件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 KGIS.Framework.Commands;
using KGIS.Framework.Utils;
using KGIS.Framework.Utils.Helper;
using System;
using TestMultiGetPointsTranslate.View;
namespace TestMultiGetPointsTranslate.Commands
{
/// <summary>
/// 多窗口取点矫正
/// </summary>
public class CmdMultiGetPointsTranslateForm : BaseMenuCommand
{
TestMultiGetPointsTranslateForm ucMultiGetPointsTranslateForm = null;
public override void OnClick()
{
try
{
if (ucMultiGetPointsTranslateForm == null)
{
ucMultiGetPointsTranslateForm = new TestMultiGetPointsTranslateForm();
ucMultiGetPointsTranslateForm.Closed += UCMultiGetPointsTranslateViewForm_Closed;
}
ucMultiGetPointsTranslateForm.Text = "影像配准纠正软件";
ucMultiGetPointsTranslateForm.ShowInMainForm();
}
catch (Exception ex)
{
LogAPI.Debug(ex);
MessageHelper.ShowError("多窗口取点矫正出现错误,可能的原因是:" + ex.Message);
}
}
private void UCMultiGetPointsTranslateViewForm_Closed(object sender, EventArgs e)
{
if (ucMultiGetPointsTranslateForm != null)
{
ucMultiGetPointsTranslateForm = null;
}
}
public override void OnCreate(object Hook)
{
}
public override bool Enabled
{
get
{
return KGIS.Framework.Maps.MapsManager.Instance.MapService.GetProjectInfo() == null ? false : true;
}
}
}
}