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.
		
		
		
		
		
			
		
			
				
					
					
						
							47 lines
						
					
					
						
							1.5 KiB
						
					
					
				
			
		
		
	
	
							47 lines
						
					
					
						
							1.5 KiB
						
					
					
				using ESRI.ArcGIS.Controls; | 
						|
using KGIS.Framework.Commands; | 
						|
using KGIS.Framework.Maps; | 
						|
using KGIS.Framework.Utils; | 
						|
using KGIS.Framework.Utils.Helper; | 
						|
using Kingo.Plugin.DataLoad.View; | 
						|
using Kingo.PluginServiceInterface; | 
						|
using System; | 
						|
 | 
						|
namespace Kingo.Plugin.DataLoad.Commands | 
						|
{ | 
						|
    public class CmdLoadDB : BaseMenuCommand | 
						|
    { | 
						|
        IEngineEditor m_pEditor; | 
						|
        public override void OnCreate(object hook) | 
						|
        { | 
						|
            //throw new NotImplementedException(); | 
						|
            m_pEditor = new EngineEditorClass(); | 
						|
        } | 
						|
 | 
						|
        public override void OnClick() | 
						|
        { | 
						|
            try | 
						|
            { | 
						|
                FrmLoadDB main = new FrmLoadDB(); | 
						|
                main.Width = 400; | 
						|
                main.Height = 160; | 
						|
                main.WindowStartupLocation = System.Windows.WindowStartupLocation.CenterScreen; | 
						|
                main.ShowInMainWindow(false); | 
						|
            } | 
						|
            catch (Exception ex) | 
						|
            { | 
						|
                LogAPI.Debug(ex); | 
						|
                MessageHelper.ShowError("举证成果加载出现错误,可能的原因是:" + ex.Message); | 
						|
            } | 
						|
        } | 
						|
        public override bool Enabled | 
						|
        { | 
						|
            get | 
						|
            { | 
						|
                ProjectInfo prj = MapsManager.Instance.CurrProjectInfo as ProjectInfo; | 
						|
                if (prj == null) return false; | 
						|
                return !string.IsNullOrWhiteSpace(prj.BGDatabase) && m_pEditor.EditState == esriEngineEditState.esriEngineStateNotEditing; | 
						|
            } | 
						|
        } | 
						|
    } | 
						|
}
 | 
						|
 |