/// <summary> /// 销毁方法 /// </summary> public override void Dispose() { if (!IsDisposed) { if (m_indicatorService != null) { m_indicatorService.UnRegisterListener(m_indicatorService.OperatorRequestID, m_indicatorDataCallBackEvent); m_indicatorDataCallBackEvent = null; m_indicatorService = null; } if (m_tvList != null) { m_tvList.UnRegisterEvent(m_gridSelectedRowsChangedEvent, EVENTID.GRIDSELECTEDROWSCHANGED); m_gridSelectedRowsChangedEvent = null; m_tvList = null; } if (m_window != null) { m_window.UnRegisterEvent(m_invokeEvent, EVENTID.INVOKE); m_invokeEvent = null; m_window.UnRegisterEvent(m_timerEvent, EVENTID.TIMER); m_timerEvent = null; m_window.Close(); m_window.Dispose(); m_window = null; } base.Dispose(); } }
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 TreeB_KeyDown(object sender, System.Windows.Forms.KeyEventArgs e) { //See note in TreeA_KeyDown. if (ScrollingKey(e)) { TreeA.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 TreeB_MouseWheelMsg(object sender, Menees.DiffUtils.Controls.Win32MessageEventArgs e) { TreeA.SendMouseWheel(e.WParam, e.LParam); }
private void TreeB_VScroll(object sender, Menees.DiffUtils.Controls.Win32MessageEventArgs e) { TreeA.SendVScroll(e.WParam); }