void InsertPendingChanges() { if (_insertedPendingChanges) { return; } _insertedPendingChanges = true; splitContainer.SuspendLayout(); splitContainer.Panel2.Controls.Clear(); Control pendingCommitsControl; /* #if DEBUG * if (!VSVersion.VS2010OrLater) #else * if (true) #endif*/ { pendingCommitsControl = pendingCommits = new PendingCommitsView(this.components); _ui = pendingCommits; } /* else * { * // Load WPF control * IPendingChangeControlFactory factory = Context.GetService<IPendingChangeControlFactory>(); * * pendingChangeControl = factory.Create(Context, this.components); * * pendingCommitsControl = pendingChangeControl.Control; * _ui = pendingChangeControl.UI; * }*/ splitContainer.Panel2.Controls.Add(pendingCommitsControl); pendingCommitsControl.Dock = changeListDummy.Dock; pendingCommitsControl.Location = changeListDummy.Location; pendingCommitsControl.Size = changeListDummy.Size; changeListDummy.Dispose(); changeListDummy = null; this.splitContainer.ResumeLayout(true); if (VSVersion.VS2012OrLater) { if (pendingCommits != null) { pendingCommits.BorderStyle = BorderStyle.None; } borderPanel.BorderStyle = BorderStyle.None; } else { } }
public PendingCommitItem(PendingCommitsView view, PendingChange change) : base(view) { if (change == null) throw new ArgumentNullException("change"); _change = change; Checked = true; RefreshText(view.Context); }
public PendingCommitItem(PendingCommitsView view, PendingChange change) : base(view) { if (change == null) throw new ArgumentNullException("change"); _change = change; //initially check only if this change does not belong to an "ignore" change list Checked = !change.IgnoreOnCommit; RefreshText(view.Context); }
private void pendingCommits_ResolveItem(object sender, PendingCommitsView.ResolveItemEventArgs e) { PendingChange pc = e.SelectionItem as PendingChange; PendingCommitItem pci; if (pc != null && this._listItems.TryGetValue(pc.FullPath, out pci)) { e.Item = pci; } }