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

60 lines
1.7 KiB

using KGIS.Framework.Commands;
using KGIS.Framework.Utils;
using KGIS.Framework.Utils.Dialog;
using Kingo.Plugin.MapView.Views.AppMenuView;
using Kingo.PluginServiceInterface;
using System;
using UIShell.OSGi;
namespace Kingo.Plugin.MapView.Commands
{
/// <summary>
/// 工作目录-功能点
/// </summary>
public class CmdSetWorkspace : BaseMenuCommand
{
IWorkCatalog _workCatalog = null;
//测试项
UCSetWorkCatalog uCSetWorkCatalog = null;
public override void OnClick()
{
try
{
if (uCSetWorkCatalog == null)
{
uCSetWorkCatalog = new UCSetWorkCatalog
{
WindowStartupLocation = System.Windows.WindowStartupLocation.CenterScreen
};
uCSetWorkCatalog.Closed += UCSetWorkCatalog_Closed;
}
uCSetWorkCatalog.ShowInMainWindow(true);
//获取公共服务接口
_workCatalog = BundleRuntime.Instance.GetFirstOrDefaultService<IWorkCatalog>();
}
catch (Exception ex)
{
LogAPI.Debug("打开工作目录失败:" + ex.Message);
}
}
private void UCSetWorkCatalog_Closed(object sender, EventArgs e)
{
try
{
if (uCSetWorkCatalog != null)
uCSetWorkCatalog = null;
}
catch (Exception ex)
{
LogAPI.Debug("在设置工作目录时发生异常,异常信息如下:" + ex.Message);
}
}
public override void OnCreate(object Hook)
{
}
}
}