Click here to Skip to main content
15,896,153 members
Home / Discussions / C#
   

C#

 
GeneralRe: update Dictionary with new KeyValuePair set Pin
igalep13227-Mar-10 5:45
igalep13227-Mar-10 5:45 
AnswerRe: update Dictionary with new KeyValuePair set Pin
Daniel Grunwald27-Mar-10 7:18
Daniel Grunwald27-Mar-10 7:18 
GeneralRe: update Dictionary with new KeyValuePair set Pin
PIEBALDconsult27-Mar-10 17:23
mvePIEBALDconsult27-Mar-10 17:23 
QuestionHow can i know from which interface the method is calling? Pin
Satish - Developer27-Mar-10 2:46
Satish - Developer27-Mar-10 2:46 
AnswerRe: How can i know from which interface the method is calling? Pin
Nuri Ismail27-Mar-10 3:03
Nuri Ismail27-Mar-10 3:03 
AnswerRe: How can i know from which interface the method is calling? Pin
AspDotNetDev27-Mar-10 3:13
protectorAspDotNetDev27-Mar-10 3:13 
QuestionHow to write the design editor? Pin
yu-jian27-Mar-10 1:34
yu-jian27-Mar-10 1:34 
AnswerRe: How to write the design editor? Pin
yu-jian28-Mar-10 3:34
yu-jian28-Mar-10 3:34 
<br />
    public class Notebook : UserControl<br />
    {<br />
        #region Notebook<br />
        public Notebook() : base()<br />
        {<br />
            InitializeComponent();<br />
<br />
            this.SuspendLayout();<br />
            Page newPage = new Page();<br />
            newPage.Name = "newPage";<br />
            this.Controls.Add(newPage);<br />
            newPage.Dock = DockStyle.Fill;<br />
            newPage.Visible = true;<br />
            this.ResumeLayout(false);<br />
<br />
            this.Dock = DockStyle.Fill;<br />
            this.BackColor = Color.Yellow;<br />
        }<br />
<br />
        private System.ComponentModel.IContainer components = null;<br />
<br />
        protected override void Dispose(bool disposing)<br />
        {<br />
            if (disposing && (components != null))<br />
            {<br />
                components.Dispose();<br />
            }<br />
            base.Dispose(disposing);<br />
        }<br />
<br />
        #region 组件设计器生成的代码<br />
<br />
        /// <summary> <br />
        /// 设计器支持所需的方法 - 不要<br />
        /// 使用代码编辑器修改此方法的内容。<br />
        /// </summary><br />
        private void InitializeComponent()<br />
        {<br />
            this.SuspendLayout();<br />
            // <br />
            // Notebook<br />
            // <br />
            this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);<br />
            this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;<br />
            this.Name = "Notebook";<br />
            this.Size = new System.Drawing.Size(549, 217);<br />
            this.ResumeLayout(false);<br />
<br />
        }<br />
        #endregion<br />
        #endregion<br />
<br />
        private int _pageIndex;<br />
        [Category("Appearance")]<br />
        [Description("当前页面索引号")]<br />
        [DefaultValue(0)]<br />
        public int PageIndex<br />
        {<br />
            get { return this._pageIndex; }<br />
            set { this._pageIndex = value; }<br />
        }<br />
<br />
        private String _pages;<br />
        [Category("Appearance")]<br />
        [Description("所有页面")]<br />
        [Editor("PageEditor", typeof(PageEditor))]<br />
        public String Pages<br />
        {<br />
            get { return this._pages; }<br />
            set { this._pages = value; }<br />
        }<br />
<br />
    }<br />
<br />
<br />
    public class PageEditor : System.Drawing.Design.UITypeEditor<br />
    {<br />
        public PageEditor()<br />
            : base()<br />
        {<br />
            <br />
        }<br />
<br />
        public override object EditValue(ITypeDescriptorContext context, IServiceProvider provider, object value)<br />
        {<br />
            return base.EditValue(context, provider, value);<br />
        }<br />
    }<br />
