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.
		
		
		
		
		
			
		
			
				
					
					
						
							53 lines
						
					
					
						
							1.7 KiB
						
					
					
				
			
		
		
	
	
							53 lines
						
					
					
						
							1.7 KiB
						
					
					
				using System; | 
						|
using System.Windows; | 
						|
using ESRI.ArcGIS.Controls; | 
						|
using KGIS.Framework.Commands; | 
						|
using KGIS.Framework.Utils; | 
						|
using KGIS.Framework.Utils.Helper; | 
						|
using Kingo.Plugin.EngineEditor.View; | 
						|
 | 
						|
namespace Kingo.Plugin.EngineEditor.Commands.Tools | 
						|
{ | 
						|
    public class SetAttributeCommandClass : BaseMenuCommand | 
						|
    { | 
						|
        public static IHookHelper m_hookHelper; | 
						|
        IEngineEditor m_pEditor; | 
						|
        public override void OnClick() | 
						|
        { | 
						|
            try | 
						|
            { | 
						|
                if (m_hookHelper != null) | 
						|
                { | 
						|
                    UCSetAttribute uCSetAttribute = new UCSetAttribute(m_hookHelper); | 
						|
                    uCSetAttribute.WindowStartupLocation = WindowStartupLocation.CenterOwner; | 
						|
                    uCSetAttribute.ShowInMainWindow(); | 
						|
                } | 
						|
                else | 
						|
                { | 
						|
                    MessageHelper.Show("hookHelper获取失败"); | 
						|
                } | 
						|
            } | 
						|
            catch (Exception ex) | 
						|
            { | 
						|
                LogAPI.Debug("SetAttributeCommandClass异常:" + ex.Message); | 
						|
                LogAPI.Debug("SetAttributeCommandClass异常:" + ex.StackTrace); | 
						|
            } | 
						|
        } | 
						|
 | 
						|
        public override void OnCreate(object Hook) | 
						|
        { | 
						|
            try | 
						|
            { | 
						|
                if (m_hookHelper == null) | 
						|
                    m_hookHelper = new HookHelper(); | 
						|
                m_hookHelper.Hook = Hook; | 
						|
                m_pEditor = new EngineEditorClass(); | 
						|
            } | 
						|
            catch (Exception ex) | 
						|
            { | 
						|
                LogAPI.Debug("SetAttributeCommandClass异常:" + ex.Message); | 
						|
                LogAPI.Debug("SetAttributeCommandClass异常:" + ex.StackTrace); | 
						|
            } | 
						|
        } | 
						|
    } | 
						|
}
 | 
						|
 |