public CreateIssueViewModel(GitHubApi githubApi, IGitHubSettings settings)
 {
     this.githubApi = githubApi;
     this.settings = settings;
     Repositories = new ObservableCollection<RepositoryModel>();
     CreateIssueCommand = new DelegateCommand(CreateIssue);
 }
예제 #2
0
 public CreateIssueViewModel(GitHubApi githubApi, IGitHubSettings settings)
 {
     this.githubApi     = githubApi;
     this.settings      = settings;
     Repositories       = new ObservableCollection <RepositoryModel>();
     CreateIssueCommand = new DelegateCommand(CreateIssue);
 }
예제 #3
0
 public SettingsViewModel(GitHubApi githubApi, IGitHubSettings settings)
 {
     this.githubApi           = githubApi;
     this.settings            = settings;
     LoginCommand             = new DelegateCommand <PasswordBox>(Login, p => !LoggingIn);
     CancelCommand            = new DelegateCommand(() => OnClose());
     ClearLoginDetailsCommand = new DelegateCommand(ClearLoginDetails);
 }
 public SettingsViewModel(GitHubApi githubApi, IGitHubSettings settings)
 {
     this.githubApi = githubApi;
     this.settings = settings;
     LoginCommand = new DelegateCommand<PasswordBox>(Login, p => !LoggingIn);
     CancelCommand = new DelegateCommand(() => OnClose());
     ClearLoginDetailsCommand = new DelegateCommand(ClearLoginDetails);
 }
예제 #5
0
        public GitHubService(IGitHubSettings settings)
        {
            if (String.IsNullOrEmpty(settings.Username))
            {
                return;
            }
            var basicAuth = new Credentials(settings.Username, settings.Password);

            gitHubClient             = new GitHubClient(new ProductHeaderValue("scribs"));
            gitHubClient.Credentials = basicAuth;
        }