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