Exemplo n.º 1
0
        public override void InitializeView(IView parent)
        {
            base.InitializeView(parent);
            Title = WindowTitle;
            Size  = viewSize;

            gitHubAuthenticationView           = gitHubAuthenticationView ?? new GitHubAuthenticationView();
            gitHubEnterpriseAuthenticationView = gitHubEnterpriseAuthenticationView ?? new GitHubEnterpriseAuthenticationView();

            try
            {
                OAuthCallbackManager.Start();
            }
            catch (Exception ex)
            {
                Logger.Trace(ex, "Error Starting OAuthCallbackManager");
            }

            gitHubAuthenticationView.InitializeView(this);
            gitHubEnterpriseAuthenticationView.InitializeView(this);

            hasGitHubDotComConnection     = Platform.Keychain.Connections.Any(HostAddress.IsGitHubDotCom);
            hasGitHubEnterpriseConnection = Platform.Keychain.Connections.Any(connection => !HostAddress.IsGitHubDotCom(connection));

            if (hasGitHubDotComConnection)
            {
                changeTab = SubTab.GitHubEnterprise;
                UpdateActiveTab();
            }
        }
Exemplo n.º 2
0
 public override void Finish(bool result)
 {
     OAuthCallbackManager.Stop();
     base.Finish(result);
 }