private void GenerateExplorerBackgroundMenuItems(ContextMenu view, ContextMenu mnu, ContextMenu sortMenu, ContextMenu groupMenu) {
this.GenerateMenuItem(view, "Thumbstrip", 259, _ShellView.View == ShellViewStyle.Thumbstrip);
this.GenerateMenuItem(view, "Content", 258, _ShellView.View == ShellViewStyle.Content);
this.GenerateMenuItem(view, "Tiles", 257, _ShellView.View == ShellViewStyle.Tile);
this.GenerateMenuItem(view, "Details", 256, _ShellView.View == ShellViewStyle.Details);
this.GenerateMenuItem(view, "List", 255, _ShellView.View == ShellViewStyle.List);
this.GenerateMenuItem(view, "Small icon", 254, _ShellView.View == ShellViewStyle.SmallIcon);
this.GenerateMenuItem(view, "Medium", 253, _ShellView.View == ShellViewStyle.Medium);
this.GenerateMenuItem(view, "Large Icon", 252, _ShellView.View == ShellViewStyle.LargeIcon);
this.GenerateMenuItem(view, "Extra Large Icon", 251, _ShellView.View == ShellViewStyle.ExtraLargeIcon);
if (this._ShellView.CurrentFolder.IsFileSystem && (Clipboard.ContainsData(DataFormats.FileDrop) || Clipboard.ContainsData("Shell IDList Array"))) {
this.GenerateSeparator(mnu);
this.GenerateMenuItemExecutable(mnu, "Paste", 249);
}
this.GenerateSeparator(mnu);
this.GenerateMenuItemExecutable(mnu, "Refresh", 250);
var colID = 261 + this._ShellView.Collumns.Count;
var colGroupID = colID + this._ShellView.Collumns.Count + 1;
var collist = new List<Collumns>();
collist.AddRange(this._ShellView.Collumns);
collist.Reverse();
this.GenerateMenuItem(sortMenu, "Descending", 248, this._ShellView.LastSortOrder == SortOrder.Descending);
this.GenerateMenuItem(sortMenu, "Ascending", 247, this._ShellView.LastSortOrder == SortOrder.Ascending);
this.GenerateSeparator(sortMenu);
foreach (Collumns collumn in collist) {
this.GenerateMenuItem(sortMenu, collumn.Name, colID--, collumn == this._ShellView.Collumns.FirstOrDefault(w => w.ID == this._ShellView.LastSortedColumnId));
}
this.GenerateMenuItem(groupMenu, "Descending", 246, this._ShellView.LastGroupOrder == SortOrder.Descending);
this.GenerateMenuItem(groupMenu, "Ascending", 245, this._ShellView.LastGroupOrder == SortOrder.Ascending);
this.GenerateSeparator(groupMenu);
foreach (Collumns collumn in collist) {
this.GenerateMenuItem(groupMenu, collumn.Name, colGroupID--, collumn == this._ShellView.LastGroupCollumn);
}
this.GenerateMenuItem(groupMenu, "(None)", 260, this._ShellView.LastGroupCollumn == null);
collist.Clear();
collist = null;
this.GenerateSubmenu(groupMenu, mnu, "Group by");
this.GenerateSubmenu(sortMenu, mnu, "Sort by");
this.GenerateSubmenu(view, mnu, "View");
}
private void RemoveDuplicatedSeparators(ContextMenu mnu) {