Esempio n. 1
0
 public IssueDetailPage(Issue issue, IssuePage issuePage)
 {
     Issue     = issue;
     IssuePage = issuePage;
     Comments  = new ObservableCollection <Comment>(issue.Comments);
     InitializeComponent();
     OpenCloseIssueButton.Content = Issue.State == ItemState.Open ? "Close Issue" : "Reopen Issue";
 }
Esempio n. 2
0
        private async void OnOpenCloseIssueButtonClick(object sender, RoutedEventArgs e)
        {
            OpenCloseIssueButton.Content = Issue.State == ItemState.Open ? "Reopen Issue" : "Close Issue";

            var state = Issue.State == ItemState.Open ? "closed" : "open";

            if (await App.AppManager.Composite.ChangeIssueState(Issue, state))
            {
                Issue.State = Issue.State == ItemState.Open ? ItemState.Closed : ItemState.Open;
                IssuePage.Load();
            }
        }