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); }
private void initializeGitUILinks() { var storageType = ConfigurationHelper.GetPreferredStorageType(Program.Settings); bool isGitRepositoryUsed = storageType == StorageSupport.LocalCommitStorageType.FullGitRepository; bool isRepositoryAvailable = isGitRepositoryUsed && !String.IsNullOrEmpty(_repositoryPath); linkLabelOpenGitExtensions.Visible = isRepositoryAvailable && GitExtensionsIntegrationHelper.IsInstalled(); linkLabelOpenSourceTree.Visible = isRepositoryAvailable && SourceTreeIntegrationHelper.IsInstalled(); linkLabelOpenExplorer.Visible = isRepositoryAvailable; traceInformation(String.Format( "GitUI link label visibility: Git Extensions: {0}, Source Tree: {1}, Explorer: {2}", linkLabelOpenGitExtensions.Visible.ToString(), linkLabelOpenSourceTree.Visible.ToString(), linkLabelOpenExplorer.Visible.ToString())); }
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); } }
private void linkLabelOpenSourceTree_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e) { traceInformation(String.Format("Launch Source Tree for {0}", _repositoryPath)); SourceTreeIntegrationHelper.Browse(_repositoryPath); }