public override void OnCreate(Plugin.Application.IApplicationRef hook) { m_Hook = hook as Plugin.Application.IAppFileRef; if (m_Hook == null) { return; } }
public override void OnCreate(Plugin.Application.IApplicationRef hook) { if (hook == null) { return; } myHook = hook as Plugin.Application.IAppFileRef; //添加项目 }
public override void OnCreate(Plugin.Application.IApplicationRef hook) { if (hook == null) { return; } myHook = hook as Plugin.Application.IAppFileRef; if (myHook.MapControl == null) { return; } }
public override void OnCreate(Plugin.Application.IApplicationRef hook) { if (hook == null) { return; } _AppHk = hook as Plugin.Application.IAppFileRef; Plugin.Application.IAppFormRef pAppForm = hook as Plugin.Application.IAppFormRef; _tool = new PointBufferQueryToolClass(pAppForm.MainForm, _AppHk); _cmd = _tool as ICommand; _cmd.OnCreate(_AppHk.MapControl); }
public override void OnCreate(Plugin.Application.IApplicationRef hook) { if (hook == null) { return; } myHook = hook as Plugin.Application.IAppFileRef; //获得选中的树节点的类型 //若节点类型为EnumTreeNodeType.DATAFORMAT,则加载比例尺信息 //_ComboBoxScale.Items.Clear(); //_ComboBoxScale.Items.AddRange(new object[] { "不选择", "500", "1000", "2000", "5000", "10000", "20000" }); //_ComboBoxScale.SelectedIndex = 0; }
//类的方法 public PointBufferQueryToolClass(Form mainFrm, Plugin.Application.IAppFileRef hook) { m_mainFrm = mainFrm; m_hook = hook; base.m_category = "GeoCommon"; base.m_caption = "PointBufferQuery"; base.m_message = "点缓冲查询"; base.m_toolTip = "点缓冲查询"; base.m_name = base.m_category + "_" + base.m_caption; try { base.m_cursor = new System.Windows.Forms.Cursor(GetType(), "Resources.MapIdentify.cur"); } catch { } }
//在退出系统前如正在处理数据应提示 private void MainForm_FormClosing(object sender, FormClosingEventArgs e) { Plugin.Application.IAppFileRef pApp = ModData.v_AppFileDB as Plugin.Application.IAppFileRef; if (pApp == null) { return; } if (pApp.CurrentThread != null) { pApp.CurrentThread.Suspend(); if (SysCommon.Error.ErrorHandle.ShowFrmInformation("确定", "取消", "当前任务正在进行,是否终止退出?") == true) { pApp.CurrentThread.Abort(); } else { pApp.CurrentThread.Resume(); e.Cancel = true; } } }
public FrmBlurQuery(Plugin.Application.IAppFileRef hook, DevComponents.AdvTree.Node pDBNode) { InitializeComponent(); m_Hook = hook; //获得根节点,数据库节点 DevComponents.AdvTree.Node mDBNode = pDBNode; XmlElement dbElem = mDBNode.Tag as XmlElement; if (dbElem == null) { return; } string ipStr = dbElem.GetAttribute("MetaDBConn"); // ConnStr = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" + ipStr + ";Persist Security Info=True";//元数据连接字符串 ConnStr = ipStr; //初始化界面 IntialCom(); }