本文整理汇总了C#中GitUI.GitUIEventArgs类的典型用法代码示例。如果您正苦于以下问题:C# GitUIEventArgs类的具体用法?C# GitUIEventArgs怎么用?C# GitUIEventArgs使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
GitUIEventArgs类属于GitUI命名空间,在下文中一共展示了GitUIEventArgs类的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: WrapRepoHostingCall
private void WrapRepoHostingCall(string name, IRepositoryHostPlugin gitHoster,
Action<IRepositoryHostPlugin> call)
{
if (!gitHoster.ConfigurationOk)
{
var eventArgs = new GitUIEventArgs(null, this);
gitHoster.Execute(eventArgs);
}
if (gitHoster.ConfigurationOk)
{
try
{
call(gitHoster);
}
catch (Exception ex)
{
MessageBox.Show(
string.Format("ERROR: {0} failed. Message: {1}\r\n\r\n{2}", name, ex.Message, ex.StackTrace),
"Error! :(");
}
}
}
示例2: InvokeEvent
internal static bool InvokeEvent(object sender, GitUIEventHandler gitUIEventHandler)
{
try
{
var e = new GitUIEventArgs(Instance);
if (gitUIEventHandler != null)
gitUIEventHandler(sender, e);
return !e.Cancel;
}
catch (Exception ex)
{
MessageBox.Show(ex.Message, "Exception");
}
return true;
}
示例3: InvokeEvent
internal bool InvokeEvent(object sender, IWin32Window ownerForm, GitUIEventHandler gitUIEventHandler)
{
try
{
var e = new GitUIEventArgs(ownerForm, this);
if (gitUIEventHandler != null)
gitUIEventHandler(sender, e);
return !e.Cancel;
}
catch (Exception ex)
{
MessageBox.Show(ex.Message, "Exception");
}
return true;
}
示例4: ItemClick
/// <summary>
/// Execute plugin
/// </summary>
private void ItemClick(object sender, EventArgs e)
{
var menuItem = sender as ToolStripMenuItem;
if (menuItem == null)
return;
var plugin = menuItem.Tag as IGitPlugin;
if (plugin == null)
return;
var eventArgs = new GitUIEventArgs(this, GitUICommands.Instance);
string workingDirBefore = Settings.WorkingDir;
bool refresh = plugin.Execute(eventArgs);
if (workingDirBefore != Settings.WorkingDir)
WorkingDirChanged(false);
else if (refresh)
RefreshToolStripMenuItemClick(null, null);
}
示例5: ItemClick
/// <summary>
/// Execute plugin
/// </summary>
private static void ItemClick(object sender, EventArgs e)
{
var menuItem = sender as ToolStripMenuItem;
if (menuItem == null)
return;
var plugin = menuItem.Tag as IGitPlugin;
if (plugin == null)
return;
var eventArgs = new GitUIEventArgs(GitUICommands.Instance);
plugin.Execute(eventArgs);
}
示例6: ItemClick
/// <summary>
/// Execute plugin
/// </summary>
private void ItemClick(object sender, EventArgs e)
{
var menuItem = sender as ToolStripMenuItem;
if (menuItem == null)
return;
var plugin = menuItem.Tag as IGitPlugin;
if (plugin == null)
return;
var eventArgs = new GitUIEventArgs(this, UICommands);
bool refresh = plugin.Execute(eventArgs);
if (refresh)
RefreshToolStripMenuItemClick(null, null);
}
示例7: item_Click
void item_Click(object sender, EventArgs e)
{
ToolStripMenuItem menuItem = sender as ToolStripMenuItem;
if (menuItem != null)
{
IGitPlugin plugin = menuItem.Tag as IGitPlugin;
if (plugin != null)
{
GitUIEventArgs eventArgs = new GitUIEventArgs(GitUICommands.Instance);
plugin.Execute(eventArgs);
}
}
}
示例8: InvokeEvent
internal static bool InvokeEvent(GitUIEventHandler gitUIEventHandler)
{
try
{
GitUIEventArgs e = new GitUIEventArgs(GitUICommands.Instance);
if (gitUIEventHandler != null)
gitUIEventHandler.Invoke(e);
return !e.Cancel;
}
catch (Exception ex)
{
MessageBox.Show(ex.Message, "Exception");
}
return true;
}