public string GetValue(int column)
        {
            if (column < 0)
            {
                throw new ArgumentOutOfRangeException("column");
            }

            if (_values != null && column < _values.Length)
            {
                return(_values[column]);
            }

            SmartListView lv = ListView as SmartListView;

            if (lv != null && lv.AllColumns.Count > 0)
            {
                if (column >= lv.AllColumns.Count)
                {
                    throw new ArgumentOutOfRangeException("column");
                }

                column = lv.AllColumns[column].Index;
            }
            else if (ListView != null && ListView.Columns.Count <= column)
            {
                throw new ArgumentOutOfRangeException("column");
            }

            if (column < 0 || column > SubItems.Count)
            {
                return(null);
            }

            return(SubItems[column].Text);
        }
示例#2
0
 public SmartGroup(SmartListView listView)
     : this(listView, new ListViewGroup())
 {
     if (listView == null)
     {
         throw new ArgumentNullException("listView");
     }
 }
示例#3
0
            public SmartGroupSorter(SmartListView view)
            {
                if (view == null)
                {
                    throw new ArgumentNullException("view");
                }

                _view = view;
            }
示例#4
0
        /// <summary>
        /// Initializes a new instance of the <see cref="SmartColumn"/> class.
        /// </summary>
        /// <param name="view">The view.</param>
        public SmartColumn(SmartListView view)
        {
            if (view == null)
            {
                throw new ArgumentNullException("view");
            }

            _view = view;
        }
        public SmartListViewItem(SmartListView listView)
        {
            if (listView == null)
            {
                throw new ArgumentNullException("listView");
            }

            _view = listView;
        }
示例#6
0
        static SmartListView FindView(IContainer container)
        {
            foreach (Component c in container.Components)
            {
                SmartListView slv = c as SmartListView;

                if (slv != null)
                {
                    return(slv);
                }
            }
            return(null);
        }
示例#7
0
        /// <summary>
        /// Initializes a new instance of the <see cref="SmartColumn"/> class.
        /// </summary>
        /// <param name="view">The view.</param>
        /// <param name="text">The text.</param>
        /// <param name="menuText">The menu text.</param>
        /// <param name="width">The width.</param>
        /// <param name="align">The align.</param>
        public SmartColumn(SmartListView view, string text, string menuText, int width, HorizontalAlignment align)
        {
            if (view == null)
            {
                throw new ArgumentNullException("view");
            }

            _view     = view;
            Text      = text;
            MenuText  = menuText;
            Width     = _defaultWidth = width;
            TextAlign = align;
        }
示例#8
0
        SmartGroup(SmartListView listView, ListViewGroup group)
        {
            if (listView == null)
            {
                throw new ArgumentNullException("listView");
            }
            else if (group == null)
            {
                throw new ArgumentNullException("group");
            }

            Debug.Assert(group.Tag == null);
            _lv        = listView;
            _group     = group;
            _group.Tag = this;
        }
示例#9
0
 /// <summary>
 /// Initializes a new instance of the <see cref="SmartColumn"/> class.
 /// </summary>
 /// <param name="view">The view.</param>
 /// <param name="menuText">The menu text.</param>
 /// <param name="width">The width.</param>
 /// <param name="align">The align.</param>
 public SmartColumn(SmartListView view, string menuText, int width, HorizontalAlignment align)
     : this(view, menuText.Replace("&", ""), menuText, width, align)
 {
 }
示例#10
0
 /// <summary>
 /// Initializes a new instance of the <see cref="SmartColumn"/> class.
 /// </summary>
 /// <param name="view">The view.</param>
 /// <param name="menuText">The menu text.</param>
 /// <param name="width">The width.</param>
 /// <param name="name">The name.</param>
 public SmartColumn(SmartListView view, string menuText, int width, string name)
     : this(view, menuText, width, HorizontalAlignment.Left)
 {
     this.Name = name;
 }
示例#11
0
 /// <summary>
 /// Initializes a new instance of the <see cref="SmartColumn"/> class.
 /// </summary>
 /// <param name="view">The view.</param>
 /// <param name="text">The text.</param>
 /// <param name="menuText">The menu text.</param>
 /// <param name="width">The width.</param>
 public SmartColumn(SmartListView view, string text, string menuText, int width)
     : this(view, text, menuText, width, HorizontalAlignment.Left)
 {
 }
示例#12
0
 public SmartGroup(SmartListView listView, string key, string headerText)
     : this(listView, new ListViewGroup(key, headerText))
 {
 }
示例#13
0
 public SmartGroup(SmartListView listView, string header, HorizontalAlignment headerAlignment)
     : this(listView, new ListViewGroup(header, headerAlignment))
 {
 }
示例#14
0
 public SmartGroup(SmartListView listView, string header)
     : this(listView, new ListViewGroup(header))
 {
 }