private void InitializeComponent() { this.button1 = new WSWD.WmallPos.POS.FX.Win.UserControls.Button(); this.gridPanel1 = new WSWD.WmallPos.POS.FX.Win.UserControls.GridPanel(); this.ContainerPanel.SuspendLayout(); this.SuspendLayout(); // // ContainerPanel // this.ContainerPanel.Controls.Add(this.gridPanel1); this.ContainerPanel.Controls.Add(this.button1); this.ContainerPanel.Size = new System.Drawing.Size(751, 469); // // button1 // this.button1.BorderSize = 1; this.button1.Corner = 3; this.button1.Location = new System.Drawing.Point(165, 372); this.button1.Name = "button1"; this.button1.Selected = false; this.button1.Size = new System.Drawing.Size(90, 42); this.button1.TabIndex = 0; this.button1.Text = "닫기"; this.button1.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; this.button1.Click += new System.EventHandler(this.button1_Click); // // gridPanel1 // this.gridPanel1.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(234)))), ((int)(((byte)(234)))), ((int)(((byte)(234))))); this.gridPanel1.BorderWidth = new System.Windows.Forms.Padding(1); this.gridPanel1.CurrentRowIndex = -1; this.gridPanel1.Dock = System.Windows.Forms.DockStyle.Top; this.gridPanel1.Location = new System.Drawing.Point(10, 10); this.gridPanel1.Name = "gridPanel1"; this.gridPanel1.Padding = new System.Windows.Forms.Padding(1); this.gridPanel1.Size = new System.Drawing.Size(731, 264); this.gridPanel1.TabIndex = 1; // // POS_TM_P003 // this.ClientSize = new System.Drawing.Size(751, 509); this.Name = "POS_TM_P003"; this.ContainerPanel.ResumeLayout(false); this.ResumeLayout(false); }
/// <summary> /// 조회, 저장등의 DB, TRAN 시 Control Enable/Disable /// </summary> void SetControlDisable(bool bDisable) { ChildManager.ShowProgress(bDisable); _bDisable = bDisable; if (!bDisable) { if (POSDeviceManager.Scanner != null) { POSDeviceManager.Scanner.DataEvent += new POSDataEventHandler(Scanner_DataEvent); //Scanner Event } } else { if (POSDeviceManager.Scanner != null) { POSDeviceManager.Scanner.DataEvent -= new POSDataEventHandler(Scanner_DataEvent); //Scanner Event } } 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() == "gridpanel") { WSWD.WmallPos.POS.FX.Win.UserControls.GridPanel grd = (WSWD.WmallPos.POS.FX.Win.UserControls.GridPanel)item; grd.Enabled = !_bDisable; } else if (item.GetType().Name.ToString().ToLower() == "panel") { Panel pnl = (Panel)item; pnl.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() == "gridpanel") { WSWD.WmallPos.POS.FX.Win.UserControls.GridPanel grd = (WSWD.WmallPos.POS.FX.Win.UserControls.GridPanel)item; grd.Enabled = !_bDisable; } else if (item.GetType().Name.ToString().ToLower() == "panel") { Panel pnl = (Panel)item; pnl.Enabled = !_bDisable; } } } //Application.DoEvents(); }
public override void Initialize(IComponent c) { base.Initialize(c); GridPanel ctl = (GridPanel)c; //EnableDesignMode(ctl.ContainerZone, "ContainerZone"); }
/// <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() == "gridpanel") { WSWD.WmallPos.POS.FX.Win.UserControls.GridPanel grd = (WSWD.WmallPos.POS.FX.Win.UserControls.GridPanel)item; grd.Enabled = !_bDisable; } else if (item.GetType().Name.ToString().ToLower() == "panel") { Panel pnl = (Panel)item; pnl.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() == "gridpanel") { WSWD.WmallPos.POS.FX.Win.UserControls.GridPanel grd = (WSWD.WmallPos.POS.FX.Win.UserControls.GridPanel)item; grd.Enabled = !_bDisable; } else if (item.GetType().Name.ToString().ToLower() == "panel") { Panel pnl = (Panel)item; pnl.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(); }