public AddCommentViewModel()
        {
            _issue = GitHubApi.Issue;

            CloseIssueCommand = new RelayCommand(OnCloseIssue, p => CanCloseIssue());
            CommentCommand = new RelayCommand(OnCommentOnIssue, p => CanCommentOnIssue());
        }
        public IssueEditorViewModel()
        {
            if (GitHubApi.Repository != null)
                _repository = GitHubApi.Repository.Repository;

            Assignees = new BindingList<User>();

            Labels = new BindingList<LabelModel>();
            foreach (var label in GitHubApi.Labels)
                Labels.Add(new LabelModel(label));

            Milestones = new BindingList<Milestone>();
            foreach (var milestone in GitHubApi.Milestones)
                Milestones.Add(milestone);

            // The lists contain non-items
            if (Labels.Count > 0) Labels.RemoveAt(0);
            if (Milestones.Count > 0) Milestones.RemoveAt(0);
            if (Milestones.Count > 0) Milestones.RemoveAt(0);

            SaveCommand = new RelayCommand(Save, p => CanSave());
            CancelCommand = new RelayCommand(Cancel, p => true);
            ClearAssigneeCommand = new RelayCommand(p => Assignee = null, p => Assignee != null);
            ClearMilestoneCommand = new RelayCommand(p => Milestone = null, p => Milestone != null);
            SetLabelsCommand = new RelayCommand(SetLabels, p => true);
            CloseLabelPickerCommand = new RelayCommand(CloseLabelPicker, p => true);
        }
 public IssueListViewModel()
 {
     RefreshCommand = new RelayCommand(p => Refresh(), p => CanRefresh());
     AddIssueCommand = new RelayCommand(p => AddIssue(), p => CanAddIssue() );
 }
 public BaseUserViewModel()
 {
     LoginCommand = new RelayCommand(p => Login(), p => true);
 }
 public LoginViewModel(ILoginView view)
 {
     _view = view;
     LogonCommand = new RelayCommand(Logon, p => CanLogon());
 }