public MenuCommandWrapper Create(EventHandler Invoke, string Text) { MenuCommandWrapper wrapper = MenuCommandWrapper.Create(Invoke, new CommandID(Group, CurrentCmdID++), IsValid, Text); _commands.Add(wrapper); Service.AddCommand(wrapper); return(wrapper); }
public void AddSort(IUserSort Sort) { MenuCommandWrapper wrapper = Factory.Create(() => Sort.Sort(TextSelection.GetSelection(Package, Sort.EmptyLineAction, out int[] poses, out NewlineType newlineType, out bool was)).ReplaceSelection(Sort.EmptyLineAction, poses, newlineType, was), Sort.Name); wrapper.SetParameter("Guid", Sort.Guid); }