private void issueChanged(object sender, IssueChangedEventArgs e)
 {
     if (CurrentActiveIssue == null)
     {
         return;
     }
     if (!e.Issue.Key.Equals(CurrentActiveIssue.Key) ||
         !e.Issue.Server.GUID.ToString().Equals(CurrentActiveIssue.ServerGuid))
     {
         return;
     }
     ++generation;
     loadActiveIssueDetails();
 }
        protected override void modelIssueChanged(object sender, IssueChangedEventArgs e)
        {
            foreach (var node in nodes)
            {
                if (GroupSubtasksUnderParent && e.Issue.IsSubtask)
                {
                    if (!node.Issue.Key.Equals(e.Issue.ParentKey))
                    {
                        continue;
                    }

                    foreach (IssueNode subNode in node.SubtaskNodes)
                    {
                        if (subNode.Issue.Id != e.Issue.Id)
                        {
                            continue;
                        }

                        subNode.Issue = e.Issue;
                        if (TreeAboutToChange != null)
                        {
                            TreeAboutToChange(this, new EventArgs());
                        }
                        if (NodesChanged != null)
                        {
                            NodesChanged(this, new TreeModelEventArgs(new TreePath(node), new object[] { subNode }));
                        }
                        return;
                    }
                }

                if (node.Issue.Id != e.Issue.Id)
                {
                    continue;
                }

                node.Issue = e.Issue;

                if (TreeAboutToChange != null)
                {
                    TreeAboutToChange(this, new EventArgs());
                }
                if (NodesChanged != null)
                {
                    NodesChanged(this, new TreeModelEventArgs(TreePath.Empty, new object[] { node }));
                }

                return;
            }
        }
Beispiel #3
0
        protected override void modelIssueChanged(object sender, IssueChangedEventArgs e)
        {
            foreach (var groupNode in getGroupNodes())
            {
                if (GroupSubtasksUnderParent && e.Issue.IsSubtask)
                {
                    foreach (var issueNode in groupNode.IssueNodes)
                    {
                        if (!issueNode.Issue.Key.Equals(e.Issue.ParentKey))
                        {
                            continue;
                        }
                        if (issueNode.SubtaskNodes == null)
                        {
                            continue;
                        }
                        foreach (IssueNode subNode in issueNode.SubtaskNodes)
                        {
                            if (subNode.Issue.Id != e.Issue.Id)
                            {
                                continue;
                            }

                            subNode.Issue = e.Issue;

                            if (TreeAboutToChange != null)
                            {
                                TreeAboutToChange(this, new EventArgs());
                            }

                            if (NodesChanged != null)
                            {
                                NodesChanged(this, new TreeModelEventArgs(new TreePath(new object[] { groupNode, issueNode }), new object[] { subNode }));
                            }
                            return;
                        }
                    }
                }
                foreach (var issueNode in groupNode.IssueNodes)
                {
                    if (issueNode.Issue.Id != e.Issue.Id)
                    {
                        continue;
                    }

                    if (TreeAboutToChange != null)
                    {
                        TreeAboutToChange(this, new EventArgs());
                    }

                    if (findGroupNode(e.Issue) != groupNode)
                    {
                        fillModel(Model.Issues);
                    }
                    else if (NodesChanged != null)
                    {
                        issueNode.Issue = e.Issue;
                        NodesChanged(this, new TreeModelEventArgs(new TreePath(groupNode), new object[] { issueNode }));
                    }
                    return;
                }
            }
        }
 protected abstract void modelIssueChanged(object sender, IssueChangedEventArgs e);