コード例 #1
0
ファイル: Utils.cs プロジェクト: hafsjold/snvrepos
        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
ファイル: Utils.cs プロジェクト: hafsjold/snvrepos
        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++;
            }
        }