profilecontrolbase.cs

来自「飞信的收发使用csharp进行开发」· CS 代码 · 共 78 行

CS
78
字号
namespace Imps.Client.Pc.UIContactList
{
    using Imps.Client.Core;
    using Imps.Client.Pc;
    using System;
    using System.Drawing;
    using System.Runtime.CompilerServices;
    using System.Windows.Forms;

    public class ProfileControlBase : UserControl, IProfileControl
    {
        private bool _modified;

        public event EventHandler ModifiedChanged;

        public virtual bool CheckUserInput()
        {
            return true;
        }

        public virtual bool ControlLoad()
        {
            return true;
        }

        public virtual bool ControlUnload()
        {
            return true;
        }

        protected virtual void HandleUiChanged()
        {
        }

        private void InitializeComponent()
        {
            base.SuspendLayout();
            base.Name = "ProfileControlBase";
            base.Size = new Size(0x10a, 0x13c);
            base.ResumeLayout(false);
        }

        protected virtual void UIData_Changed(object sender, EventArgs e)
        {
        }

        public virtual bool UpdateData(bool update)
        {
            return true;
        }

        public System.Windows.Forms.Control Control
        {
            get
            {
                return this;
            }
        }

        public bool Modified
        {
            get
            {
                return this._modified;
            }
            protected set
            {
                if (this._modified != value)
                {
                    this._modified = value;
                    FuncDispatcher.OnEventHandler(this, this.ModifiedChanged, EventArgs.Empty);
                }
            }
        }
    }
}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?