using KGIS.Framework.Maps; using KGIS.Framework.Platform; using KGIS.Framework.Utils; using Kingo.Plugin.General.View; using Kingo.PluginServiceInterface; using UIShell.OSGi; namespace Kingo.Plugin.General { public class Activator : IBundleActivator { /// /// 图斑基本信息 /// private IElementInfo _UCTBBasicInformation = null; /// /// 外业草图 /// private IElementInfo _UCWYSketch = null; /// /// 外业草图_单图斑 /// private IElementInfo _UC_DTB_WYSketch = null; /// /// 外业照片 /// private IElementInfo _UCImgView = null; /// /// 国家反馈意见 /// private IElementInfo _UCGJSHYJ = null; /// /// 内业预处理结果 /// private IElementInfo _UCNYProcessingResults = null; /// /// 单图斑数结构页面 /// /// private IElementInfo _UCJCTBTree = null; private IElementInfo _UCWYSP = null; private IElementInfo _UCWYFJ = null; /// /// 审查结果 /// private IElementInfo _UCSHInfo = null; /// /// 省级反馈意见 /// private IElementInfo _SJFKYJ = null; /// /// 省级审核意见信息 /// private IElementInfo _SJSHYJXX = null; /// /// 外业举证信息 /// private IElementInfo _DTBSLNYYSResult = null; /// /// 审核标注 /// private IElementInfo _UCSHBZSketch = null; private UCJCTBTree LeftTree = null; public void Start(IBundleContext context) { try { Platform.Instance.NotifyMsgEven2 += msg => { switch (msg.MsgType) { case "LoadDTBViewData": if (msg.Content != null) { ShowTaskTree((SystemTypeEnum)msg.Content); } break; } }; _UCTBBasicInformation = new UCTBBasicInformation(); context.AddService(_UCTBBasicInformation); _UCWYSketch = new UCWYSketch(); context.AddService(_UCWYSketch); _UCImgView = new UCImgView(); context.AddService(_UCImgView); _UCGJSHYJ = new UCGJSHYJ(); context.AddService(_UCGJSHYJ); _UCNYProcessingResults = new UCNYProcessingResults(); context.AddService(_UCNYProcessingResults); _UC_DTB_WYSketch = new UC_DTB_WYSketch(); context.AddService(_UC_DTB_WYSketch); _UCJCTBTree = new UCJCTBTree(); context.AddService(_UCJCTBTree); _UCWYSP = new UCWyspInfo(); context.AddService(_UCWYSP); _UCWYFJ = new UCWyfjInfo(); context.AddService(_UCWYFJ); _SJFKYJ = new UCSJFKYJ(); context.AddService(_SJFKYJ); _SJSHYJXX = new UCSJSHYJXX(); context.AddService(_SJSHYJXX); _UCSHInfo = new UCSHInfo(); context.AddService(_UCSHInfo); _DTBSLNYYSResult = new UCDTBSLNYYSResult(); context.AddService(_DTBSLNYYSResult); _UCSHBZSketch = new UCSHBZSketch(); context.AddService(_UCSHBZSketch); } catch (System.Exception ex) { LogAPI.Debug("Kingo.Plugin.General Start 异常:" + ex.Message); LogAPI.Debug("Kingo.Plugin.General Start 异常:" + ex.StackTrace); } } public void Stop(IBundleContext context) { } private void ShowTaskTree(SystemTypeEnum systemType) { if (LeftTree == null) LeftTree = new UCJCTBTree(); LeftTree.CloseViewHandler += (s, e) => { LeftTree = null; }; LeftTree.BindData(systemType); } } }