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"; }
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(); } }