DonkingControlBase/LookupEditor/LookupContext.cs

(开头部分) 5KB

这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。

/*
 * Author donking
 * http://www.donking-ch.com/ 
 */
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Data;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace DonkingControlBase
{
    /// <summary>
    /// 关闭弹出PopupControlHost的委托
    /// </summary>
    /// <param name="sender"></param>
    public delegate void PopCloseHandler(object sender);

    /// <summary>
    /// 弹出PopupControlHost
    /// </summary>
    public partial class LookupContext : UserControl 
    {       
        public event PopCloseHandler CloseHandler;
        public event PopCloseHandler ClearHandler;
        private object _ContextValue;

        /// <summary>
        /// 添加对PopupControlHost的引用
        /// </summary>
        public PopupControlHost PopupControlHost;

        /// <summary>
        /// 对数据字段的绑定
        /// </summary>
        public Dictionary<string, string> Mapping{set;get;}
        public object ContextValue { get; set; }        

        /// <summary>
        /// 数据源
        /// </summary>
        public Object DataSource
        {
            get { return this.bindingSource.DataSource; }
            set { this.bindingSource.DataSource = value; }
        }

        public LookupContext()
        {
            InitializeComponent();
            Mapping = new Dictionary<string, string>();
        }

        private void LookupContext_Load(object sender, EventArgs e)
        {
            //鼠标双事件
            this.dataGridView.MouseDoubleClick += new MouseEventHandler(dataGridView_MouseDoubleClick);
后面还有 118 行代码,解锁后查看完整代码

24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明

AI 解读 AI

登录后可用,每次 10 算力,解读结果公开显示在下面。

还没有人解读过这个文件。