protected override void OnMouseDoubleClick(MouseEventArgs e) { if (e.Button == System.Windows.Forms.MouseButtons.Left) { if (IdControllo == 0) { using (ConfiguratoreControllo cfgCtrl = new ConfiguratoreControllo(this, Parent, GetType())) { if (cfgCtrl.ShowDialog() == DialogResult.OK) { Text = cfgCtrl.CtrlText; Name = cfgCtrl.CtrlName; } } } else { RibbonGroup grp = Parent.Parent as RibbonGroup; using (AssegnaFunzioni afForm = new AssegnaFunzioni(this, grp, 1, 62)) { afForm.ShowDialog(); } } } base.OnDoubleClick(e); }
protected override void OnMouseDoubleClick(MouseEventArgs e) { if (e.Button == System.Windows.Forms.MouseButtons.Left) { if (IdGruppo == 0) { using (ConfiguratoreControllo cfgCtrl = new ConfiguratoreControllo(this, Parent, GetType())) { if (cfgCtrl.ShowDialog() == DialogResult.OK) { Text = cfgCtrl.CtrlText; Name = cfgCtrl.CtrlName; } } } } base.OnDoubleClick(e); }
public RibbonDropDown(Control ribbon) : this() { using (ConfiguratoreControllo cc = new ConfiguratoreControllo(ribbon, typeof(RibbonDropDown))) { if (cc.ShowDialog() == DialogResult.OK) { Name = cc.CtrlName; Text = cc.CtrlText; } else { Dispose(); return; } } _label.TextAlign = HorizontalAlignment.Left; SetWidth(); }
public RibbonGroup(Control ribbon) : this(ribbon, 0) { using (ConfiguratoreControllo cfgCtrl = new ConfiguratoreControllo(ribbon, typeof(RibbonGroup))) { if (cfgCtrl.ShowDialog() == DialogResult.OK) { Name = cfgCtrl.CtrlName; Text = cfgCtrl.CtrlText; } else { Dispose(); return; } } //BackColor = ControlPaint.LightLight(ribbon.BackColor); //this.Top = ribbon.Padding.Top; this.Width = (int)(Utility.MeasureTextSize(this.Label).Width + 20); //this.Height = ribbon.Height - ribbon.Padding.Top - ribbon.Padding.Bottom - 20; //this.Label.BackColor = ControlPaint.LightLight(ribbon.BackColor); }