示例#1
0
        public static T GetFirstSelection <T>(this DarkUI.Controls.DarkListView control) where T : class
        {
            var indices = control.SelectedIndices;

            if (indices == null || indices.Count == 0 || control.Items.Count == 0)
            {
                return(default(T));
            }
            return(control.Items[indices[0]].Tag as T);
        }
示例#2
0
        public static int GetFirstSelectedIndex(this DarkUI.Controls.DarkListView control)
        {
            var indices = control.SelectedIndices;

            if (indices == null || indices.Count == 0 || control.Items.Count == 0)
            {
                return(-1);
            }
            return(indices[0]);
        }
示例#3
0
 public static void EndUpdate(this DarkUI.Controls.DarkListView control)
 {
 }