/// <summary> /// 조회, 저장등의 DB, TRAN 시 Control Enable/Disable /// </summary> void SetControlDisable(bool bDisable) { _bDisable = bDisable; if (this.InvokeRequired) { this.BeginInvoke((MethodInvoker) delegate() { foreach (var item in this.ContainerPanel.Controls) { if (item.GetType().Name.ToString().ToLower() == "keypad") { WSWD.WmallPos.POS.FX.Win.UserControls.KeyPad key = (WSWD.WmallPos.POS.FX.Win.UserControls.KeyPad)item; key.Enabled = !_bDisable; } else if (item.GetType().Name.ToString().ToLower() == "inputtext") { WSWD.WmallPos.POS.FX.Win.UserControls.InputText txt = (WSWD.WmallPos.POS.FX.Win.UserControls.InputText)item; txt.Enabled = !_bDisable; } else if (item.GetType().Name.ToString().ToLower() == "button") { WSWD.WmallPos.POS.FX.Win.UserControls.Button btn = (WSWD.WmallPos.POS.FX.Win.UserControls.Button)item; btn.Enabled = !_bDisable; } else if (item.GetType().Name.ToString().ToLower() == "salegridpanel") { WSWD.WmallPos.POS.FX.Win.UserControls.SaleGridPanel grdp = (WSWD.WmallPos.POS.FX.Win.UserControls.SaleGridPanel)item; grdp.Enabled = !_bDisable; } } }); } else { foreach (var item in this.ContainerPanel.Controls) { if (item.GetType().Name.ToString().ToLower() == "keypad") { WSWD.WmallPos.POS.FX.Win.UserControls.KeyPad key = (WSWD.WmallPos.POS.FX.Win.UserControls.KeyPad)item; key.Enabled = !_bDisable; } else if (item.GetType().Name.ToString().ToLower() == "inputtext") { WSWD.WmallPos.POS.FX.Win.UserControls.InputText txt = (WSWD.WmallPos.POS.FX.Win.UserControls.InputText)item; txt.Enabled = !_bDisable; } else if (item.GetType().Name.ToString().ToLower() == "button") { WSWD.WmallPos.POS.FX.Win.UserControls.Button btn = (WSWD.WmallPos.POS.FX.Win.UserControls.Button)item; btn.Enabled = !_bDisable; } else if (item.GetType().Name.ToString().ToLower() == "salegridpanel") { WSWD.WmallPos.POS.FX.Win.UserControls.SaleGridPanel grdp = (WSWD.WmallPos.POS.FX.Win.UserControls.SaleGridPanel)item; grdp.Enabled = !_bDisable; } } } //Application.DoEvents(); }
private void InitializeComponent() { System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(POS_TM_M005)); this.gridPanel1 = new WSWD.WmallPos.POS.FX.Win.UserControls.GridPanel(); this.button1 = new System.Windows.Forms.Button(); this.button2 = new System.Windows.Forms.Button(); this.saleGridPanel1 = new WSWD.WmallPos.POS.FX.Win.UserControls.SaleGridPanel(); this.label1 = new System.Windows.Forms.Label(); this.SuspendLayout(); // // gridPanel1 // this.gridPanel1.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(202)))), ((int)(((byte)(202)))), ((int)(((byte)(202))))); this.gridPanel1.BorderWidth = new System.Windows.Forms.Padding(1); this.gridPanel1.CurrentRowIndex = -1; this.gridPanel1.Location = new System.Drawing.Point(13, 6); this.gridPanel1.Name = "gridPanel1"; this.gridPanel1.Padding = new System.Windows.Forms.Padding(1); this.gridPanel1.Size = new System.Drawing.Size(635, 266); this.gridPanel1.TabIndex = 3; // // button1 // this.button1.Location = new System.Drawing.Point(13, 286); this.button1.Name = "button1"; this.button1.Size = new System.Drawing.Size(75, 23); this.button1.TabIndex = 5; this.button1.Text = "button1"; this.button1.UseVisualStyleBackColor = true; this.button1.Click += new System.EventHandler(this.button1_Click); // // button2 // this.button2.Location = new System.Drawing.Point(180, 286); this.button2.Name = "button2"; this.button2.Size = new System.Drawing.Size(75, 23); this.button2.TabIndex = 6; this.button2.Text = "button2"; this.button2.UseVisualStyleBackColor = true; this.button2.Click += new System.EventHandler(this.button2_Click); // // saleGridPanel1 // this.saleGridPanel1.AutoFillRows = true; this.saleGridPanel1.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(202)))), ((int)(((byte)(202)))), ((int)(((byte)(202))))); this.saleGridPanel1.BorderWidth = new System.Windows.Forms.Padding(1); this.saleGridPanel1.ColumnCount = 7; this.saleGridPanel1.Location = new System.Drawing.Point(25, 350); this.saleGridPanel1.Name = "saleGridPanel1"; this.saleGridPanel1.Padding = new System.Windows.Forms.Padding(1); this.saleGridPanel1.PageIndex = -1; this.saleGridPanel1.RowCount = 5; this.saleGridPanel1.RowHeight = 57; this.saleGridPanel1.ScrollType = WSWD.WmallPos.POS.FX.Win.UserControls.ScrollTypes.IndexChanged; this.saleGridPanel1.SelectedRowIndex = -1; this.saleGridPanel1.Size = new System.Drawing.Size(691, 318); this.saleGridPanel1.TabIndex = 7; // // label1 // this.label1.AutoSize = true; this.label1.Location = new System.Drawing.Point(50, 324); this.label1.Name = "label1"; this.label1.Size = new System.Drawing.Size(52, 14); this.label1.TabIndex = 8; this.label1.Text = "label1"; // // POS_TM_M005 // this.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("$this.BackgroundImage"))); this.Controls.Add(this.label1); this.Controls.Add(this.saleGridPanel1); this.Controls.Add(this.button2); this.Controls.Add(this.button1); this.Controls.Add(this.gridPanel1); this.Font = new System.Drawing.Font("Dotum", 10F, System.Drawing.FontStyle.Bold); this.Name = "POS_TM_M005"; this.ResumeLayout(false); this.PerformLayout(); }