InsertMenu() public method

public InsertMenu ( int pos, ItemFlags flags, int id, string item ) : bool
pos int
flags ItemFlags
id int
item string
return bool
        private void CustomizeMenu(bool updateMenuChecked)
        {
            // Reset current system menu
            SystemMenu.ResetSystemMenu(this);

            // Add custom menuitems to system menu
            systemMenu = SystemMenu.FromForm(this);
            //systemMenu.AppendSeparator();

            if (updateMenuChecked)
            {
                systemMenu.InsertMenu(0, ItemFlags.mfChecked, UpdateCheckMenuId, "Automatic Update Check Enabled");
                timerUpdateCheck.Enabled = true;
            }
            else
            {
                systemMenu.InsertMenu(0, ItemFlags.mfUnchecked, UpdateCheckMenuId, "Automatic Update Check Enabled");
            }

            RegistryKey rk = Registry.CurrentUser.CreateSubKey(@"Software\SystemRestoreExplorer");

            if (rk != null)
            {
                rk.SetValue("AutomaticUpdateCheckEnabled", updateCheckEnabled, RegistryValueKind.DWord);
            }

            systemMenu.InsertMenu(0, AboutMenuId, "About");
            systemMenu.InsertSeparator(2);
        }
        private void CustomizeMenu(bool updateMenuChecked)
        {
            // Reset current system menu
            SystemMenu.ResetSystemMenu(this);

            // Add custom menuitems to system menu
            systemMenu = SystemMenu.FromForm(this);
            //systemMenu.AppendSeparator();

            if (updateMenuChecked)
            {
                systemMenu.InsertMenu(0, ItemFlags.mfChecked, UpdateCheckMenuId, "Automatic Update Check Enabled");
                timerUpdateCheck.Enabled = true;
            }
            else
            {
                systemMenu.InsertMenu(0, ItemFlags.mfUnchecked, UpdateCheckMenuId, "Automatic Update Check Enabled");
            }

            RegistryKey rk = Registry.CurrentUser.CreateSubKey(@"Software\SystemRestoreExplorer");

            if (rk != null)
            {
                rk.SetValue("AutomaticUpdateCheckEnabled", updateCheckEnabled, RegistryValueKind.DWord);
            }

            systemMenu.InsertMenu(0, AboutMenuId, "About");
            systemMenu.InsertSeparator(2);
        }