public void SetData(DirectoryDiffResults Results) { edtA.Text = Results.A.FullName; edtB.Text = Results.B.FullName; TreeA.SetData(Results, true); TreeB.SetData(Results, false); //Set a filter description if (Results.Filter == null) { lblFilter.Text = "All Files"; } else { DirectoryDiffFileFilter Filter = Results.Filter; lblFilter.Text = String.Format("{0}: {1}", Filter.Include ? "Includes" : "Excludes", Filter.FilterString); } UpdateButtons(); if (TreeA.Nodes.Count > 0) { TreeA.SelectedNode = TreeA.Nodes[0]; } }
private void TreeA_KeyDown(object sender, System.Windows.Forms.KeyEventArgs e) { //We only need to send scrolling key strokes (e.g. Ctrl+Home) //to the other tree. If we send all keystrokes then weird //things happen. For example, we already have the AfterSelect //events tied together, so when a user changes the selection //with a keystroke, we need AfterSelect to update the other //tree. If we sent all keystrokes we'd end up with a double //move of the selection. if (ScrollingKey(e)) { TreeB.SendKeyDown(e.KeyCode, e.KeyData); } }
public void ShowDifferences() { if (!CanShowDifferences) { return; } DirectoryDiffEntry Entry = SelectedEntry; string strFileA = TreeA.GetFullNameForNode(Entry.NodeA); string strFileB = TreeB.GetFullNameForNode(Entry.NodeB); ShowFileDifferences(this, new DifferenceEventArgs(strFileA, strFileB)); }
private void TreeA_MouseWheelMsg(object sender, Menees.DiffUtils.Controls.Win32MessageEventArgs e) { TreeB.SendMouseWheel(e.WParam, e.LParam); }
private void TreeA_VScroll(object sender, Menees.DiffUtils.Controls.Win32MessageEventArgs e) { TreeB.SendVScroll(e.WParam); }