www.pudn.com > Fetion.rar > AgreementForm.cs


namespace Imps.Client.Pc 
{ 
    using Imps.Client.Core; 
    using Imps.Client.Pc.BizControls; 
    using Imps.Client.Pc.Controls; 
    using Imps.Client.Utils; 
    using System; 
    using System.ComponentModel; 
    using System.Drawing; 
    using System.Windows.Forms; 
 
    public class AgreementForm : XIMDialog 
    { 
        private IFrameworkWindow _framework; 
        private IContainer components; 
        private GroupBox gbAgreement; 
        private Panel pnlBase; 
        private XButton xbtnOK; 
        private XLabel xlblDescription; 
        private XTextBox xTextBox1; 
 
        public AgreementForm(IFrameworkWindow wnd, string description) 
        { 
            this.InitializeComponent(); 
            this.xlblDescription.Text = description; 
            this._framework = wnd; 
            this.initComponentRegion(); 
            AsyncBizOperation op = new AsyncBizOperation(); 
            op.Successed += new EventHandler(this.op_Successed); 
            this._framework.AccountManager.CurrentUser.PersonalGroupManager.AsyncGetGroupResponsibility(op); 
        } 
 
        protected override void Dispose(bool disposing) 
        { 
            if (disposing && (this.components != null)) 
            { 
                this.components.Dispose(); 
            } 
            base.Dispose(disposing); 
        } 
 
        private void InitializeComponent() 
        { 
            ComponentResourceManager manager = new ComponentResourceManager(typeof(AgreementForm)); 
            this.pnlBase = new Panel(); 
            this.xlblDescription = new XLabel(); 
            this.gbAgreement = new GroupBox(); 
            this.xTextBox1 = new XTextBox(); 
            this.xbtnOK = new XButton(); 
            this.pnlBase.SuspendLayout(); 
            this.gbAgreement.SuspendLayout(); 
            base.SuspendLayout(); 
            this.pnlBase.BackColor = Color.Transparent; 
            this.pnlBase.Controls.Add(this.xlblDescription); 
            this.pnlBase.Controls.Add(this.gbAgreement); 
            this.pnlBase.Location = new System.Drawing.Point(6, 0x1a); 
            this.pnlBase.Name = "pnlBase"; 
            this.pnlBase.Size = new Size(340, 0x11d); 
            this.pnlBase.TabIndex = 2; 
            this.xlblDescription.AutoEllipsis = true; 
            this.xlblDescription.BackColor = Color.Transparent; 
            this.xlblDescription.BorderColor = Color.Empty; 
            this.xlblDescription.ButtonBorderStyle = ButtonBorderStyle.None; 
            this.xlblDescription.Location = new System.Drawing.Point(0x19, 8); 
            this.xlblDescription.Name = "xlblDescription"; 
            this.xlblDescription.Size = new Size(0x129, 80); 
            this.xlblDescription.TabIndex = 4; 
            this.xlblDescription.Text = "您已经成为"; 
            this.xlblDescription.TextAlign = ContentAlignment.MiddleLeft; 
            this.gbAgreement.BackColor = Color.Transparent; 
            this.gbAgreement.Controls.Add(this.xTextBox1); 
            this.gbAgreement.Location = new System.Drawing.Point(0x1c, 0x5b); 
            this.gbAgreement.Name = "gbAgreement"; 
            this.gbAgreement.Size = new Size(0x126, 0xb2); 
            this.gbAgreement.TabIndex = 5; 
            this.gbAgreement.TabStop = false; 
            this.gbAgreement.Text = "免责声明"; 
            this.xTextBox1.BackColor = Color.FromArgb(240, 240, 240); 
            this.xTextBox1.BorderStyle = BorderStyle.FixedSingle; 
            this.xTextBox1.Dock = DockStyle.Fill; 
            this.xTextBox1.EmptyTextTip = ""; 
            this.xTextBox1.EmptyTextTipColor = Color.DarkGray; 
            this.xTextBox1.Location = new System.Drawing.Point(3, 0x10); 
            this.xTextBox1.Multiline = true; 
            this.xTextBox1.Name = "xTextBox1"; 
            this.xTextBox1.ReadOnly = true; 
            this.xTextBox1.ScrollBars = ScrollBars.Vertical; 
            this.xTextBox1.Size = new Size(0x120, 0x9f); 
            this.xTextBox1.TabStop = false; 
            this.xTextBox1.TabIndex = 0; 
            this.xbtnOK.AutoArrangementX = true; 
            this.xbtnOK.AutoSizeToImage = false; 
            this.xbtnOK.BackColor = Color.Transparent; 
            this.xbtnOK.BackgroundImageDisable = null; 
            this.xbtnOK.BackgroundImageDown = null; 
            this.xbtnOK.BackgroundImageHover = null; 
            this.xbtnOK.ChangeSkin = true; 
            this.xbtnOK.Location = new System.Drawing.Point(0x89, 0x13c); 
            this.xbtnOK.Name = "xbtnOK"; 
            this.xbtnOK.Size = new Size(0x4b, 0x19); 
            this.xbtnOK.TabIndex = 6; 
            this.xbtnOK.Text = "确定"; 
            this.xbtnOK.UseVisualStyleBackColor = false; 
            this.xbtnOK.Click += new EventHandler(this.xbtnOK_Click); 
            base.AutoScaleDimensions = new SizeF(6f, 13f); 
            base.AutoScaleMode = AutoScaleMode.Font; 
            base.BaseHeight = 0x17b; 
            base.BaseWidth = 0x16d; 
            base.ClientSize = new Size(0x167, 0x161); 
            base.Controls.Add(this.pnlBase); 
            base.Controls.Add(this.xbtnOK); 
            base.DisplayLocation = new System.Drawing.Point(0x12, 0x26); 
            base.Icon = (Icon) manager.GetObject("$this.Icon"); 
            base.Name = "AgreementForm"; 
            base.Padding = new Padding(6, 0x22, 0x13, 9); 
            base.Text = "免责声明"; 
            this.pnlBase.ResumeLayout(false); 
            this.gbAgreement.ResumeLayout(false); 
            this.gbAgreement.PerformLayout(); 
            base.ResumeLayout(false); 
        } 
 
        private void op_Successed(object sender, EventArgs e) 
        { 
            try 
            { 
                this.xTextBox1.Text = (sender as AsyncBizOperation).ContextForBiz.ToString(); 
            } 
            catch (Exception exception) 
            { 
                ClientLogger.WriteException(exception); 
            } 
        } 
 
        private void xbtnOK_Click(object sender, EventArgs e) 
        { 
            base.Close(); 
        } 
    } 
}