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.
66 lines
1.7 KiB
66 lines
1.7 KiB
using ESRI.ArcGIS.Controls; |
|
using KGIS.Framework.AE.ExtensionMethod; |
|
using KGIS.Framework.Commands; |
|
using KGIS.Framework.Utils; |
|
using KGIS.Framework.Utils.Helper; |
|
using Kingo.Plugin.BGResultManager.View; |
|
using System; |
|
|
|
|
|
namespace Kingo.Plugin.BGResultManager.Commands |
|
{ |
|
public class ZKResultExportCommand : BaseMenuCommand |
|
{ |
|
public IHookHelper m_hookHelper; |
|
|
|
public override void OnCreate(object hook) |
|
{ |
|
if (hook == null) |
|
{ |
|
return; |
|
} |
|
try |
|
{ |
|
if (m_hookHelper == null) |
|
{ |
|
m_hookHelper = new HookHelperClass(); |
|
m_hookHelper.Hook = hook; |
|
} |
|
} |
|
catch |
|
{ |
|
m_hookHelper = null; |
|
return; |
|
} |
|
} |
|
|
|
public override void OnClick() |
|
{ |
|
try |
|
{ |
|
//KGIS.Framework.Common.Utils.LicenseManager.License(); |
|
FrmResultsExport frm = new FrmResultsExport(); |
|
frm.WindowStartupLocation = System.Windows.WindowStartupLocation.CenterScreen; |
|
frm.ShowInMainWindow(); |
|
} |
|
catch (Exception ex) |
|
{ |
|
LogAPI.Debug("整库报表导出失败" + ex.Message); |
|
MessageHelper.ShowError("整库报表导出失败,可能的原因是:" + ex.Message); |
|
} |
|
} |
|
|
|
public override bool Enabled |
|
{ |
|
get |
|
{ |
|
string strDocName = this.m_hookHelper.GetDocumentFilename(); |
|
if (string.IsNullOrWhiteSpace(strDocName)) |
|
return false; |
|
return true; |
|
} |
|
} |
|
|
|
} |
|
|
|
}
|
|
|