Exemple #1
0
 /// <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();
     }
 }
Exemple #2
0
        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];
            }
        }
Exemple #3
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);
     }
 }
Exemple #4
0
        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));
        }
Exemple #5
0
 private void TreeB_MouseWheelMsg(object sender, Menees.DiffUtils.Controls.Win32MessageEventArgs e)
 {
     TreeA.SendMouseWheel(e.WParam, e.LParam);
 }
Exemple #6
0
 private void TreeB_VScroll(object sender, Menees.DiffUtils.Controls.Win32MessageEventArgs e)
 {
     TreeA.SendVScroll(e.WParam);
 }