Ejemplo n.º 1
0
        private void CreateRetryCancleButton()
        {//重试 取消
            ZButton retryBtn  = new ZButton();
            ZButton cancelBtn = new ZButton();

            this.SuspendLayout();
            //
            // retryBtn
            //
            retryBtn.Font     = new Font("微软雅黑", 9F);
            retryBtn.Location = new Point(179, 125);
            retryBtn.Name     = "retryBtn";
            retryBtn.Size     = new Size(68, 23);
            retryBtn.TabIndex = 0;
            retryBtn.Text     = "重试";
            retryBtn.UseVisualStyleBackColor = true;
            retryBtn.Click += new EventHandler(RetryBtn_Click);
            //
            //CancelBtn
            //
            cancelBtn.Font     = new Font("微软雅黑", 9F);
            cancelBtn.Location = new Point(260, 125);
            cancelBtn.Name     = "cancleBtn";
            cancelBtn.Size     = new Size(68, 23);
            cancelBtn.TabIndex = 1;
            cancelBtn.Text     = "取消";
            cancelBtn.UseVisualStyleBackColor = true;
            cancelBtn.Click += new EventHandler(CancelBtn_Click);
            this.Controls.Add(retryBtn);
            this.Controls.Add(cancelBtn);
            this.AcceptButton = retryBtn;
            this.ResumeLayout();
        }
Ejemplo n.º 2
0
        private void CreateOKCancelButton()
        { //确定 取消
            ZButton okBtn     = new ZButton();
            ZButton cancelBtn = new ZButton();

            this.SuspendLayout();
            //
            // OKBtn
            //
            okBtn.Font     = new Font("微软雅黑", 9F);
            okBtn.Location = new Point(179, 125);
            okBtn.Name     = "OKBtn";
            okBtn.Size     = new Size(68, 23);
            okBtn.TabIndex = 0;
            okBtn.Text     = "确定";
            okBtn.UseVisualStyleBackColor = true;
            okBtn.Click += new EventHandler(OKBtn_Click);
            //
            //CancelBtn
            //
            cancelBtn.Font     = new Font("微软雅黑", 9F);
            cancelBtn.Location = new Point(260, 125);
            cancelBtn.Name     = "cancleBtn";
            cancelBtn.Size     = new Size(68, 23);
            cancelBtn.TabIndex = 1;
            cancelBtn.Text     = "取消";
            cancelBtn.UseVisualStyleBackColor = true;
            cancelBtn.Click += new EventHandler(CancelBtn_Click);
            this.Controls.Add(okBtn);
            this.Controls.Add(cancelBtn);
            this.AcceptButton = okBtn;
            this.ResumeLayout();
        }