예제 #1
0
        public bool SelectNextEntry(bool forward)
        {
            PropertyPage sel = ActivePropertyPage as PropertyPage;

            if (sel != null)
            {
                sel.SelectNextPropertyEntry(forward);
            }
            return(true);
        }
예제 #2
0
 public void HideListBox()
 {
     if (EntryWithListBox != null)
     {
         PropertyPage   pp  = GetPropertyPage(EntryWithListBox);
         IPropertyEntry elb = EntryWithListBox;
         EntryWithListBox = null;
         pp?.Refresh(elb);
     }
     listBox.Hide();
     listBox.Items.Clear();
 }
예제 #3
0
 public void HideTextBox()
 {
     // we cannot call EntryWithTextBox.EndEdit, because we don't know, whether it was aborted or not.
     // EntryWithTextBox.EndEdit must be called where Tab, Enter or click occurs
     if (EntryWithTextBox != null)
     {
         PropertyPage   pp  = GetPropertyPage(EntryWithTextBox);
         IPropertyEntry etb = EntryWithTextBox;
         EntryWithTextBox = null;
         pp?.Refresh(etb);
     }
     textBox.Hide();
 }
예제 #4
0
        private void ListBox_DrawItem(object sender, DrawItemEventArgs e)
        {
            string text = listBox.Items[e.Index].ToString();

            if ((e.State & DrawItemState.Selected) == DrawItemState.Selected)
            {
                e.Graphics.FillRectangle(SystemBrushes.Highlight, e.Bounds);
                PropertyPage.DrawString(e.Graphics, text, this.Font, SystemBrushes.HighlightText, e.Bounds, e.State == DrawItemState.Checked);
            }
            else
            {
                e.Graphics.FillRectangle(SystemBrushes.Window, e.Bounds);
                PropertyPage.DrawString(e.Graphics, text, this.Font, SystemBrushes.ControlText, e.Bounds, e.State == DrawItemState.Checked);
            }
        }
예제 #5
0
        public IPropertyPage AddPropertyPage(string titleId, int iconId)
        {
            PropertyPage res = new PropertyPage(titleId, iconId, this);

            tabPages.Add(res);
            res.Dock  = DockStyle.Fill;
            res.Frame = Frame;
            TabPage tp = new TabPage();

            tp.Controls.Add(res);
            tabControl.TabPages.Add(tp);
            tp.Text        = StringTable.GetString(titleId + "TabPage");
            tp.ImageIndex  = iconId;
            tp.ToolTipText = StringTable.GetString(titleId + "TabPage", StringTable.Category.tip);
            tp.Tag         = res;

            return(res);
        }