Пример #1
0
        public void ReadColoumnAttributes(FileView flView)
        {
            int i = 0;

            while (true)
            {
                string colunmName         = flView.GetColumnName(string.Empty, i);
                int    columnDisplayIndex = flView.GetColumnDisplayIndex(string.Empty, i);
                Guid   columnGuid         = Guid.Empty;
                int    columnPid          = 0;
                flView.GetColumndIDFromColumn(string.Empty, i, ref columnGuid, ref columnPid);

                if (colunmName != string.Empty)
                {
                    this[colunmName] = new Column {
                        Name = colunmName, ColumnGuid = columnGuid, ColumnPid = columnPid, Width = flView.GetColumnWidth(string.Empty, i), ColumnDisplayIndex = columnDisplayIndex
                    };
                }
                else
                {
                    return;
                }
                i++;
            }
        }
Пример #2
0
        public void SetColoumnWidthAndDisplayindex(FileView flView)
        {
            int i = 0;

            while (true)
            {
                string colunmName         = flView.GetColumnName(string.Empty, i);
                int    columnDisplayIndex = flView.GetColumnDisplayIndex(string.Empty, i);
                Guid   columnGuid         = Guid.Empty;
                int    columnPid          = 0;
                flView.GetColumndIDFromColumn(string.Empty, i, ref columnGuid, ref columnPid);

                if (colunmName != string.Empty)
                {
                    if (!this.ContainsKey(colunmName))
                    {
                        this[colunmName] = new Column {
                            Name = colunmName, ColumnGuid = columnGuid, ColumnPid = columnPid, Width = 150, ColumnDisplayIndex = columnDisplayIndex
                        };
                    }
                    flView.SetColumnWidth(string.Empty, i, this[colunmName].Width);
                    flView.SetColumnDisplayIndex(string.Empty, i, this[colunmName].ColumnDisplayIndex);
                }
                else
                {
                    return;
                }
                i++;
            }
        }