年度变更建库软件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.

70 lines
1.9 KiB

6 months ago
using KGIS.Framework.Commands;
using KGIS.Framework.Utils;
using Kingo.Plugin.General.View;
using System;
namespace Kingo.Plugin.General.Commands
{
public class HelperCommand : BaseMenuCommand
{
private FrmHelper win { get; set; }
public override void OnClick()
{
try
{
if (win == null)
{
win = new FrmHelper();
win.Closed += Win_Closed;
win.WindowStartupLocation = System.Windows.WindowStartupLocation.CenterScreen;
win.Show();
}
else
{
win.WindowState = System.Windows.WindowState.Maximized;
}
}
catch (Exception ex)
{
LogAPI.Debug("在启动 帮助 命令时异常,异常信息如下:");
LogAPI.Debug(ex);
LogAPI.Debug("在启动 帮助 命令时异常信息结束");
}
}
private void Win_Closed(object sender, EventArgs e)
{
try
{
if (win != null)
{
win.Close();
}
win = null;
}
catch (Exception ex)
{
LogAPI.Debug(ex);
}
}
public override void OnCreate(object Hook)
{
try
{
//if (m_hookHelper == null)
//{
// m_hookHelper = new HookHelper();
// m_hookHelper.Hook = Hook;
//}
}
catch (Exception ex)
{
LogAPI.Debug("在初始化 帮助 命令时异常,异常信息如下:");
LogAPI.Debug(ex);
LogAPI.Debug("在初始化 帮助 命令时异常信息结束");
}
}
}
}