Exemplo n.º 1
0
 public UserRow(UserRow TemplateRow)
 {
     foreach (KeyValuePair <ULColumnType, string> column in TemplateRow)
     {
         Add(column.Key, null);
     }
 }
Exemplo n.º 2
0
        public static void SetColumns(this ListView Owner, UserRow TemplateRow, string Format)
        {
            List <ULColumnType> ColIDs = new List <ULColumnType>();

            foreach (string sColID in Format.Split(','))
            {
                int ColID = -1;
                if (int.TryParse(sColID, out ColID))
                {
                    ColIDs.Add((ULColumnType)ColID);
                }
            }
            Owner.SetColumns(TemplateRow, ColIDs.ToArray());
        }
Exemplo n.º 3
0
        public static void SetColumns(this ListView Owner, UserRow TemplateRow, ULColumnType[] Format)
        {
            UserRow Row = new UserRow();

            Row.Add(ULColumnType.Tag, null);
            foreach (ULColumnType ColumnType in Format)
            {
                if (TemplateRow.ContainsKey(ColumnType) && !Row.ContainsKey(ColumnType))
                {
                    Row.Add(ColumnType, TemplateRow[ColumnType]);
                }
            }
            Owner.SetColumns(Row);
        }
Exemplo n.º 4
0
 public static void SetColumns(this ListView Owner, UserRow Row)
 {
     Owner.SuspendLayout();
     Owner.BeginUpdate();
     Owner.Items.Clear();
     Owner.Columns.Clear();
     foreach (KeyValuePair <ULColumnType, string> Column in Row)
     {
         if (Column.Value != null)
         {
             Owner.Columns.Add(Column.Value).Tag = Column.Key;
         }
     }
     CurrentHeaderRow = Row;
     Owner.AutoResizeColumns(ColumnHeaderAutoResizeStyle.HeaderSize);
     Owner.EndUpdate();
     Owner.ResumeLayout();
 }