示例#1
0
        private async void OnDelete(object sender)
        {
            MenuItem mi = (MenuItem)sender;

            if (mi.BindingContext is IssueModel issue)
            {
                IsBusy = true;

                bool bDeleted = await Task.Run(
                    () =>
                {
                    try
                    {
                        App.Client.DeleteIssue(issue.ServerId);
                        return(Issues.Remove(issue));
                    }
                    catch (Exception ex)
                    {
                        Debug.WriteLine(ex);
                        return(false);
                    }
                });

                if (bDeleted == false)
                {
                    await CoreMethods.DisplayAlert("Failed", "Failed to remove item", "Continue");
                }

                IsBusy = false;
            }
        }
示例#2
0
 public void RemoveIssues(IEnumerable <Markup> selectetitems)
 {
     foreach (var item in selectetitems)
     {
         Utils.DeleteDirectory(Path.Combine(TempPath, item.Topic.Guid));
         Issues.Remove(item);
     }
     HasBeenSaved = false;
 }
示例#3
0
        public override void Cleanup()
        {
            var removeIssues = Issues.Values.Where(model => model.ResolutionDate.HasValue && model.ResolutionDate.Value.Date < DateTime.Today.Date).ToList();

            foreach (var jiraIssueViewModel in removeIssues)
            {
                Issues.Remove(jiraIssueViewModel.Key);
            }
            base.Cleanup();
        }
        private void DeleteIssue(object issueObject)
        {
            var issue = issueObject as IssueViewModel;

            if (issue != null)
            {
                Issues.Remove(issue);
            }

            Back();
        }
        public override void Cleanup()
        {
            var removeIssues = Issues.Values.Where(model => DateTime.Now.Subtract(model.Updated) > TimeSpan.FromDays(30)).ToList();

            foreach (var jiraIssueViewModel in removeIssues)
            {
                Issues.Remove(jiraIssueViewModel.Key);
            }

            base.Cleanup();
        }
示例#6
0
        private void Remove(object param)
        {
            int id;

            int.TryParse(param.ToString(), out id);

            var issue = Issues.FirstOrDefault(x => x.Id == id);

            if (issue != null)
            {
                Issues.Remove(issue);
                TodayIssues.Remove(issue);
                FileRepository.UpdateFile <Issue>("issue", Issues.ToList());
            }
        }
 private void DeleteIssue(Issue obj)
 {
     Issues.Remove(obj);
 }
示例#8
0
 private void OnIssueDeleted(IIssue issue)
 {
     Issues.Remove(issue);
     issue.Deleted -= () => OnIssueDeleted(issue);
 }
 public void Apply(IssueRemoved @event)
 {
     Issues.Remove(@event.IssueId);
 }
示例#10
0
 public void CompleteIssue(Issue issue)
 {
     Issues.Remove(issue);
 }