static private bool integrateInSourceTree() { string scriptPath = Path.GetDirectoryName(Process.GetCurrentProcess().MainModule.FileName); try { SourceTreeIntegrationHelper.AddCustomActions(scriptPath); } catch (SourceTreeIntegrationHelperException ex) { ExceptionHandlers.Handle("Cannot integrate mrHelper in Source Tree", ex); return(false); } return(true); }
static private void integrateInGitUI() { string scriptPath = Path.GetDirectoryName(Process.GetCurrentProcess().MainModule.FileName); try { GitExtensionsIntegrationHelper.AddCustomActions(scriptPath); SourceTreeIntegrationHelper.AddCustomActions(scriptPath); } catch (GitExtensionsIntegrationHelperException ex) { ExceptionHandlers.Handle("Cannot integrate mrHelper in Git Extensions", ex); } catch (SourceTreeIntegrationHelperException ex) { ExceptionHandlers.Handle("Cannot integrate mrHelper in Source Tree", ex); } }