optionscontrolbase.cs

来自「破解的飞信源代码」· CS 代码 · 共 68 行

CS
68
字号
namespace Imps.Client.Pc
{
    using Imps.Client.Core;
    using System;
    using System.Collections;
    using System.Runtime.CompilerServices;
    using System.Windows.Forms;

    public class OptionsControlBase : UserControl, IOptionsControl
    {
        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 static void InnerSetListControlDataSource(ListControl ctrl, IList list)
        {
            ctrl.DataSource = list;
            ctrl.DisplayMember = "Name";
            ctrl.ValueMember = "Value";
        }

        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 + -
显示快捷键?