Exemple #1
0
        public ListViewColumnSettings GetColumnSettings(
            ColumnHeader Header, FieldWidthStyle DefaultStyle, int DefaultWidth)
        {
            ListViewColumnSettings settings;
            if (Columns.TryGetValue(Header.Name, out settings))
                return settings;

            settings = new ListViewColumnSettings();
            settings.WidthStyle = DefaultStyle;
            settings.Width = DefaultWidth;
            settings.Visible = true;
            Columns.Add(Header.Name, settings);
            return settings;
        }
        public ListViewColumnSettings GetColumnSettings(
            ColumnHeader Header, FieldWidthStyle DefaultStyle, int DefaultWidth)
        {
            ListViewColumnSettings settings;

            if (Columns.TryGetValue(Header.Name, out settings))
            {
                return(settings);
            }

            settings            = new ListViewColumnSettings();
            settings.WidthStyle = DefaultStyle;
            settings.Width      = DefaultWidth;
            settings.Visible    = true;
            Columns.Add(Header.Name, settings);
            return(settings);
        }