public static void popupslu <C>(object sender, EventArgs e, SearchLookUpEdit slUpEdit) { try { var popupControl = sender as IPopupControl; var button = new SimpleButton { Image = Resources.add_16x16, Text = "Edit", BorderStyle = BorderStyles.NoBorder }; button.Click += btnclick <C>; button.Location = new Point(5, popupControl.PopupWindow.Height - button.Height - 5); popupControl.PopupWindow.Controls.Add(button); button.BringToFront(); var edit = sender as SearchLookUpEdit; var popupForm = edit.GetPopupEditForm(); popupForm.KeyPreview = true; popupForm.KeyUp -= txt_KeyUp; popupForm.KeyUp += txt_KeyUp; //slUpEdit.Properties.DataSource = Biencucbo.Table; //Biencucbo.Table = null; } catch (Exception ex) { MessageBox.Show(ex.ToString()); } }
public void HeaderButtonAdd(string name, string text, int imgIdx = -1) { minBtnIdx++; SimpleButton btn = new SimpleButton(); btn.Font = new Font("굴림체", 9); btn.AutoSize = true; btn.Padding = new Padding(12, 0, 12, 0); btn.PaintStyle = DevExpress.XtraEditors.Controls.PaintStyles.Light; btn.AllowFocus = false; btn.Name = name; btn.Text = text; btn.Cursor = Cursors.Hand; if (minBtnIdx + 4 <= 12) { btn.ToolTipTitle = "단축키"; btn.ToolTip = "F" + (minBtnIdx + 4).ToString(); } btn.Click += new EventHandler(headerButton_Click); if (imgIdx >= 0) { btn.ImageOptions.ImageList = imageCollection1; btn.ImageOptions.ImageIndex = imgIdx; } pnlButtonArea.Controls.Add(btn); btn.BringToFront(); }
/// <summary> /// 产生按钮方法 /// </summary> /// <param name="text">按钮显示文本</param> private SimpleButton CreateButton(string text) { SimpleButton simpleButton = new SimpleButton(); simpleButton.Visible = false; simpleButton.ForeColor = Color.Black; simpleButton.Cursor = System.Windows.Forms.Cursors.Hand; simpleButton.Size = new Size(40, 30); simpleButton.Text = text; simpleButton.ToolTip = text; this.Controls.Add(simpleButton); simpleButton.BringToFront(); return(simpleButton); }
public void QueryFilterTest() { m_Filter = CreateFilterControl(); GroupOperator aggrGroup, rootGroup; CreateFilterCondition1(m_Filter, out rootGroup, out aggrGroup); var form = m_Filter.FindForm(); var btnFlash = new SimpleButton { Parent = form, Dock = DockStyle.Bottom, Text = "Flash" }; btnFlash.BringToFront(); btnFlash.Click += FlashClick; var btnReferesh = new SimpleButton { Parent = form, Dock = DockStyle.Bottom, Text = "Refresh" }; btnReferesh.BringToFront(); btnReferesh.Click += RefereshClick; form.ShowDialog(); //querySearchObjectDb.Post(searchObjectsDs); }