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

93 lines
2.4 KiB

6 months ago
using KGIS.Framework.Utils;
using Kingo.Plugin.BHTB_Extract.View;
using Kingo.PluginServiceInterface;
using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using UIShell.OSGi;
namespace Kingo.Plugin.BHTB_Extract
{
public class UcZYQMagrHelper : IUcZYQMagrHelper
{
public UcZYQMagr editMapBlockView = null;
public void InitView()
{
if (editMapBlockView == null)
{
editMapBlockView = UcZYQMagr.Instance;
//editMapBlockView.Title = "作业区管理";
editMapBlockView.CloseViewHandler += (sender, e) =>
{
editMapBlockView = null;
};
editMapBlockView.Loaded += (sender, e) =>
{
editMapBlockView.InitTreeView();
};
}
if (editMapBlockView != null)
{
editMapBlockView.ShowPanel();
}
}
public void UpdataData()
{
if (editMapBlockView != null)
{
editMapBlockView.InitTreeView();
editMapBlockView.ShowPanel();
}
}
public int GetSelectIndex()
{
try
{
return editMapBlockView.node.Nodes.FindIndex(a => a.Checked == true);
}
catch (Exception ex)
{
LogAPI.Debug("获取作业区列表选择索引时发生异常,异常信息如下:" + ex);
return 0;
}
}
public void SetFirstNodeCheck()
{
try
{
editMapBlockView.node.Nodes[0].Checked = true;
}
catch (Exception ex)
{
LogAPI.Debug("设置作业区被选择时发生异常,异常信息如下:" + ex);
return;
}
}
public void ClearData()
{
editMapBlockView.ClearData();
}
public int GetCheckedID()
{
return editMapBlockView.GetCheckedID();
}
public void AddMask(int selectIdZYQ)
{
if (editMapBlockView != null)
{
editMapBlockView.AddMask(selectIdZYQ);
}
}
}
}