Update of /cvsroot/mmclibrary/mmclibrary/MMCLib
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv23194/MMCLib
Modified Files:
BaseNode.cs SnapinBase.cs _ChangeLog.txt
Log Message:
Index: _ChangeLog.txt
===================================================================
RCS file: /cvsroot/mmclibrary/mmclibrary/MMCLib/_ChangeLog.txt,v
retrieving revision 1.20
retrieving revision 1.21
diff -C2 -d -r1.20 -r1.21
*** _ChangeLog.txt 25 Mar 2005 07:55:34 -0000 1.20
--- _ChangeLog.txt 22 Apr 2005 07:05:31 -0000 1.21
***************
*** 2,5 ****
--- 2,6 ----
- Applied patches:
[ 1168621 ] Cut And Paste Patch (1.6.5) (Thanks to Chris Osborn)
+ [ 1171903 ] BaseNode.OnAddResultPaneImages Speed improvement (Thanks to P. Di Gregorio)
Alexander Kachalkov:
Index: BaseNode.cs
===================================================================
RCS file: /cvsroot/mmclibrary/mmclibrary/MMCLib/BaseNode.cs,v
retrieving revision 1.31
retrieving revision 1.32
diff -C2 -d -r1.31 -r1.32
*** BaseNode.cs 25 Mar 2005 07:55:34 -0000 1.31
--- BaseNode.cs 22 Apr 2005 07:05:30 -0000 1.32
***************
*** 1091,1105 ****
/// called to add result pane images to the MMC
/// provided image list.
/// </summary>
/// <param name="il"></param>
public virtual void OnAddResultPaneImages(IImageList il)
{
if (ResultPaneImages != null)
ResultPaneImages.LoadImageList(il, m_iCookie);
! // Now add all the children images
foreach(BaseNode node in m_ChildNodes)
! node.OnAddResultPaneImages(il);
!
m_events.Fire(OnAddResultPaneImagesKey, this, new AddImagesArgs(il));
}
--- 1091,1109 ----
/// called to add result pane images to the MMC
/// provided image list.
+ /// Corrected P. Di Gregorio -> only load current node subnodes
/// </summary>
/// <param name="il"></param>
public virtual void OnAddResultPaneImages(IImageList il)
{
+ //Loads current node images
if (ResultPaneImages != null)
ResultPaneImages.LoadImageList(il, m_iCookie);
! // Loads this node only children images
foreach(BaseNode node in m_ChildNodes)
! {
! if (node.ResultPaneImages != null)
! node.ResultPaneImages.LoadImageList(il, node.m_iCookie);
! }
m_events.Fire(OnAddResultPaneImagesKey, this, new AddImagesArgs(il));
}
Index: SnapinBase.cs
===================================================================
RCS file: /cvsroot/mmclibrary/mmclibrary/MMCLib/SnapinBase.cs,v
retrieving revision 1.20
retrieving revision 1.21
diff -C2 -d -r1.20 -r1.21
*** SnapinBase.cs 21 Mar 2005 20:14:08 -0000 1.20
--- SnapinBase.cs 22 Apr 2005 07:05:30 -0000 1.21
***************
*** 387,392 ****
try
{
! DataObject test = (DataObject)lpDataObject;
! BaseNode node = (test == null) ? RootNode : test.Node;
// TBD: add more events and dispatch to virtual methods instead? or event fire events?
--- 387,402 ----
try
{
! //Allows this snap in to be used as an extension to another snap in
! BaseNode node = RootNode;
! try
! {
! DataObject test = (DataObject)lpDataObject;
! node = test.Node;
! }
! catch (Exception ex)
! {
! System.Diagnostics.Debug.WriteLine("Exception " + ex.Message);
! }
! //BaseNode node = (test == null) ? RootNode : test.Node;
// TBD: add more events and dispatch to virtual methods instead? or event fire events?
|