public SimpleCustomizeFolder(ICustomizeFolder source)
 {
     this.FAutoSizeColumns = source.AutoSizeColumns;
     this.FColumns = source.Columns;
     this.FIcon = source.Icon;
     this.FFilter = source.Filter;
     this.FSort = source.Sort;
     this.FListColumnCount = source.ListColumnCount;
     this.FThumbnailSize = source.ThumbnailSize;
     this.FThumbnailSpacing = source.ThumbnailSpacing;
     this.FView = source.View;
     this.FBackColor = source.BackColor;
     this.FForeColor = source.ForeColor;
 }
        protected SimpleCustomizeFolder(SerializationInfo info, StreamingContext context)
        {
            this.FUpdatebleParts = (CustomizeFolderParts) info.GetValue("UpdateableParts", typeof(CustomizeFolderParts));
            string str = null;
            int iconIndex = 0;
            SerializationInfoEnumerator enumerator = info.GetEnumerator();
            while (enumerator.MoveNext())
            {
                SerializationEntry current = enumerator.Current;
                switch (current.Name)
                {
                    case "AutoSizeColumns":
                        this.FAutoSizeColumns = new bool?(Convert.ToBoolean(current.Value));
                        break;

                    case "Columns":
                        this.FColumns = (ListViewColumnInfo[]) current.Value;
                        break;

                    case "Filter":
                        this.FFilter = (IVirtualItemFilter) current.Value;
                        break;

                    case "Sort":
                        this.FSort = (VirtualItemComparer) current.Value;
                        break;

                    case "ListColumnCount":
                        this.FListColumnCount = new int?(Convert.ToInt32(current.Value));
                        break;

                    case "ThumbnailSize":
                        this.FThumbnailSize = (Size) current.Value;
                        break;

                    case "ThumbnailSpacing":
                        this.FThumbnailSpacing = (Size) current.Value;
                        break;

                    case "View":
                        this.FView = new PanelView?((PanelView) current.Value);
                        break;

                    case "IconFile":
                        str = current.Value as string;
                        break;

                    case "IconIndex":
                        iconIndex = Convert.ToInt32(current.Value);
                        break;

                    case "BackColor":
                        this.FBackColor = (Color) current.Value;
                        break;

                    case "ForeColor":
                        this.FForeColor = (Color) current.Value;
                        break;
                }
            }
            if (!string.IsNullOrEmpty(str))
            {
                this.FIcon = new IconLocation(str, iconIndex);
            }
        }