void UpdateIssueList() { // Get the time at midnight DateTime Now = DateTime.Now; DateTime Midnight = (Now - Now.TimeOfDay).ToUniversalTime(); // Fetch the new issues IssueListView.BeginUpdate(); IssueListView.Items.Clear(); foreach (IssueData Issue in Issues) { if (FilterProjectName == null || Issue.Project == FilterProjectName) { ListViewItem Item = new ListViewItem(""); Item.SubItems.Add(Issue.Id.ToString()); Item.SubItems.Add(Issue.Project); Item.SubItems.Add(FormatIssueDateTime(Issue.CreatedAt.ToLocalTime(), Midnight)); Item.SubItems.Add(Issue.ResolvedAt.HasValue? FormatIssueDateTime(Issue.ResolvedAt.Value.ToLocalTime(), Midnight) : "Unresolved"); Item.SubItems.Add((Issue.Owner == null)? "-" : Utility.FormatUserName(Issue.Owner)); Item.SubItems.Add(Issue.Summary); Item.Tag = Issue; IssueListView.Items.Add(Item); } } IssueListView.EndUpdate(); // Update the maximum number of results StatusLabel.Text = (IssueListView.Items.Count == Issues.Count)? String.Format("Showing {0} results.", Issues.Count) : String.Format("Showing {0}/{1} results.", IssueListView.Items.Count, Issues.Count); }
private void viewIssuesButtonClicked(object sender, EventArgs e) { IssueListView issueListView = new IssueListView(userModel, issueModel, projectModel, projectMemberModel); Form form = FindForm("IssueListView"); if (form == null) { issueListView.Show(this); } }
private void IssueListView_MouseDoubleClick(object sender, MouseEventArgs e) { ListViewHitTestInfo HitTest = IssueListView.HitTest(e.Location); if (HitTest.Item != null) { IssueData Issue = (IssueData)HitTest.Item.Tag; ShowIssue(Issue); } }
public void ShowIssuesQuickSearch(string searchString) { this.StopLoading(); this.EnableCommand(true, this._service, Guids.COMMAND_REFRESH_ID); this._issueListView = new IssueListView(this, this._issueService, this._sprintService, true, searchString); this._historyNavigator.AddView(this._issueListView); SelectedView = this._issueListView; }
public void ShowIssuesOfFilter(Filter filter) { this.StopLoading(); this.EnableCommand(true, this._service, Guids.COMMAND_REFRESH_ID); this._issueListView = new IssueListView(this, this._issueService, this._sprintService, filter.Jql); this._historyNavigator.AddView(this._issueListView); SelectedView = this._issueListView; }
public void ShowIssuesOfProject(Project project) { this.StopLoading(); this.EnableCommand(true, this._service, Guids.COMMAND_REFRESH_ID); this._issueListView = new IssueListView(this, this._issueService, project); this._historyNavigator.AddView(this._issueListView); SelectedView = this._issueListView; }
void UpdateIssueList() { // Get the time at midnight DateTime Now = DateTime.Now; DateTime Midnight = (Now - Now.TimeOfDay).ToUniversalTime(); // Update the table int ItemIdx = 0; IssueListView.BeginUpdate(); foreach (IssueData Issue in Issues) { if (FilterProjectName == null || Issue.Project == FilterProjectName) { for (;;) { if (ItemIdx == IssueListView.Items.Count) { IssueList_InsertItem(ItemIdx, Issue, Midnight); break; } ListViewItem ExistingItem = IssueListView.Items[ItemIdx]; IssueData ExistingIssue = (IssueData)ExistingItem.Tag; if (ExistingIssue == null || ExistingIssue.Id < Issue.Id) { IssueList_InsertItem(ItemIdx, Issue, Midnight); break; } else if (ExistingIssue.Id == Issue.Id) { IssueList_UpdateItem(ExistingItem, Issue, Midnight); break; } else { IssueListView.Items.RemoveAt(ItemIdx); continue; } } ItemIdx++; } } while (ItemIdx < IssueListView.Items.Count) { IssueListView.Items.RemoveAt(ItemIdx); } IssueListView.EndUpdate(); // Update the maximum number of results StatusLabel.Text = (IssueListView.Items.Count == Issues.Count)? String.Format("Showing {0} results matching project '{1}'.", Issues.Count, FilterProjectName) : String.Format("Showing {0}/{1} results matching project '{2}'.", IssueListView.Items.Count, Issues.Count, FilterProjectName); }
private void issueListToolStripButtonClicked(object sender, EventArgs e) { IssueListView issueListView = new IssueListView(userModel, issueModel, projectModel, projectMemberModel); /* issueListView.Visible = true; * if (this.Owner != null) * this.Close();*/ Form form = FindForm("IssueListView"); if (form == null) { issueListView.ShowDialog(); } }
private void issueBarButtonItem_ItemClick(object sender, ItemClickEventArgs e) { var ch = this.MdiChildren; foreach (var form in ch) { if (form.GetType() == typeof(IssueListView)) { form.Activate(); return; } } var listView = new IssueListView(); listView.MdiParent = this; listView.ShowList(); listView.Show(); }
private void IssueListView_DrawSubItem(object sender, DrawListViewSubItemEventArgs e) { IssueData Issue = (IssueData)e.Item.Tag; if (e.ColumnIndex == IconHeader.Index) { if (!Issue.ResolvedAt.HasValue && Issue.FixChange == 0) { IssueListView.DrawIcon(e.Graphics, e.Bounds, WorkspaceControl.BadBuildIcon); } else { IssueListView.DrawIcon(e.Graphics, e.Bounds, WorkspaceControl.GoodBuildIcon); } } else { IssueListView.DrawNormalSubItem(e); } }
private void IssueListView_DrawItem(object sender, DrawListViewItemEventArgs e) { if (e.Item.Selected) { IssueListView.DrawSelectedBackground(e.Graphics, e.Bounds); } else if (e.ItemIndex == IssueListView.HoverItem) { IssueListView.DrawTrackedBackground(e.Graphics, e.Bounds); } else if (e.Item.Tag is IssueData) { IssueData Issue = (IssueData)e.Item.Tag; Color BackgroundColor; if (Issue.ResolvedAt.HasValue) { BackgroundColor = SystemColors.Window; //Color.FromArgb(248, 254, 246); } else if (Issue.FixChange > 0) { BackgroundColor = Color.FromArgb(245, 245, 245); } else { BackgroundColor = Color.FromArgb(254, 248, 246); } using (SolidBrush Brush = new SolidBrush(BackgroundColor)) { e.Graphics.FillRectangle(Brush, e.Bounds); } } else { IssueListView.DrawDefaultBackground(e.Graphics, e.Bounds); } }
void UpdateIssueList() { // Get the time at midnight DateTime Now = DateTime.Now; DateTime Midnight = (Now - Now.TimeOfDay).ToUniversalTime(); // Get the regex for the selected filter Func <IssueData, bool> Filter; if (String.IsNullOrEmpty(FilterName)) { Filter = x => true; } else if (!CustomFilters.TryGetValue(FilterName, out Filter)) { Filter = x => x.Streams == null || x.Streams.Any(y => String.Equals(y, FilterName, StringComparison.OrdinalIgnoreCase)); } // Update the table int ItemIdx = 0; IssueListView.BeginUpdate(); foreach (IssueData Issue in Issues) { if (Filter(Issue)) { for (;;) { if (ItemIdx == IssueListView.Items.Count) { IssueList_InsertItem(ItemIdx, Issue, Midnight); break; } ListViewItem ExistingItem = IssueListView.Items[ItemIdx]; IssueData ExistingIssue = (IssueData)ExistingItem.Tag; if (ExistingIssue == null || ExistingIssue.Id < Issue.Id) { IssueList_InsertItem(ItemIdx, Issue, Midnight); break; } else if (ExistingIssue.Id == Issue.Id) { IssueList_UpdateItem(ExistingItem, Issue, Midnight); break; } else { IssueListView.Items.RemoveAt(ItemIdx); continue; } } ItemIdx++; } } while (ItemIdx < IssueListView.Items.Count) { IssueListView.Items.RemoveAt(ItemIdx); } IssueListView.EndUpdate(); // Update the maximum number of results string FilterText = ""; if (!String.IsNullOrEmpty(FilterName)) { FilterText = String.Format(" matching filter '{0}'", FilterName); } StatusLabel.Text = (IssueListView.Items.Count == Issues.Count)? String.Format("Showing {0} results{1}.", Issues.Count, FilterText) : String.Format("Showing {0}/{1} results{2}.", IssueListView.Items.Count, Issues.Count, FilterText); }
private void onSpritesReady() { pendingAnalyzation = false; selectedIndex = 0; atlasSelection = new string[spriteTool.Info.Atlasses.Count]; issueListView = new IssueListView(spriteTool.Info.Issues); int i = 0; foreach(UIAtlas atlas in spriteTool.Info.Atlasses) { atlasSelection[i] = atlas.name; atlasViews[atlas.name] = new AtlasListView(spriteTool.Info.GetAtlasDataFor(atlas)); i++; } }