private void OnComponentChanged(object sender, ComponentChangedEventArgs ce) { CancelButton aBtn = ce.Component as CancelButton; if (aBtn == null || !aBtn.DesignMode) { return; } if (((IComponent)ce.Component).Site == null || ce.Member == null || ce.Member.Name != "Text") { return; } if (aBtn.Text == aBtn.Name) { aBtn.Text = aBtn.Name.Replace("cancelButton", "انصراف"); } this.TextAlign = ContentAlignment.MiddleCenter; this.Font = FontManager.GetDefaultTextFont(); }
private void InitializeComponent() { this.buttonBackup = new Atiran.UI.WindowsForms.Controls.Buttons.Button(); this.label1 = new Atiran.UI.WindowsForms.Controls.Label(); this.labelTargetFile = new Atiran.UI.WindowsForms.Controls.Label(); this.buttonChangeFolder = new Atiran.UI.WindowsForms.Controls.Buttons.Button(); this.progressBar1 = new Atiran.UI.WindowsForms.Controls.ProgressBar(); this.labelStatus = new Atiran.UI.WindowsForms.Controls.Label(); this.folderBrowserDialog1 = new System.Windows.Forms.FolderBrowserDialog(); this.labelDate = new Atiran.UI.WindowsForms.Controls.Label(); this.cancelButton1 = new Atiran.UI.WindowsForms.Controls.Buttons.CancelButton(); this.panel1 = new Atiran.UI.WindowsForms.UIElements.Panel(); this.panel1.SuspendLayout(); this.SuspendLayout(); // // buttonBackup // this.buttonBackup.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); this.buttonBackup.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(140)))), ((int)(((byte)(231))))); this.buttonBackup.FlatStyle = System.Windows.Forms.FlatStyle.Flat; this.buttonBackup.Font = new System.Drawing.Font("IRANSans(FaNum)", 9.5F); this.buttonBackup.ForeColor = System.Drawing.Color.White; this.buttonBackup.Location = new System.Drawing.Point(5, 3); this.buttonBackup.Name = "buttonBackup"; this.buttonBackup.NextControl = null; this.buttonBackup.Size = new System.Drawing.Size(83, 36); this.buttonBackup.TabIndex = 0; this.buttonBackup.Text = "ذخيره "; this.buttonBackup.UseVisualStyleBackColor = false; this.buttonBackup.Click += new System.EventHandler(this.buttonBackup_Click); // // label1 // this.label1.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); this.label1.AutoSize = true; this.label1.Font = new System.Drawing.Font("IRANSans(FaNum)", 9.5F); this.label1.Location = new System.Drawing.Point(552, 65); this.label1.Name = "label1"; this.label1.RightToLeft = System.Windows.Forms.RightToLeft.Yes; this.label1.Size = new System.Drawing.Size(118, 22); this.label1.TabIndex = 2; this.label1.Text = "مسير پشتيبان گيري:"; this.label1.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; // // labelTargetFile // this.labelTargetFile.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); this.labelTargetFile.BackColor = System.Drawing.Color.White; this.labelTargetFile.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; this.labelTargetFile.Font = new System.Drawing.Font("Segoe UI", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(178))); this.labelTargetFile.Location = new System.Drawing.Point(75, 61); this.labelTargetFile.Name = "labelTargetFile"; this.labelTargetFile.Size = new System.Drawing.Size(475, 30); this.labelTargetFile.TabIndex = 3; this.labelTargetFile.Text = "D:"; this.labelTargetFile.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; // // buttonChangeFolder // this.buttonChangeFolder.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); this.buttonChangeFolder.BackColor = System.Drawing.Color.White; this.buttonChangeFolder.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch; this.buttonChangeFolder.FlatStyle = System.Windows.Forms.FlatStyle.Flat; this.buttonChangeFolder.Font = new System.Drawing.Font("IRANSans", 10.25F, System.Drawing.FontStyle.Bold); this.buttonChangeFolder.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(128)))), ((int)(((byte)(0))))); this.buttonChangeFolder.Location = new System.Drawing.Point(31, 61); this.buttonChangeFolder.Name = "buttonChangeFolder"; this.buttonChangeFolder.NextControl = null; this.buttonChangeFolder.Size = new System.Drawing.Size(44, 30); this.buttonChangeFolder.TabIndex = 5; this.buttonChangeFolder.Text = "..."; this.buttonChangeFolder.TextAlign = System.Drawing.ContentAlignment.TopCenter; this.buttonChangeFolder.UseVisualStyleBackColor = false; this.buttonChangeFolder.Click += new System.EventHandler(this.buttonChangeFolder_Click); // // progressBar1 // this.progressBar1.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); this.progressBar1.Location = new System.Drawing.Point(31, 96); this.progressBar1.Name = "progressBar1"; this.progressBar1.Size = new System.Drawing.Size(632, 23); this.progressBar1.TabIndex = 6; this.progressBar1.Visible = false; // // labelStatus // this.labelStatus.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); this.labelStatus.Font = new System.Drawing.Font("IRANSans", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.labelStatus.Location = new System.Drawing.Point(28, 125); this.labelStatus.Name = "labelStatus"; this.labelStatus.Size = new System.Drawing.Size(635, 23); this.labelStatus.TabIndex = 7; this.labelStatus.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; // // folderBrowserDialog1 // this.folderBrowserDialog1.RootFolder = System.Environment.SpecialFolder.MyComputer; this.folderBrowserDialog1.Tag = ""; // // labelDate // this.labelDate.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); this.labelDate.Font = new System.Drawing.Font("B Nazanin", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(178))); this.labelDate.Location = new System.Drawing.Point(534, 15); this.labelDate.Name = "labelDate"; this.labelDate.Size = new System.Drawing.Size(132, 27); this.labelDate.TabIndex = 8; this.labelDate.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; this.labelDate.Visible = false; // // cancelButton1 // this.cancelButton1.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); this.cancelButton1.BackColor = System.Drawing.Color.White; this.cancelButton1.FlatStyle = System.Windows.Forms.FlatStyle.Flat; this.cancelButton1.Font = new System.Drawing.Font("IRANSans(FaNum)", 9.5F); this.cancelButton1.ForeColor = System.Drawing.Color.Gray; this.cancelButton1.Location = new System.Drawing.Point(94, 4); this.cancelButton1.Name = "cancelButton1"; this.cancelButton1.NextControl = null; this.cancelButton1.Size = new System.Drawing.Size(81, 34); this.cancelButton1.TabIndex = 9; this.cancelButton1.Text = "انصراف"; this.cancelButton1.UseVisualStyleBackColor = false; this.cancelButton1.Click += new System.EventHandler(this.cancelButton1_Click); // // panel1 // this.panel1.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); this.panel1.Controls.Add(this.buttonBackup); this.panel1.Controls.Add(this.cancelButton1); this.panel1.Font = new System.Drawing.Font("IRANSans(FaNum)", 9.5F); this.panel1.Location = new System.Drawing.Point(33, 163); this.panel1.Name = "panel1"; this.panel1.Size = new System.Drawing.Size(223, 42); this.panel1.TabIndex = 10; // // FastBackup // this.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; this.Controls.Add(this.panel1); this.Controls.Add(this.labelDate); this.Controls.Add(this.labelStatus); this.Controls.Add(this.progressBar1); this.Controls.Add(this.buttonChangeFolder); this.Controls.Add(this.labelTargetFile); this.Controls.Add(this.label1); this.Name = "FastBackup"; this.Size = new System.Drawing.Size(700, 304); this.Load += new System.EventHandler(this.AtiranBackup_Load); this.panel1.ResumeLayout(false); this.ResumeLayout(false); this.PerformLayout(); }