本文整理汇总了C#中Plugin.AddMenuCommand方法的典型用法代码示例。如果您正苦于以下问题:C# Plugin.AddMenuCommand方法的具体用法?C# Plugin.AddMenuCommand怎么用?C# Plugin.AddMenuCommand使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Plugin
的用法示例。
在下文中一共展示了Plugin.AddMenuCommand方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: OnConnection
//.........这里部分代码省略.........
GitPlugin.RegisterCommand("GitExtensionsPull", new ToolbarCommand<Pull>());
GitPlugin.RegisterCommand("GitExtensionsPush", new ToolbarCommand<Push>());
GitPlugin.RegisterCommand("GitExtensionsRebase", new ToolbarCommand<Rebase>());
GitPlugin.RegisterCommand("GitExtensionsRevert", new ToolbarCommand<Revert>());
GitPlugin.RegisterCommand("GitExtensionsMerge", new ToolbarCommand<Merge>());
GitPlugin.RegisterCommand("GitExtensionsCherryPick", new ToolbarCommand<Cherry>());
GitPlugin.RegisterCommand("GitExtensionsStash", new ToolbarCommand<Stash>());
GitPlugin.RegisterCommand("GitExtensionsSettings", new ToolbarCommand<Settings>());
GitPlugin.RegisterCommand("GitExtensionsSolveMergeConflicts", new ToolbarCommand<SolveMergeConflicts>());
GitPlugin.RegisterCommand("GitExtensionsApplyPatch", new ToolbarCommand<ApplyPatch>());
GitPlugin.RegisterCommand("GitExtensionsAbout", new ToolbarCommand<About>());
GitPlugin.RegisterCommand("GitExtensionsBash", new ToolbarCommand<Bash>());
GitPlugin.RegisterCommand("GitExtensionsGitIgnore", new ToolbarCommand<GitIgnore>());
GitPlugin.RegisterCommand("GitExtensionsRemotes", new ToolbarCommand<Remotes>());
}
catch (Exception ex)
{
string s = ex.Message;
}
try
{
// add the toolbar and menu commands
CommandBar commandBar = GitPlugin.AddCommandBar("GitExtensions", MsoBarPosition.msoBarTop);
GitPlugin.AddToolbarCommandWithText(commandBar, "GitExtensionsCommit", "Commit", "Commit changes", 7, 1);
GitPlugin.AddToolbarCommand(commandBar, "GitExtensionsBrowse", "Browse", "Browse repository", 12, 2);
GitPlugin.AddToolbarCommand(commandBar, "GitExtensionsPull", "Pull", "Pull changes from remote repository", 9, 3);
GitPlugin.AddToolbarCommand(commandBar, "GitExtensionsPush", "Push", "Push changes to remote repository", 8, 4);
GitPlugin.AddToolbarCommand(commandBar, "GitExtensionsStash", "Stash", "Stash changes", 3, 5);
GitPlugin.AddToolbarCommand(commandBar, "GitExtensionsSettings", "Settings", "Settings", 2, 6);
}
catch (Exception ex)
{
string s = ex.Message;
}
try
{
int n = 1;
GitPlugin.AddPopupCommand(toolsPopup, "GitExtensionsApplyPatch", "Apply patch", "Apply patch", 0, n++);
GitPlugin.AddPopupCommand(toolsPopup, "GitExtensionsBrowse", "Browse", "Browse repository", 12, n++);
GitPlugin.AddPopupCommand(toolsPopup, "GitExtensionsSwitchBranch", "Checkout branch", "Switch to branch", 10, n++);
GitPlugin.AddPopupCommand(toolsPopup, "GitExtensionsCherryPick", "Cherry pick", "Cherry pick commit", 11, n++);
GitPlugin.AddPopupCommand(toolsPopup, "GitExtensionsCommit", "Commit", "Commit changes", 7, n++);
GitPlugin.AddPopupCommand(toolsPopup, "GitExtensionsCreateBranch", "Create branch", "Create new branch", 10, n++);
GitPlugin.AddPopupCommand(toolsPopup, "GitExtensionsClone", "Clone repository", "Clone existing Git", 14, n++);
GitPlugin.AddPopupCommand(toolsPopup, "GitExtensionsGitIgnore", "Edit .gitignore", "Edit .gitignore file", 0, n++);
GitPlugin.AddPopupCommand(toolsPopup, "GitExtensionsFormatPatch", "Format patch", "Format patch", 0, n++);
GitPlugin.AddPopupCommand(toolsPopup, "GitExtensionsBash", "Git bash", "Start git bash", 0, n++);
GitPlugin.AddPopupCommand(toolsPopup, "GitExtensionsInitRepository", "Initialize new repository", "Initialize new Git repository", 13, n++);
GitPlugin.AddPopupCommand(toolsPopup, "GitExtensionsRemotes", "Manage remotes", "Manage remote repositories", 0, n++);
GitPlugin.AddPopupCommand(toolsPopup, "GitExtensionsMerge", "Merge", "merge", 0, n++);
GitPlugin.AddPopupCommand(toolsPopup, "GitExtensionsPull", "Pull changes", "Pull changes from remote repository", 9, n++);
GitPlugin.AddPopupCommand(toolsPopup, "GitExtensionsPush", "Push changes", "Push changes to remote repository", 8, n++);
GitPlugin.AddPopupCommand(toolsPopup, "GitExtensionsRebase", "Rebase", "Rebase", 0, n++);
GitPlugin.AddPopupCommand(toolsPopup, "GitExtensionsStash", "Stash changes", "Stash changes", 3, n++);
GitPlugin.AddPopupCommand(toolsPopup, "GitExtensionsSettings", "Settings", "Settings", 2, n++);
GitPlugin.AddPopupCommand(toolsPopup, "GitExtensionsSolveMergeConflicts", "Solve mergeconflicts", "Solve mergeconflicts", 0, n++);
GitPlugin.AddPopupCommand(toolsPopup, "GitExtensionsDiff", "View changes", "View commit change history", 0, n++);
GitPlugin.AddPopupCommand(toolsPopup, "GitExtensionsAbout", "About Git Extensions", "About Git Extensions", 0, n++);
}
catch (Exception ex)
{
string s = ex.Message;
}
try
{
GitPlugin.AddMenuCommand("Item", "GitExtensionsFileHistory", "File history", "Show file history", 6, 4);
GitPlugin.AddMenuCommand("Item", "GitExtensionsRevert", "Undo file changes", "Undo changes made to this file", 4, 5);
}
catch (Exception ex)
{
string s = ex.Message;
}
try
{
GitPlugin.AddMenuCommand("Easy MDI Document Window", "GitExtensionsFileHistory", "File history", "Show file history", 6, 4);
GitPlugin.AddMenuCommand("Easy MDI Document Window", "GitExtensionsRevert", "Undo file changes", "Undo changes made to this file", 4, 5);
}
catch (Exception ex)
{
string s = ex.Message;
}
try
{
GitPlugin.AddMenuCommand("Code Window", "GitExtensionsFileHistory", "File history", "Show file history", 6, 10);
GitPlugin.AddMenuCommand("Code Window", "GitExtensionsRevert", "Undo file changes", "Undo changes made to this file", 4, 11);
}
catch (Exception ex)
{
string s = ex.Message;
}
}
catch (Exception ex)
{
string s = ex.Message;
}
}