Exemplo n.º 1
0
 public void Remove(object value)
 {
     if (_owner != null)
     {
         ObjectCollection items = _owner.Items;
         if (items != null & value != null)
         {
             int index = items.IndexOf(value);
             if (index != -1 && GetSelected(index))
             {
                 _owner.SetSelected(index, false);
             }
         }
     }
 }
Exemplo n.º 2
0
 public void Add(object value)
 {
     if (_owner != null)
     {
         ObjectCollection items = _owner.Items;
         if (items != null && value != null)
         {
             int index = items.IndexOf(value);
             if (index != -1 && !GetSelected(index))
             {
                 _owner.SelectedIndex = index;
             }
         }
     }
 }
Exemplo n.º 3
0
        public ListBoxEx()
        {
            msgs = new List <string>();

            _items        = new ObjectCollection();
            _items.Parent = this;

            _border = new Border();

            _selectedBackColor = Color.FromArgb(49, 199, 214);
            _lineColor         = Color.Gray;
            _scrollBarColor    = Color.Gray;

            _scrollTop = 0;

            if (_offscreen == null)
            {
#if PocketPC
                _offscreen = new Bitmap(1024, 2048, System.Drawing.Imaging.PixelFormat.Format16bppRgb565);
#else
                _offscreen = new Bitmap(2048, 2048, System.Drawing.Imaging.PixelFormat.Format16bppRgb565);
#endif
                _graphics = Graphics.FromImage(_offscreen);
            }

            _selectedIndex  = -1;
            _selectionMode  = SelectionMode.One;
            _screenupdating = true;

            // タップ、左クリック
            WndProcHooker.HookWndProc(this, new WndProcHooker.WndProcCallback(this.WM_LButton_Down), Win32.WM_LBUTTONDOWN);

            // 右クリック
            WndProcHooker.HookWndProc(this, new WndProcHooker.WndProcCallback(this.WM_LButton_Down), Win32.WM_RBUTTONDOWN);

            // ジェスチャ
            WndProcHooker.HookWndProc(this, new WndProcHooker.WndProcCallback(this.WM_Gesture), Win32.WM_GESTURE);

            // マウスホイール
            WndProcHooker.HookWndProc(this, new WndProcHooker.WndProcCallback(this.WM_MouseWheel), Win32.WM_MOUSEWHEEL);

            // 慣性スクロールタイマー
            _timerScrolling          = new Timer();
            _timerScrolling.Interval = 100;
            _timerScrolling.Tick    += new EventHandler(TimerScrolling);
            _timerScrolling.Enabled  = true;
        }
Exemplo n.º 4
0
        public ComboBox()
        {
            Items = new ObjectCollection(this);

            AutoCompleteMode       = AutoCompleteMode.None;
            AutoCompleteSource     = AutoCompleteSource.None;
            BackColor              = Color.White;
            BackColorDropDownList  = Color.FromArgb(235, 235, 235);
            BorderColor            = Color.DarkGray;
            BorderColorDisabled    = Color.FromArgb(217, 217, 217);
            BorderColorHovered     = Color.FromArgb(126, 180, 234);
            DisabledColor          = SystemColors.Control;
            DropDownStyle          = ComboBoxStyle.DropDown;
            HoverColor             = Color.White;
            HoverColorDropDownList = Color.FromArgb(227, 240, 252);
            Padding = new Padding(4, 0, 4, 0);
        }
Exemplo n.º 5
0
        public ListBox()
        {
            items = new ObjectCollection(this);

            BackColor   = Color.White;
            DrawMode    = DrawMode.Normal;
            DrawItem    = InternalDrawItem;
            uwfWrapText = true;

            uwfItemDisabledColor      = Color.Gray;
            uwfItemHoverColor         = Color.FromArgb(221, 238, 253);
            uwfSelectionBackColor     = SystemColors.Highlight;
            uwfSelectionDisabledColor = Color.FromArgb(101, 203, 255);
            uwfSelectionForeColor     = SystemColors.HighlightText;

            vScroll          = new VScrollBar();
            vScroll.Anchor   = AnchorStyles.Right | AnchorStyles.Top | AnchorStyles.Bottom;
            vScroll.Location = new Point(Width - vScroll.Width, 0);
            vScroll.Height   = Height;
            vScroll.Visible  = false;
            Controls.Add(vScroll);

            UpdateBorder();
        }
Exemplo n.º 6
0
 public ComboBox() : base(new HTMLSelectElement())
 {
     Items = new ObjectCollection(this);
 }
Exemplo n.º 7
0
		public ComboBox()
		{
			items = new ObjectCollection(this);
			imp = new DummyImp(this);
		}
 public ComboBoxDataSource(ComboBox comboBox, ObjectCollection Items)
 {
     cbox = comboBox;
     //dataArray = Items;
 }
Exemplo n.º 9
0
 public void AddRange(ObjectCollection value)
 {
     AddRangeInternal((ICollection)value);
 }
Exemplo n.º 10
0
 public void AddRange(ObjectCollection value)
 {
     throw null;
 }
Exemplo n.º 11
0
 public ObjectCollection(ListBox owner, ObjectCollection value)
 {
     this.owner = owner;
     AddRange(value);
 }
Exemplo n.º 12
0
 public ListboxDataSource(ListBox listBox, ObjectCollection Items)
 {
     lbox      = listBox;
     dataArray = Items;
 }
Exemplo n.º 13
0
 public ListboxDataSource(ListBox listBox)
 {
     lbox      = listBox;
     dataArray = new ObjectCollection(listBox, new object[] {});
 }
Exemplo n.º 14
0
		public ComboBox()
		{
			dropdown_style = ComboBoxStyle.DropDownList;
			items = new ObjectCollection(this);
		}
Exemplo n.º 15
0
 public ListBox() : base(new HTMLSelectElement())
 {
     Element.As <HTMLSelectElement>().multiple = true;
     Items = new ObjectCollection(this);
 }
Exemplo n.º 16
0
 public void AddRange(ObjectCollection value)
 {
     owner.CheckNoDataSource();
     AddRangeInternal((ICollection)value);
 }
Exemplo n.º 17
0
 public void AddRange(ObjectCollection value)
 {
     ThrowIfOwnerIsDataBound();
     AddRangeInternal(value);
     SyncOwnerItems();
 }
Exemplo n.º 18
0
 internal TimeSpanCollection(ObjectCollection coll)
     : base(coll)
 {
 }
Exemplo n.º 19
0
 public ObjectCollection(ListBox owner, ObjectCollection value)
 {
     throw null;
 }