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.
		
		
		
		
		
			
		
			
				
					
					
						
							55 lines
						
					
					
						
							1.7 KiB
						
					
					
				
			
		
		
	
	
							55 lines
						
					
					
						
							1.7 KiB
						
					
					
				using ESRI.ArcGIS.Controls; | 
						|
using KGIS.Framework.Commands; | 
						|
using KGIS.Framework.Utils.Helper; | 
						|
using Kingo.Plugin.DataLoad.View; | 
						|
using System; | 
						|
 | 
						|
namespace Kingo.Plugin.DataLoad.Commands | 
						|
{ | 
						|
    public class CmdDataConversion : BaseMenuCommand | 
						|
    { | 
						|
        private EngineEditorClass pEditor = null; | 
						|
        public IHookHelper m_hookHelper; | 
						|
        public override void OnClick() | 
						|
        { | 
						|
            try | 
						|
            { | 
						|
                if (pEditor == null) | 
						|
                    pEditor = new EngineEditorClass(); | 
						|
                if (pEditor.EditState != esriEngineEditState.esriEngineStateNotEditing) | 
						|
                { | 
						|
                    MessageHelper.ShowTips("请先关闭编辑!"); | 
						|
                    return; | 
						|
                } | 
						|
 | 
						|
                FrmDataConversion main = new FrmDataConversion | 
						|
                { | 
						|
                    WindowStartupLocation = System.Windows.WindowStartupLocation.CenterScreen | 
						|
                }; | 
						|
                main.ShowInMainWindow(true); | 
						|
            } | 
						|
            catch (Exception ex) | 
						|
            { | 
						|
                MessageHelper.ShowError("初始化数据转换页面异常:" + ex.Message); | 
						|
                PluginServiceInterface.CommonHelper.RecordsErrLog("初始化数据转换页面异常:", ex); | 
						|
            } | 
						|
        } | 
						|
 | 
						|
        public override void OnCreate(object Hook) | 
						|
        { | 
						|
            if (Hook == null) return; | 
						|
            try | 
						|
            { | 
						|
                if (m_hookHelper == null) | 
						|
                    m_hookHelper = new HookHelperClass { Hook = Hook }; | 
						|
                if (pEditor == null) | 
						|
                    pEditor = new EngineEditorClass(); | 
						|
            } | 
						|
            catch | 
						|
            { | 
						|
                m_hookHelper = null; | 
						|
                return; | 
						|
            } | 
						|
        } | 
						|
    } | 
						|
}
 | 
						|
 |