private void ShowPanel(ctlImageButton butt, string ctlname) { //ctlUserPanel ctl = guiconf.GetControl(ctlname); Control ctl = guiconf.GetControl(ctlname); if (ctl == null) { return; } if (ctl == m_selectedControl) { //butt.Gapx -= 5; m_pressedButt = null; ctl.Visible = false; m_selectedControl = null; } else { if (m_selectedControl != null) { //m_pressedButt.Gapx -= 5; m_pressedButt.Checked = false; m_selectedControl.Visible = false; } m_pressedButt = butt; m_selectedControl = ctl; ctl.Visible = true; } }
private void ClickSwitchTabView_Click(object sender, object e) { try { //cast sender to be the ctlImageButton of the ctlTitle ctlImageButton button = (ctlImageButton)sender; //find the tab view tabview tabv = null; foreach (tabview tv in m_lsttabs) { if (tv.m_title.Button == button) { tabv = tv; break; } } if (tabv != null) { //UncheckTabs(tabv.m_title); ShowView(tabv.m_tabidx); } } catch (Exception ex) { DebugLogger.Instance().LogError(ex); } }
private void ShowPanel(ctlImageButton butt, Control ctl) { if (ctl == m_selectedControl) { butt.Gapx -= 5; m_pressedButt = null; ctl.Visible = false; m_selectedControl = null; } else { if (m_selectedControl != null) { m_pressedButt.Gapx -= 5; m_selectedControl.Visible = false; } m_pressedButt = butt; m_selectedControl = ctl; butt.Gapx += 5; ctl.Location = new Point(butt.Location.X + butt.Width, butt.Location.Y + butt.Height - ctl.Height); ctl.Visible = true; } }
public void AsociateRedoButton(ctlImageButton butt) { m_redoButt = butt; m_redoButt.Click += new EventHandler(m_redoButt_Click); UpdateButtons(); }