Exemple #1
0
        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();
        }
Exemple #2
0
 public FormSettings()
 {
     InitializeComponent();
     if (!ExplorerContextMenu.IsAdmin())
     {
         SetButtonShield(buttonAddContextMenu, true);
         SetButtonShield(buttonRemoveContextMenu, true);
     }
 }
Exemple #3
0
        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();
        }