📄 ucdictbase.cs
字号:
using System;
using System.Collections.Generic;
using System.Collections;
using System.ComponentModel;
using System.Drawing;
using System.Data;
using System.Text;
using System.Windows.Forms;
using Qeb.Support.Common;
namespace Qeb.GY
{
public partial class UCDictBase : UserControl
{
/// <summary>
/// 消息处理者代理
/// </summary>
protected UIMessageEventHandler m_MsgEventHandler ;
private Hashtable m_MsgId = new Hashtable();
protected bool m_IsModified = false;
public UCDictBase()
{
InitializeComponent();
//实例化消息处理代理
m_MsgEventHandler += new UIMessageEventHandler(ProcessUIMessage);
}
/************************************************************************/
/*注意:*/
/* 在Designer.cs的Dispose中要加上取消消息注册 */
/************************************************************************/
#region 消息处理
//消息订阅
protected int SubscribeEvent(string msgId)
{
if (msgId == null || msgId.Trim() == "")
return -1;
m_MsgId.Add(msgId, null);
return UIMessageManager.SubscribeEvent(msgId, this, this.m_MsgEventHandler);
}
//取消消息订阅
private void UnSubscribeEvent()
{
foreach (string key in m_MsgId.Keys)
{
UIMessageManager.UnSubscribeEvent(key, this.m_MsgEventHandler);
}
m_MsgId.Clear();
}
//取消消息订阅
protected void UnSubscribeEvent(string msgId)
{
if (m_MsgId.Contains(msgId))
{
UIMessageManager.UnSubscribeEvent(msgId, this.m_MsgEventHandler);
m_MsgId.Remove(msgId);
}
}
/// <summary>
/// 消息处理
/// </summary>
/// <param name="messageId"></param>
/// <param name="e"></param>
protected virtual void ProcessUIMessage(string messageId, UIMessageEventArgs e)
{
}
#endregion
[Browsable(false)]
public bool IsModified
{
get { return m_IsModified; }
}
private string m_LookUpPromptText = "不支持快速定位";
public string LookUpPromptText
{
get { return this.m_LookUpPromptText; }
set { this.m_LookUpPromptText = value; }
}
public virtual void FindInDw(string value)
{
}
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -