protected override void OnVisibleChanged(EventArgs e) { base.OnVisibleChanged(e); if (Visible && Platform.IsMono) { // Workaround: make sure the ListView headers are drawn Util.Invoke(ChangesListView, () => ChangesListView.EndUpdate()); } }
private void PopulateChanges(string UserName, List <PerforceDescribeRecord> Changes) { if (!IsDisposed) { ChangesListView.BeginUpdate(); ChangesListView.Items.Clear(); if (Changes != null) { foreach (PerforceDescribeRecord Change in Changes) { if (Change.Description != null && Change.Description.IndexOf("#ROBOMERGE-SOURCE", 0) == -1) { string Stream = ""; if (Change.Files.Count > 0) { string DepotFile = Change.Files[0].DepotFile; int Idx = 0; for (int Count = 0; Idx < DepotFile.Length; Idx++) { if (DepotFile[Idx] == '/' && ++Count >= 4) { break; } } Stream = DepotFile.Substring(0, Idx); } ListViewItem Item = new ListViewItem(""); Item.Tag = Change; Item.SubItems.Add(Change.ChangeNumber.ToString()); Item.SubItems.Add(Stream); Item.SubItems.Add(Change.Description.Replace('\n', ' ')); ChangesListView.Items.Add(Item); } } } ChangesListView.EndUpdate(); } }