private static void ExplorerContextMenuMethod(ExplorerContextMenu.Action action) { ExplorerContextMenu.Status status = null; switch (action) { case ExplorerContextMenu.Action.Create: status = ExplorerContextMenu.Create(); break; case ExplorerContextMenu.Action.Remove: status = ExplorerContextMenu.Remove(); break; default: return; } if (status.Result) { MessageBox.Show(status.Message, Application.ProductName); } else { MessageBox.Show(status.Message, Application.ProductName, MessageBoxButtons.OK, MessageBoxIcon.Error); } Application.Exit(); }
public FormSettings() { InitializeComponent(); if (!ExplorerContextMenu.IsAdmin()) { SetButtonShield(buttonAddContextMenu, true); SetButtonShield(buttonRemoveContextMenu, true); } }
private static void ExplorerContextMenuMethod(ExplorerContextMenu.Action action) { ExplorerContextMenu.Status status = null; switch (action) { case ExplorerContextMenu.Action.Create: status = ExplorerContextMenu.Create(); break; case ExplorerContextMenu.Action.Remove: status = ExplorerContextMenu.Remove(); break; default: return; } if (status.Result) MessageBox.Show(status.Message, Application.ProductName); else MessageBox.Show(status.Message, Application.ProductName, MessageBoxButtons.OK, MessageBoxIcon.Error); Application.Exit(); }