<br />
<br />
    public class Page : System.Windows.Forms.Panel<br />
    {<br />
        public Page() :base()<br />
        {<br />
            InitializeComponent();<br />
<br />
<br />
            this.BorderStyle = BorderStyle.Fixed3D;<br />
            Label label1 = new Label();<br />
            label1.Text = "fadfadfaef";<br />
            this.Controls.Add(label1);<br />
        }<br />
<br />
        /// <summary> <br />
        /// 必需的设计器变量。<br />
        /// </summary><br />
        private System.ComponentModel.IContainer components = null;<br />
<br />
        /// <summary> <br />
        /// 清理所有正在使用的资源。<br />
        /// </summary><br />
        /// <param name="disposing">如果应释放托管资源,为 true;否则为 false。</param><br />
        protected override void Dispose(bool disposing)<br />
        {<br />
            if (disposing && (components != null))<br />
            {<br />
                components.Dispose();<br />
            }<br />
            base.Dispose(disposing);<br />
        }<br />
<br />
        #region 组件设计器生成的代码<br />
<br />
        /// <summary> <br />
        /// 设计器支持所需的方法 - 不要<br />
        /// 使用代码编辑器修改此方法的内容。<br />
        /// </summary><br />
        private void InitializeComponent()<br />
        {<br />
            this.SuspendLayout();<br />
            // <br />
            // Page<br />
            // <br />
            this.Name = "Page";<br />
            this.Size = new System.Drawing.Size(553, 277);<br />
            this.ResumeLayout(false);<br />
<br />
        }<br />
        #endregion<br />
    }<br />
<br />
<br />
I want to write the Editor of Notebook's property, Pages.   How can I make it? :( <br />

GeneralRe: How to write the design editor? Pin
OriginalGriff28-Mar-10 4:10
mveOriginalGriff28-Mar-10 4:10 
QuestionA question on SqlCommand.CommandText Pin
Dewald26-Mar-10 23:01
Dewald26-Mar-10 23:01 
AnswerRe: A question on SqlCommand.CommandText [modified] Pin
Dan Mos27-Mar-10 0:24
Dan Mos27-Mar-10 0:24 
AnswerRe: A question on SqlCommand.CommandText Pin
#realJSOP27-Mar-10 1:29
professional#realJSOP27-Mar-10 1:29 
AnswerRe: A question on SqlCommand.CommandText Pin
PIEBALDconsult27-Mar-10 4:28
mvePIEBALDconsult27-Mar-10 4:28 
QuestionCompress a Folder using GZipStream Pin
anishkannan26-Mar-10 21:57
anishkannan26-Mar-10 21:57 
AnswerRe: Compress a Folder using GZipStream Pin
Richard MacCutchan26-Mar-10 23:05
mveRichard MacCutchan26-Mar-10 23:05 
GeneralRe: Compress a Folder using GZipStream Pin
AspDotNetDev26-Mar-10 23:23
protectorAspDotNetDev26-Mar-10 23:23 
GeneralRe: Compress a Folder using GZipStream Pin
Richard MacCutchan26-Mar-10 23:44
mveRichard MacCutchan26-Mar-10 23:44 
GeneralRe: Compress a Folder using GZipStream Pin
AspDotNetDev26-Mar-10 23:53
protectorAspDotNetDev26-Mar-10 23:53 
GeneralRe: Compress a Folder using GZipStream Pin
Richard MacCutchan27-Mar-10 3:19
mveRichard MacCutchan27-Mar-10 3:19 
GeneralRe: Compress a Folder using GZipStream Pin
AspDotNetDev27-Mar-10 3:27
protectorAspDotNetDev27-Mar-10 3:27 
GeneralRe: Compress a Folder using GZipStream Pin
Richard MacCutchan27-Mar-10 3:46
mveRichard MacCutchan27-Mar-10 3:46 
QuestionCompress a Folder Pin
anishkannan26-Mar-10 21:56
anishkannan26-Mar-10 21:56 
AnswerRe: Compress a Folder Pin
R. Giskard Reventlov26-Mar-10 22:00
R. Giskard Reventlov26-Mar-10 22:00 
AnswerRe: Compress a Folder Pin
Nuri Ismail26-Mar-10 22:19
Nuri Ismail26-Mar-10 22:19 
AnswerRe: Compress a Folder Pin
harold aptroot26-Mar-10 22:21
harold aptroot26-Mar-10 22:21 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.