mmclibrary-cvs Mailing List for MMC .NET Library (Page 5)
Brought to you by:
imjimmurphy,
kachalkov
You can subscribe to this list here.
2004 |
Jan
|
Feb
|
Mar
(17) |
Apr
(96) |
May
(15) |
Jun
(1) |
Jul
(43) |
Aug
(4) |
Sep
(11) |
Oct
(8) |
Nov
(15) |
Dec
(9) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2005 |
Jan
(31) |
Feb
|
Mar
(24) |
Apr
(6) |
May
|
Jun
(2) |
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2006 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
(1) |
Oct
|
Nov
|
Dec
|
From: Lesley v. Z. <ex...@us...> - 2004-09-01 13:01:17
|
Update of /cvsroot/mmclibrary/mmclibrary/MMCLib2/Nodes In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv9841 Modified Files: ReportNode.cs Log Message: part of huge commit because I am getting a new laptop changed the onshow to onresultshow Index: ReportNode.cs =================================================================== RCS file: /cvsroot/mmclibrary/mmclibrary/MMCLib2/Nodes/ReportNode.cs,v retrieving revision 1.18 retrieving revision 1.19 diff -C2 -d -r1.18 -r1.19 *** ReportNode.cs 22 Jul 2004 14:07:04 -0000 1.18 --- ReportNode.cs 1 Sep 2004 13:01:00 -0000 1.19 *************** *** 317,321 **** { this.m_currentSelectedItems[i].OnSelect(); ! if(this.m_currentSelectedItems[i].PropertyPages.Count != 0) { havePropertyPage = true; --- 317,321 ---- { this.m_currentSelectedItems[i].OnSelect(); ! if(havePropertyPage && this.m_currentSelectedItems[i].PropertyPages.Count != 0) { havePropertyPage = true; *************** *** 499,503 **** /// with column information and data /// </summary> ! public override void OnShow() { m_Console = m_Snapin.ResultViewConsole; --- 499,503 ---- /// with column information and data /// </summary> ! public override void OnResultShow() { m_Console = m_Snapin.ResultViewConsole; *************** *** 511,515 **** ResultData.SetViewMode(this.GetViewType()); ! base.OnShow(); } --- 511,515 ---- ResultData.SetViewMode(this.GetViewType()); ! base.OnResultShow(); } |
From: Lesley v. Z. <ex...@us...> - 2004-09-01 13:00:19
|
Update of /cvsroot/mmclibrary/mmclibrary/MMCLib2/Nodes In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv9580 Modified Files: FolderNode.cs Log Message: part of huge commit because I am getting a new laptop changed the onshow to onresultshow Index: FolderNode.cs =================================================================== RCS file: /cvsroot/mmclibrary/mmclibrary/MMCLib2/Nodes/FolderNode.cs,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** FolderNode.cs 22 Apr 2004 12:31:35 -0000 1.2 --- FolderNode.cs 1 Sep 2004 13:00:02 -0000 1.3 *************** *** 44,48 **** /// in the right pane, for the respective node item selected in the left pane. /// </summary> ! public override void OnShow() { IConsole2 console = Snapin.ResultViewConsole; --- 44,48 ---- /// in the right pane, for the respective node item selected in the left pane. /// </summary> ! public override void OnResultShow() { IConsole2 console = Snapin.ResultViewConsole; *************** *** 56,60 **** rdata.SetViewMode((int)ViewMode.Report); ! base.OnShow(); } --- 56,60 ---- rdata.SetViewMode((int)ViewMode.Report); ! base.OnResultShow(); } |
From: Lesley v. Z. <ex...@us...> - 2004-09-01 12:59:54
|
Update of /cvsroot/mmclibrary/mmclibrary/MMCLib2/Nodes In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv9468 Modified Files: DataTableNode.cs Log Message: part of huge commit because I am getting a new laptop changed the onshow to onresultshow Index: DataTableNode.cs =================================================================== RCS file: /cvsroot/mmclibrary/mmclibrary/MMCLib2/Nodes/DataTableNode.cs,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** DataTableNode.cs 22 Jul 2004 14:07:04 -0000 1.2 --- DataTableNode.cs 1 Sep 2004 12:59:31 -0000 1.3 *************** *** 127,131 **** /// with column information and data /// </summary> ! public override void OnShow() { m_Console = m_Snapin.ResultViewConsole; --- 127,131 ---- /// with column information and data /// </summary> ! public override void OnResultShow() { m_Console = m_Snapin.ResultViewConsole; *************** *** 146,150 **** ResultData.SetViewMode(this.GetViewType()); ! base.OnShow(); } --- 146,150 ---- ResultData.SetViewMode(this.GetViewType()); ! base.OnResultShow(); } |
From: Lesley v. Z. <ex...@us...> - 2004-09-01 12:58:46
|
Update of /cvsroot/mmclibrary/mmclibrary/MMCLib2/Nodes In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv9243 Modified Files: BaseNode.cs Log Message: part of huge commit because I am getting a new laptop added the insertChildrenwithplussign hack changed the onshow keys to have both select and deselect commented the modalpropertypage out because there is already a property for that kind of behaviour Index: BaseNode.cs =================================================================== RCS file: /cvsroot/mmclibrary/mmclibrary/MMCLib2/Nodes/BaseNode.cs,v retrieving revision 1.22 retrieving revision 1.23 diff -C2 -d -r1.22 -r1.23 *** BaseNode.cs 22 Jul 2004 14:07:04 -0000 1.22 --- BaseNode.cs 1 Sep 2004 12:58:30 -0000 1.23 *************** *** 147,151 **** private bool _ShowModalPropertySheet; ! //Added by Lesley van Zijl /// <summary> /// Used to set/get the Paste verb --- 147,156 ---- private bool _ShowModalPropertySheet; ! /// <summary> ! /// Variable to override default behaviour of InsertChildren ! /// </summary> ! private bool _alwaysInsertWithPlusSign = false; ! ! //Added by Lesley van Zijl /// <summary> /// Used to set/get the Paste verb *************** *** 590,593 **** --- 595,610 ---- get { return m_ChildNodes; } } + + // added by Marat Bakirov (bmf) + /// <summary> + /// Overwrite default InsertChildren behaviour, with this set the scopenodes will + /// Always insert scopenodes with the plus sign visible, even if there are no child nodes. + /// <seealso cref="InsertChildren"/> + /// </summary> + public bool AlwaysInsertWithPlusSign + { + get {return _alwaysInsertWithPlusSign;} + set {_alwaysInsertWithPlusSign = value;} + } #endregion *************** *** 725,730 **** protected static object OnSelectResultKey = new object(); protected static object OnDeselectResultKey = new object(); ! protected static object OnShowKey = new object(); ! protected static object OnViewChangeScopeKey = new object(); protected static object OnViewChangeResultKey = new object(); protected static object OnContextHelpKey = new object(); --- 742,748 ---- protected static object OnSelectResultKey = new object(); protected static object OnDeselectResultKey = new object(); ! protected static object OnResultShowKey = new object(); ! protected static object OnResultChangeKey = new object(); ! protected static object OnViewChangeScopeKey = new object(); protected static object OnViewChangeResultKey = new object(); protected static object OnContextHelpKey = new object(); *************** *** 990,995 **** { foreach (BaseNode node in m_ChildNodes) ! node.Insert(this,node.Children.Count > 0); ! } /// <summary> --- 1008,1013 ---- { foreach (BaseNode node in m_ChildNodes) ! node.Insert(this, node.Children.Count > 0 || node.AlwaysInsertWithPlusSign); ! } /// <summary> *************** *** 1090,1111 **** } ! //Added by Alexander Kachalkov ! /// <summary> ! /// This function will create MODAL property sheet pages based ! /// on the information stored in its m_propertyPages field. ! /// It registers the property page along with the callback ! /// functions. ! /// Use it while creating NEW node ! /// </summary> ! /// <param name="lpProvider"></param> ! /// <param name="handle"></param> ! /// <param name="displayName"></param> ! public void CreatePropertyPagesModal(IPropertySheetCallback lpProvider, IntPtr handle, string displayName) ! { ! if (this.m_propSheet == null || m_propSheet.isClosed) ! CreatePropertySheet(displayName); ! else ! m_propSheet.Activate(); ! } //Added by Alexander Kachalkov --- 1108,1130 ---- } ! // commented out because it's already implemented by CreatePropertyPages and ShowModalPropertySheet ! // //Added by Alexander Kachalkov ! // /// <summary> ! // /// This function will create MODAL property sheet pages based ! // /// on the information stored in its m_propertyPages field. ! // /// It registers the property page along with the callback ! // /// functions. ! // /// Use it while creating NEW node ! // /// </summary> ! // /// <param name="lpProvider"></param> ! // /// <param name="handle"></param> ! // /// <param name="displayName"></param> ! // public void CreatePropertyPagesModal(IPropertySheetCallback lpProvider, IntPtr handle, string displayName) ! // { ! // if (this.m_propSheet == null || m_propSheet.isClosed) ! // CreatePropertySheet(displayName); ! // else ! // m_propSheet.Activate(); ! // } //Added by Alexander Kachalkov *************** *** 1122,1143 **** public void CreatePropertyPages(IPropertySheetCallback lpProvider, IntPtr handle, string displayName) { ! if (this.m_propSheet == null || m_propSheet.isClosed) ! // We need to spin off a new thread for this. ! // Why? ! // For winforms forms to work correctly (including accelerators, etc) ! // we need to use a winforms message pump. We can accomplish that ! // by showing our form using Form.ShowDialog(). ! // However, this blocks the thread's execution until the dialog ! // is dismissed. We'll get around this by spinning off another thread ! // to handle the form. ! ! //Changed by Alexander Kachalkov ! if (ShowModalPropertySheet) ! CreatePropertySheet(displayName); ! else ! ThreadPool.QueueUserWorkItem(new WaitCallback(CreatePropertySheet), DisplayName); ! else ! m_propSheet.Activate(); ! } //Added by Alexander Kachalkov --- 1141,1167 ---- public void CreatePropertyPages(IPropertySheetCallback lpProvider, IntPtr handle, string displayName) { ! if (this.m_propSheet == null || m_propSheet.isClosed) ! { ! // Use the BaseNode.PropertySheetTitle as the displayname if it's set. ! if (PropertySheetTitle != null) ! displayName = PropertySheetTitle; ! ! // We need to spin off a new thread for this. ! // Why? ! // For winforms forms to work correctly (including accelerators, etc) ! // we need to use a winforms message pump. We can accomplish that ! // by showing our form using Form.ShowDialog(). ! // However, this blocks the thread's execution until the dialog ! // is dismissed. We'll get around this by spinning off another thread ! // to handle the form. ! //Changed by Alexander Kachalkov ! if (ShowModalPropertySheet) ! CreatePropertySheet(displayName); ! else ! ThreadPool.QueueUserWorkItem(new WaitCallback(CreatePropertySheet), displayName); ! } ! else ! m_propSheet.Activate(); ! } //Added by Alexander Kachalkov *************** *** 1518,1527 **** /// Show the Node /// </summary> ! public virtual void OnShow() { ! m_events.Fire(OnShowKey, this, null); } ! //Added by Alexander Kachalkov /// <summary> /// Called when ToolBar button pressed --- 1542,1556 ---- /// Show the Node /// </summary> ! public virtual void OnResultShow() { ! m_events.Fire(OnResultShowKey, this, null); } ! public virtual void OnResultChange() ! { ! m_events.Fire(OnResultChangeKey, this, null); ! } ! ! //Added by Alexander Kachalkov /// <summary> /// Called when ToolBar button pressed *************** *** 1777,1782 **** public event NodeNotificationHandler OnShowEvent { ! add { m_events.AddHandler(OnShowKey, value); } ! remove { m_events.RemoveHandler(OnShowKey, value); } } --- 1806,1811 ---- public event NodeNotificationHandler OnShowEvent { ! add { m_events.AddHandler(OnResultShowKey, value); } ! remove { m_events.RemoveHandler(OnResultShowKey, value); } } *************** *** 1922,1926 **** else { ! // No multiselection in the resultpane IEnumerator myEnumerator = this.Snapin.SelectedViewItems.GetEnumerator(); while ( myEnumerator.MoveNext() ) --- 1951,1955 ---- else { ! // No multiselection in the resultpane yet IEnumerator myEnumerator = this.Snapin.SelectedViewItems.GetEnumerator(); while ( myEnumerator.MoveNext() ) *************** *** 1999,2012 **** // Icon Handling // ! #region Icon handling ! /// <summary> /// Get all possible images for this result view. /// Items in the result-view for this node should only /// access images from the images returned by this call. /// </summary> ! public virtual string[] ResultViewImages { ! get { return null; } ! } /// <summary> --- 2028,2050 ---- // Icon Handling // ! #region Icon handling ! ! protected ArrayList m_resultViewImages = null; ! /// <summary> /// Get all possible images for this result view. /// Items in the result-view for this node should only /// access images from the images returned by this call. /// </summary> ! public virtual ArrayList ResultViewImages { ! get ! { ! if(m_resultViewImages == null) ! m_resultViewImages = new ArrayList(); ! ! return m_resultViewImages; ! } ! set { m_resultViewImages = value; } ! } /// <summary> *************** *** 2016,2031 **** public virtual void OnAddResultPaneImages(IImageList il) { ! string[] images = this.ResultViewImages; ! if(images != null) { ! if(ResultPaneImages == null) ! { ! ResultPaneImages = new ImageList(); ! } ! ! for(int i=0; i<images.Length; i++) ! { ! ResultPaneImages.Add(images[i]); ! } } if (ResultPaneImages != null) --- 2054,2066 ---- public virtual void OnAddResultPaneImages(IImageList il) { ! ArrayList images = this.ResultViewImages; ! if(ResultPaneImages == null) { ! ResultPaneImages = new ImageList(); ! } ! ! for(int i=0,max=images.Count; i<max; i++) ! { ! ResultPaneImages.Add(images[i]); } if (ResultPaneImages != null) *************** *** 2157,2160 **** } #endregion ! } } --- 2192,2197 ---- } #endregion ! ! ! } } |
From: Lesley v. Z. <ex...@us...> - 2004-09-01 12:49:36
|
Update of /cvsroot/mmclibrary/mmclibrary/MMCLib2/Core In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv7689 Modified Files: SnapinBase.cs Log Message: part of huge commit because I am getting a new laptop made some functions virtual and updated comments Index: SnapinBase.cs =================================================================== RCS file: /cvsroot/mmclibrary/mmclibrary/MMCLib2/Core/SnapinBase.cs,v retrieving revision 1.17 retrieving revision 1.18 diff -C2 -d -r1.17 -r1.18 *** SnapinBase.cs 22 Jul 2004 14:07:04 -0000 1.17 --- SnapinBase.cs 1 Sep 2004 12:49:27 -0000 1.18 *************** *** 309,312 **** --- 309,313 ---- return GetSelectedItem(ResultData, -1); // nIndex == -1 to start at first item } + /// <summary> /// Overridable helper method to GetSelectedItem *************** *** 333,336 **** --- 334,338 ---- // I think it's because nothing is selected yet // that's why we catch the exception and won't handle it + // maybe it's better to return null } //out *************** *** 591,606 **** /// TBD: call Dispose - after that pattern is more pervaisivly used /// </summary> ! public void Destroy() { } ! // Lesley v. Zijl: made virtual. ! /// <summary> ! /// When MMC wants a data object for a specific node ! /// </summary> ! /// <param name="cookie"></param> ! /// <param name="type"></param> ! /// <param name="ppDataObject"></param> ! public virtual void QueryDataObject(int cookie, uint type, out IDataObject ppDataObject) { if(type == (uint)CCT.SNAPIN_MANAGER && showSnapinManager) --- 593,608 ---- /// TBD: call Dispose - after that pattern is more pervaisivly used /// </summary> ! public virtual void Destroy() { } ! /// <summary> ! /// The IComponentData::QueryDataObject method returns a data object that can be used to retrieve ! /// the context information for the specified cookie. ! /// </summary> ! /// <param name="cookie">Specifies the unique identifier for which the data object is required.</param> ! /// <param name="type">Specifies the data object as one of the members of the CCT enum</param> ! /// <param name="ppDataObject">Pointer to the address of the returned data object</param> ! public virtual void QueryDataObject(int cookie, uint type, out IDataObject ppDataObject) { if(type == (uint)CCT.SNAPIN_MANAGER && showSnapinManager) *************** *** 948,953 **** /// </summary> /// <param name="pStm"></param> ! public void Load(UCOMIStream pStm) { ! try { System.Diagnostics.Debug.WriteLine("Load"); ComStream cs = new ComStream(pStm); --- 950,956 ---- /// </summary> /// <param name="pStm"></param> ! public void Load(UCOMIStream pStm) ! { ! try { System.Diagnostics.Debug.WriteLine("Load"); ComStream cs = new ComStream(pStm); *************** *** 967,972 **** /// <param name="pStm"></param> /// <param name="fClearDirty"></param> ! public void Save(UCOMIStream pStm, [In, MarshalAs(UnmanagedType.Bool)] bool fClearDirty) { ! try { System.Diagnostics.Debug.WriteLine("Save"); ComStream cs = new ComStream(pStm); --- 970,976 ---- /// <param name="pStm"></param> /// <param name="fClearDirty"></param> ! public void Save(UCOMIStream pStm, [In, MarshalAs(UnmanagedType.Bool)] bool fClearDirty) ! { ! try { System.Diagnostics.Debug.WriteLine("Save"); ComStream cs = new ComStream(pStm); |
From: Lesley v. Z. <ex...@us...> - 2004-09-01 12:41:00
|
Update of /cvsroot/mmclibrary/mmclibrary/MMCLib2/Core In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv6348 Modified Files: Component.cs Log Message: part of huge commit because I am getting a new laptop extracted all notifies into their own virtual method Index: Component.cs =================================================================== RCS file: /cvsroot/mmclibrary/mmclibrary/MMCLib2/Core/Component.cs,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -d -r1.14 -r1.15 *** Component.cs 22 Jul 2004 14:07:04 -0000 1.14 --- Component.cs 1 Sep 2004 12:40:34 -0000 1.15 *************** *** 90,111 **** get{return m_MultiSelectionMode;} } - #endregion - - ////////////////////////////////////////////////////////////// - // - // Implementation - // - #region - [...1149 lines suppressed...] BaseNode node = null; --- 1074,1078 ---- /// <param name="piCallback"></param> /// <param name="pInsertionAllowed"></param> ! public virtual void AddMenuItems(IntPtr piDataObject, IContextMenuCallback piCallback, ref int pInsertionAllowed) { BaseNode node = null; *************** *** 676,680 **** else { ! // The piDataObject is really a DataObject is disguise.... item = (DataObject)iDataObject; } --- 1099,1103 ---- else { ! // The piDataObject is really a DataObject in disguise.... item = (DataObject)iDataObject; } |
From: Lesley v. Z. <ex...@us...> - 2004-09-01 12:36:27
|
Update of /cvsroot/mmclibrary/mmclibrary/MMCLib2/Core In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv5430 Modified Files: About.cs Log Message: part of huge commit because I am getting a new laptop my wincvs says something is changed, so just to be safe Index: About.cs =================================================================== RCS file: /cvsroot/mmclibrary/mmclibrary/MMCLib2/Core/About.cs,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** About.cs 22 Jul 2004 14:07:04 -0000 1.5 --- About.cs 1 Sep 2004 12:35:38 -0000 1.6 *************** *** 9,268 **** namespace Ironring.MMC.Core { ! /// <summary> ! /// Provides information to add Snapin dialog about the snapin. ! /// Also used in snapin registration. Implements ISnapinAbout ! /// to communicate with MMC. ! /// </summary> ! public class About : ISnapinAbout ! { ! /// <summary> ! /// ImageList contains images for all "about" images. ! /// </summary> ! private ImageList staticFolderIcons = new ImageList(); ! /// <summary> ! /// This following indices are used to access the icons in the staticFolderIcons list. ! /// </summary> ! private const int mainIconIndex = 0; ! private const int smallOpenImageIndex = 1; ! private const int smallClosedImageIndex = 2; ! private const int largeImageIndex = 3; ! /////////////////////////////////////////////////////////////////////// ! // ! // Members ! // ! /// <summary> ! /// A long description of the snapin ! /// </summary> ! #region ! string m_Description; ! /// <summary> ! /// the organization providing the snapin ! /// </summary> ! string m_Provider; ! /// <summary> ! /// the version of the snapin: TBD: tie this to the assembly version? ! /// </summary> ! string m_Version; ! /// <summary> ! /// embedded image name for main icon ! /// </summary> ! string m_MainIconName; ! /// <summary> ! /// embedded image name for main icon ! /// </summary> ! string m_SmallOpenName; ! /// <summary> ! /// embedded image name for Small Open image ! /// </summary> ! string m_SmallClosedName; ! /// <summary> ! /// embedded image name for small closed image ! /// </summary> ! string m_LargeName; ! /// <summary> ! /// RGB color value describing the transparent color ! /// The color mask is important when the color depth of the screen is not 32. ! /// In this case, the unmanaged bitmaps must be translated to the color depth ! /// of the screen and the color mask should specify Color.Black ! /// </summary> ! protected Color m_Mask; ! #endregion ! /////////////////////////////////////////////////////////////////////// ! // ! // Properties / Members ! // ! #region ! /// <summary> ! /// Get or set the description ! /// </summary> ! public string Description ! { ! get { return m_Description; } ! set { m_Description = value; } ! } ! /// <summary> ! /// Get or set the provider ! /// </summary> ! public string Provider ! { ! get { return m_Provider; } ! set { m_Provider = value; } ! } ! /// <summary> ! /// Get or set the version ! /// </summary> ! public string Version ! { ! get { return m_Version; } ! set { m_Version = value; } ! } ! /// <summary> ! /// Get or set the main icon name ! /// </summary> ! public string MainIconName ! { ! get { return m_MainIconName; } ! set ! { ! m_MainIconName = value; ! staticFolderIcons.Replace(mainIconIndex, m_MainIconName); ! } ! } ! ! /// <summary> ! /// Get or set the small open image name ! /// </summary> ! public string SmallOpenImageName ! { ! get { return m_SmallOpenName; } ! set ! { ! m_SmallOpenName = value; ! staticFolderIcons.Replace(smallOpenImageIndex, m_SmallOpenName); ! } ! } ! ! /// <summary> ! /// Get or set the small closed image name ! /// </summary> ! public string SmallClosedImageName ! { ! get { return m_SmallClosedName; } ! set ! { ! m_SmallClosedName = value; ! staticFolderIcons.Replace(smallClosedImageIndex, m_SmallClosedName); ! } ! } ! ! /// <summary> ! /// Get or set the large image name ! /// </summary> ! public string LargeImageName ! { ! get { return m_LargeName; } ! set ! { ! m_LargeName = value; ! staticFolderIcons.Replace(largeImageIndex, m_LargeName); ! } ! } ! /// <summary> ! /// Get or set the image color mask ! /// </summary> ! public Color ImageColorMask ! { ! get { return m_Mask; } ! set { m_Mask = value; } ! } ! #endregion ! //////////////////////////////////////////////////////////////////// ! // ! // ISnapinAbout Implementation ! // ! #region ! /// <summary> ! /// ctor ! /// </summary> ! public About() ! { ! // lift the provider and version information from the ! // snapin attribute on the associated snapin class. ! object[] attrs = GetType().GetCustomAttributes(typeof(AboutSnapinAttribute), true); ! if (attrs.Length > 0) ! { ! AboutSnapinAttribute aboutAttrib = (AboutSnapinAttribute)attrs[0]; ! attrs = aboutAttrib.SnapinType.GetCustomAttributes(typeof(SnapinInAttribute), true); ! if (attrs.Length != 0) ! { ! SnapinInAttribute snapinAttrib = (SnapinInAttribute)attrs[0]; ! m_Provider = snapinAttrib.Provider; ! if (snapinAttrib.Version != null) ! m_Version = snapinAttrib.Version; ! else ! m_Version = GetType().Module.Assembly.GetName().Version.ToString(); ! } ! } ! m_Mask = Color.Black; ! staticFolderIcons.Insert(mainIconIndex, ""); ! staticFolderIcons.Insert(smallOpenImageIndex, ""); ! staticFolderIcons.Insert(smallClosedImageIndex, ""); ! staticFolderIcons.Insert(largeImageIndex, ""); ! } ! ! /// <summary> ! /// Returns the textual description for this snapin ! /// </summary> ! /// <param name="lpDescription">out parameter</param> ! public void GetSnapinDescription(out IntPtr lpDescription) ! { ! lpDescription = Marshal.StringToCoTaskMemUni(Description); ! } ! /// <summary> ! /// This returns the creator of the snapin - thats you! ! /// </summary> ! /// <param name="pName"></param> ! public void GetProvider(out IntPtr pName) ! { ! pName = Marshal.StringToCoTaskMemUni(Provider); ! } ! /// <summary> ! /// Returns the version of this snapin. The version can be optionally provided ! /// in the Snapin Attribute that decorates the snapin class. If not provided the ! /// assembly version attribute is used - the assembly where your snapin resides. ! /// </summary> ! /// <param name="lpVersion">the version string maj.min.build.rev</param> ! public void GetSnapinVersion(out IntPtr lpVersion) ! { ! lpVersion = Marshal.StringToCoTaskMemUni(Version); ! } ! /// <summary> ! /// This returns the About page image handle - application icon ! /// </summary> ! /// <param name="hAppIcon"></param> ! public void GetSnapinImage(out IntPtr hAppIcon) ! { ! hAppIcon = staticFolderIcons.GetIconHandle(mainIconIndex); ! } ! /// <summary> ! /// return handles to images ! /// </summary> ! /// <param name="hSmallImage"></param> ! /// <param name="hSmallImageOpen"></param> ! /// <param name="hLargeImage"></param> ! /// <param name="cMask"></param> ! public void GetStaticFolderImage(out IntPtr hSmallImage, out IntPtr hSmallImageOpen, out IntPtr hLargeImage, out uint cMask) ! { ! hSmallImage = staticFolderIcons.GetBitmapHandle(smallClosedImageIndex); ! hSmallImageOpen = staticFolderIcons.GetBitmapHandle(smallOpenImageIndex); ! hLargeImage = staticFolderIcons.GetBitmapHandle(largeImageIndex); ! cMask = (uint) m_Mask.ToArgb(); ! } ! #endregion ! } } --- 9,293 ---- namespace Ironring.MMC.Core { ! /// <summary> ! /// Provides information to add Snapin dialog about the snapin. ! /// Also used in snapin registration. Implements ISnapinAbout ! /// to communicate with MMC. ! /// </summary> ! public class About : ISnapinAbout ! { ! /// <summary> ! /// ImageList contains images for all "about" images. ! /// </summary> ! private ImageList staticFolderIcons = new ImageList(); ! /// <summary> ! /// This following indices are used to access the icons in the staticFolderIcons list. ! /// </summary> ! private const int mainIconIndex = 0; ! private const int smallOpenImageIndex = 1; ! private const int smallClosedImageIndex = 2; ! private const int largeImageIndex = 3; ! /////////////////////////////////////////////////////////////////////// ! // ! // Members ! // ! #region ! /// <summary> ! /// A long description of the snapin ! /// </summary> ! string m_Description; ! /// <summary> ! /// the organization providing the snapin ! /// </summary> ! string m_Provider; ! /// <summary> ! /// the version of the snapin: TBD: tie this to the assembly version? ! /// </summary> ! string m_Version; ! /// <summary> ! /// embedded image name for main icon ! /// </summary> ! string m_MainIconName; ! /// <summary> ! /// embedded image name for main icon ! /// </summary> ! string m_SmallOpenName; ! /// <summary> ! /// embedded image name for Small Open image ! /// </summary> ! string m_SmallClosedName; ! /// <summary> ! /// embedded image name for small closed image ! /// </summary> ! string m_LargeName; ! /// <summary> ! /// RGB color value describing the transparent color ! /// The color mask is important when the color depth of the screen is not 32. ! /// In this case, the unmanaged bitmaps must be translated to the color depth ! /// of the screen and the color mask should specify Color.Black ! /// </summary> ! protected Color m_Mask; ! #endregion + /////////////////////////////////////////////////////////////////////// + // + // Properties + // + #region + /// <summary> + /// Get or set the description + /// </summary> + public string Description + { + get { return m_Description; } + set { m_Description = value; } + } ! /// <summary> ! /// Get or set the provider ! /// </summary> ! public string Provider ! { ! get { return m_Provider; } ! set { m_Provider = value; } ! } ! /// <summary> ! /// Get or set the version ! /// </summary> ! public string Version ! { ! get { return m_Version; } ! set { m_Version = value; } ! } ! /// <summary> ! /// Get or set the main icon name ! /// </summary> ! public string MainIconName ! { ! get { return m_MainIconName; } ! set ! { ! m_MainIconName = value; ! staticFolderIcons.Replace(mainIconIndex, m_MainIconName); ! } ! } ! /// <summary> ! /// Get or set the small open image name ! /// </summary> ! public string SmallOpenImageName ! { ! get { return m_SmallOpenName; } ! set ! { ! m_SmallOpenName = value; ! staticFolderIcons.Replace(smallOpenImageIndex, m_SmallOpenName); ! } ! } ! /// <summary> ! /// Get or set the small closed image name ! /// </summary> ! public string SmallClosedImageName ! { ! get { return m_SmallClosedName; } ! set ! { ! m_SmallClosedName = value; ! staticFolderIcons.Replace(smallClosedImageIndex, m_SmallClosedName); ! } ! } ! /// <summary> ! /// Get or set the large image name ! /// </summary> ! public string LargeImageName ! { ! get { return m_LargeName; } ! set ! { ! m_LargeName = value; ! staticFolderIcons.Replace(largeImageIndex, m_LargeName); ! } ! } ! /// <summary> ! /// Get or set the image color mask ! /// </summary> ! public Color ImageColorMask ! { ! get { return m_Mask; } ! set { m_Mask = value; } ! } ! #endregion ! /////////////////////////////////////////////////////////////////////// ! // ! // ctor + helpers ! // ! #region ! /// <summary> ! /// ctor ! /// </summary> ! public About() ! { ! // lift the provider and version information from the ! // snapin attribute on the associated snapin class. ! object[] attrs = GetAttributes(); ! if (attrs.Length != 0) ! { ! SnapinInAttribute snapinAttrib = (SnapinInAttribute)attrs[0]; ! m_Provider = GetProviderFromAtr(snapinAttrib); ! m_Version = GetVersionFromAtr(snapinAttrib); ! } ! m_Mask = Color.Black; ! InsertStaticFolderIcons(); ! } ! private void InsertStaticFolderIcons() ! { ! staticFolderIcons.Insert(mainIconIndex, ""); ! staticFolderIcons.Insert(smallOpenImageIndex, ""); ! staticFolderIcons.Insert(smallClosedImageIndex, ""); ! staticFolderIcons.Insert(largeImageIndex, ""); ! } ! private object[] GetAttributes() ! { ! object[] attrs = GetType().GetCustomAttributes(typeof(AboutSnapinAttribute), true); ! if (attrs.Length > 0) ! { ! AboutSnapinAttribute aboutAttrib = (AboutSnapinAttribute)attrs[0]; ! attrs = aboutAttrib.SnapinType.GetCustomAttributes(typeof(SnapinInAttribute), true); ! } ! return attrs; ! } + private string GetVersionFromAtr(SnapinInAttribute snapinAttrib) + { + if (snapinAttrib.Version != null) + return snapinAttrib.Version; + else + return GetType().Module.Assembly.GetName().Version.ToString(); + } ! private string GetProviderFromAtr(SnapinInAttribute snapinAttrib) ! { ! return snapinAttrib.Provider; ! } ! #endregion ! ! //////////////////////////////////////////////////////////////////// ! // ! // ISnapinAbout Implementation ! // ! #region ! /// <summary> ! /// Returns the textual description for this snapin ! /// </summary> ! /// <param name="lpDescription">out parameter</param> ! public void GetSnapinDescription(out IntPtr lpDescription) ! { ! lpDescription = Marshal.StringToCoTaskMemUni(Description); ! } ! ! /// <summary> ! /// This returns the creator of the snapin - thats you! ! /// </summary> ! /// <param name="pName"></param> ! public void GetProvider(out IntPtr pName) ! { ! pName = Marshal.StringToCoTaskMemUni(Provider); ! } ! ! /// <summary> ! /// Returns the version of this snapin. The version can be optionally provided ! /// in the Snapin Attribute that decorates the snapin class. If not provided the ! /// assembly version attribute is used - the assembly where your snapin resides. ! /// </summary> ! /// <param name="lpVersion">the version string maj.min.build.rev</param> ! public void GetSnapinVersion(out IntPtr lpVersion) ! { ! lpVersion = Marshal.StringToCoTaskMemUni(Version); ! } ! ! /// <summary> ! /// This returns the About page image handle - application icon ! /// </summary> ! /// <param name="hAppIcon"></param> ! public void GetSnapinImage(out IntPtr hAppIcon) ! { ! hAppIcon = staticFolderIcons.GetIconHandle(mainIconIndex); ! } ! ! ! /// <summary> ! /// return handles to images ! /// </summary> ! /// <param name="hSmallImage"></param> ! /// <param name="hSmallImageOpen"></param> ! /// <param name="hLargeImage"></param> ! /// <param name="cMask"></param> ! public void GetStaticFolderImage(out IntPtr hSmallImage, out IntPtr hSmallImageOpen, out IntPtr hLargeImage, out uint cMask) ! { ! hSmallImage = staticFolderIcons.GetBitmapHandle(smallClosedImageIndex); ! hSmallImageOpen = staticFolderIcons.GetBitmapHandle(smallOpenImageIndex); ! hLargeImage = staticFolderIcons.GetBitmapHandle(largeImageIndex); ! cMask = (uint)m_Mask.ToArgb(); ! } ! #endregion ! } } |
From: Lesley v. Z. <ex...@us...> - 2004-08-25 11:35:20
|
Update of /cvsroot/mmclibrary/mmclibrary/MMCLib In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv15831 Modified Files: BaseNode.cs Log Message: [ 1012088 ] Fix for the strange PropertySheetTitle Index: BaseNode.cs =================================================================== RCS file: /cvsroot/mmclibrary/mmclibrary/MMCLib/BaseNode.cs,v retrieving revision 1.26 retrieving revision 1.27 diff -C2 -d -r1.26 -r1.27 *** BaseNode.cs 25 Aug 2004 08:27:14 -0000 1.26 --- BaseNode.cs 25 Aug 2004 11:35:10 -0000 1.27 *************** *** 933,970 **** } ! //Added by Alexander Kachalkov ! //Added the DisplayName for New Mode title ! /// <summary> ! /// This function will create property sheet pages based ! /// on the information stored in its m_propertyPages field. ! /// It registers the property page along with the callback ! /// functions. ! /// </summary> ! /// <param name="lpProvider"></param> ! /// <param name="handle"></param> ! /// <param name="displayName"></param> ! public void CreatePropertyPages(IPropertySheetCallback lpProvider, IntPtr handle, string displayName) ! { ! if (this.m_propSheet == null || m_propSheet.isClosed) ! // We need to spin off a new thread for this. ! // Why? ! // For winforms forms to work correctly (including accelerators, etc) ! // we need to use a winforms message pump. We can accomplish that ! // by showing our form using Form.ShowDialog(). ! // However, this blocks the thread's execution until the dialog ! // is dismissed. We'll get around this by spinning off another thread ! // to handle the form. ! ! //Changed by Alexander Kachalkov ! //new Thread(new ThreadStart(CreatePropertySheet)).Start(); ! if (ShowModalPropertySheet) ! CreatePropertySheet(displayName); ! else ! ThreadPool.QueueUserWorkItem(new WaitCallback(CreatePropertySheet), DisplayName); ! else ! m_propSheet.Activate(); ! } ! //Added by Alexander Kachalkov // Changed by Alexander Kachalkov to virtual due to the request /// <summary> --- 933,974 ---- } ! //Added by Alexander Kachalkov ! //Added the DisplayName for New Mode title ! /// <summary> ! /// This function will create property sheet pages based ! /// on the information stored in its m_propertyPages field. ! /// It registers the property page along with the callback ! /// functions. ! /// </summary> ! /// <param name="lpProvider"></param> ! /// <param name="handle"></param> ! /// <param name="displayName"></param> ! public void CreatePropertyPages(IPropertySheetCallback lpProvider, IntPtr handle, string displayName) ! { ! if (this.m_propSheet == null || m_propSheet.isClosed) ! { ! // Use the BaseNode.PropertySheetTitle as the displayname if it's set. ! if (PropertySheetTitle != null) ! displayName = PropertySheetTitle; ! // We need to spin off a new thread for this. ! // Why? ! // For winforms forms to work correctly (including accelerators, etc) ! // we need to use a winforms message pump. We can accomplish that ! // by showing our form using Form.ShowDialog(). ! // However, this blocks the thread's execution until the dialog ! // is dismissed. We'll get around this by spinning off another thread ! // to handle the form. ! //Changed by Alexander Kachalkov ! if (ShowModalPropertySheet) ! CreatePropertySheet(displayName); ! else ! ThreadPool.QueueUserWorkItem(new WaitCallback(CreatePropertySheet), displayName); ! } ! else ! m_propSheet.Activate(); ! } ! ! //Added by Alexander Kachalkov // Changed by Alexander Kachalkov to virtual due to the request /// <summary> |
From: Lesley v. Z. <ex...@us...> - 2004-08-25 09:34:52
|
Update of /cvsroot/mmclibrary/mmclibrary/MMCLib In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv28996 Modified Files: SortListNode.cs Log Message: applied patch: [ 1015069 ] Performance improvement for SortListNode (5000+ items) Index: SortListNode.cs =================================================================== RCS file: /cvsroot/mmclibrary/mmclibrary/MMCLib/SortListNode.cs,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** SortListNode.cs 14 Apr 2004 13:03:34 -0000 1.3 --- SortListNode.cs 25 Aug 2004 09:34:42 -0000 1.4 *************** *** 133,137 **** if( m_List != null ){ for( int iIndex = 0; iIndex < m_List.Count; iIndex++ ){ ! InsertItem( m_List.IndexOfValue( iIndex ), iIndex + 1 ); } } --- 133,137 ---- if( m_List != null ){ for( int iIndex = 0; iIndex < m_List.Count; iIndex++ ){ ! InsertItem(iIndex + 1 ); } } *************** *** 141,161 **** /// Overridable helper method to InsertItem /// </summary> ! /// <param name="row"></param> ! /// <param name="nRow"></param> ! public virtual void InsertItem( object row, int nRow ){ ! if( row != null ){ ! RESULTDATAITEM rdi = new RESULTDATAITEM(); ! row.ToString( ); ! rdi.mask = ( uint )RDI.STR | ( uint )RDI.IMAGE | ( uint )RDI.PARAM; ! // TBD: what image? ! rdi.nImage = -1; ! rdi.str = ( IntPtr )( -1 ); // callback for names ! rdi.nCol = 0; ! rdi.lParam = GetItemLParam( nRow ); ! ResultData.InsertItem( ref rdi ); ! } } /// <summary> --- 141,158 ---- /// Overridable helper method to InsertItem /// </summary> ! /// <param name="nrow"></param> ! public virtual void InsertItem( int nRow ) ! { ! RESULTDATAITEM rdi = new RESULTDATAITEM(); ! rdi.mask = ( uint )RDI.STR | ( uint )RDI.IMAGE | ( uint )RDI.PARAM; ! // TBD: what image? ! rdi.nImage = -1; ! rdi.str = ( IntPtr )( -1 ); // callback for names ! rdi.nCol = 0; ! rdi.lParam = GetItemLParam( nRow ); ! ResultData.InsertItem( ref rdi ); } /// <summary> |
From: Lesley v. Z. <ex...@us...> - 2004-08-25 08:27:23
|
Update of /cvsroot/mmclibrary/mmclibrary/MMCLib In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv17903 Modified Files: BaseNode.cs Log Message: added patch [ 1013720 ] plus sign in newly inserted nodes. by Marat Bakirov Index: BaseNode.cs =================================================================== RCS file: /cvsroot/mmclibrary/mmclibrary/MMCLib/BaseNode.cs,v retrieving revision 1.25 retrieving revision 1.26 diff -C2 -d -r1.25 -r1.26 *** BaseNode.cs 13 Jul 2004 08:43:41 -0000 1.25 --- BaseNode.cs 25 Aug 2004 08:27:14 -0000 1.26 *************** *** 329,332 **** --- 329,345 ---- /// </summary> public OnUserDelegate UpdateHandle = null; + + private bool _alwaysInsertWithPlusSign = false; + // added by Marat Bakirov (bmf) + /// <summary> + /// Overwrite default InsertChildren behaviour, with this set the scopenodes will + /// Always insert scopenodes with the plus sign visible, even if there are no child nodes. + /// <seealso cref="InsertChildren"/> + /// </summary> + public bool AlwaysInsertWithPlusSign + { + get {return _alwaysInsertWithPlusSign;} + set {_alwaysInsertWithPlusSign = value;} + } /// <summary> *************** *** 789,794 **** { foreach (BaseNode node in m_ChildNodes) ! node.Insert(this,node.Children.Count > 0); ! } /// <summary> --- 802,807 ---- { foreach (BaseNode node in m_ChildNodes) ! node.Insert(this, node.Children.Count > 0 || node.AlwaysInsertWithPlusSign); ! } /// <summary> |
From: Lesley v. Z. <ex...@us...> - 2004-08-25 08:07:51
|
Update of /cvsroot/mmclibrary/mmclibrary/MMCLib In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv14292 Modified Files: SnapinBase.cs Log Message: made Snapinbase::Destroy virtual Index: SnapinBase.cs =================================================================== RCS file: /cvsroot/mmclibrary/mmclibrary/MMCLib/SnapinBase.cs,v retrieving revision 1.16 retrieving revision 1.17 diff -C2 -d -r1.16 -r1.17 *** SnapinBase.cs 21 Apr 2004 10:21:50 -0000 1.16 --- SnapinBase.cs 25 Aug 2004 08:07:30 -0000 1.17 *************** *** 471,475 **** /// TBD: call Dispose - after that pattern is more pervaisivly used /// </summary> ! public void Destroy() { } --- 471,475 ---- /// TBD: call Dispose - after that pattern is more pervaisivly used /// </summary> ! public virtual void Destroy() { } |
From: Lesley v. Z. <ex...@us...> - 2004-07-27 14:39:48
|
Update of /cvsroot/mmclibrary/mmclibrary/MMCLib2 In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv7531 Modified Files: TODO.txt Log Message: test Index: TODO.txt =================================================================== RCS file: /cvsroot/mmclibrary/mmclibrary/MMCLib2/TODO.txt,v retrieving revision 1.17 retrieving revision 1.18 diff -C2 -d -r1.17 -r1.18 *** TODO.txt 22 Jul 2004 14:07:03 -0000 1.17 --- TODO.txt 27 Jul 2004 14:39:40 -0000 1.18 *************** *** 17,18 **** --- 17,19 ---- + . \ No newline at end of file |
From: Lesley v. Z. <ex...@us...> - 2004-07-22 14:07:18
|
Update of /cvsroot/mmclibrary/mmclibrary/MMCLib2/Nodes In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv17366/Nodes Modified Files: BaseNode.cs DataTableNode.cs FormNode.cs HTMLNode.cs OCXNode.cs ReportNode.cs ResultViewColumn.cs ResultViewItem.cs SortListNode.cs Removed Files: ListNode.cs Log Message: Reordening methods/properties/members/constructors Class FilterArgs: changed m_col and m_param to _col and _param because they are private Made sure the ArrayLists for Menus are created when needed, not when started Index: DataTableNode.cs =================================================================== RCS file: /cvsroot/mmclibrary/mmclibrary/MMCLib2/Nodes/DataTableNode.cs,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** DataTableNode.cs 20 Jul 2004 15:06:26 -0000 1.1 --- DataTableNode.cs 22 Jul 2004 14:07:04 -0000 1.2 *************** *** 19,47 **** public class DataTableNode : BaseNode { ! //Added by Alexander Kachalkov /// <summary> /// A cached reference to the MMC console /// </summary> ! protected IConsole2 m_Console = null; ! ! //Added by Alexander Kachalkov ! /// <summary> ! /// Return the cached member variable to get at MMC ! /// </summary> ! public IHeaderCtrl2 HeaderCtrl ! { ! get { return (IHeaderCtrl2)m_Console; } ! } ! ! //Added by Alexander Kachalkov /// <summary> ! /// Return the cached member variable to get at MMC /// </summary> ! public IResultData ResultData ! { ! get { return (IResultData)m_Console; } ! } ! /// <summary> /// Underlying template for the listview control --- 19,39 ---- public class DataTableNode : BaseNode { ! /////////////////////////////////////////////////////////////////////// ! // ! // Members ! // ! #region //Added by Alexander Kachalkov /// <summary> /// A cached reference to the MMC console /// </summary> ! protected IConsole2 m_Console = null; ! ! //Added by Arunjeet Singh /// <summary> ! /// Variable to hold the AutoRefresh property /// </summary> ! protected bool m_AutoRefresh = false; ! /// <summary> /// Underlying template for the listview control *************** *** 56,83 **** /// </summary> protected Hashtable m_filters = null; ! //Added by Arunjeet Singh ! /// <summary> ! /// Variable to hold the AutoRefresh property ! /// </summary> ! protected bool m_AutoRefresh = false; ! /// <summary> ! /// ctor takes the snapin to register with /// </summary> ! /// <param name="snapin"></param> ! public DataTableNode(SnapinBase snapin) : base(snapin) { } /// <summary> ! /// ctor takes the snapin to register with /// </summary> ! /// <param name="snapin"></param> ! /// <param name="parentNode"></param> ! public DataTableNode(SnapinBase snapin, BaseNode parentNode) : base(snapin, parentNode) { } - /// <summary> /// Access the underlying DataTable --- 48,75 ---- /// </summary> protected Hashtable m_filters = null; + #endregion ! /////////////////////////////////////////////////////////////////////// ! // ! // Properties ! // ! #region ! //Added by Alexander Kachalkov /// <summary> ! /// Return the cached member variable to get at MMC /// </summary> ! public IHeaderCtrl2 HeaderCtrl { + get { return (IHeaderCtrl2)m_Console; } } + //Added by Alexander Kachalkov /// <summary> ! /// Return the cached member variable to get at MMC /// </summary> ! public IResultData ResultData { + get { return (IResultData)m_Console; } } /// <summary> /// Access the underlying DataTable *************** *** 96,100 **** } - //Added by Arunjeet Singh /// <summary> --- 88,91 ---- *************** *** 113,116 **** --- 104,126 ---- } } + #endregion + + /// <summary> + /// ctor takes the snapin to register with + /// </summary> + /// <param name="snapin"></param> + public DataTableNode(SnapinBase snapin) : base(snapin) + { + } + + /// <summary> + /// ctor takes the snapin to register with + /// </summary> + /// <param name="snapin"></param> + /// <param name="parentNode"></param> + public DataTableNode(SnapinBase snapin, BaseNode parentNode) : base(snapin, parentNode) + { + } + /// <summary> /// BaseNode override to populate the treeview control *************** *** 473,478 **** // Filtering implementation // ! ! #region Filtering // MAM: override the filter-event and do something (only called when the --- 483,487 ---- // Filtering implementation // ! #region // MAM: override the filter-event and do something (only called when the Index: ResultViewColumn.cs =================================================================== RCS file: /cvsroot/mmclibrary/mmclibrary/MMCLib2/Nodes/ResultViewColumn.cs,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** ResultViewColumn.cs 31 Mar 2004 07:58:45 -0000 1.1 --- ResultViewColumn.cs 22 Jul 2004 14:07:04 -0000 1.2 *************** *** 9,50 **** public class ResultViewColumn { protected String m_columnName; protected int m_format; - protected int m_width; /// <summary> ! /// Construct a column. /// </summary> ! /// <param name="name">The name of the column</param> ! /// <param name="format">ColumnHeaderFormat value</param> ! /// <param name="width">MMCLV value</param> ! public ResultViewColumn(String name, int format, int width) ! { ! m_columnName = name; ! m_format = format; ! m_width = width; ! } /// <summary> ! /// Simple constructor for a left-aligned auto sized column. /// </summary> ! /// <param name="name"></param> ! public ResultViewColumn(String name) : this(name, (int)ColumnHeaderFormat.LEFT, (int)MMCLV.AUTO) { ! } ! ! public String ColumnName { get { return m_columnName; } set { this.m_columnName = value; } } ! public int Format { get { return this.m_format; } set { this.m_format = value; } } ! public int Width { get { return this.m_width; } set { this.m_width = value; } ! } } } --- 9,92 ---- public class ResultViewColumn { + /////////////////////////////////////////////////////////////////////// + // + // Member variables + // + #region + /// <summary> + /// Used to get/set the name of the column + /// </summary> protected String m_columnName; + + /// <summary> + /// Used to get/set the format of the column + /// </summary> protected int m_format; /// <summary> ! /// Used to get/set the Width of the Column /// </summary> ! protected int m_width; ! #endregion + /////////////////////////////////////////////////////////////////////// + // + // Properties + // + #region /// <summary> ! /// Get/set the name of the Column /// </summary> ! public String ColumnName ! { get { return m_columnName; } set { this.m_columnName = value; } } ! /// <summary> ! /// Get/set the Format of the Column (see ColumnHeaderFormat enum) ! /// </summary> ! public int Format ! { get { return this.m_format; } set { this.m_format = value; } } ! /// <summary> ! /// Get/set the Width of the Column ! /// </summary> ! public int Width ! { get { return this.m_width; } set { this.m_width = value; } ! } ! #endregion ! ! //////////////////////////////////////////////////////////////////////////// ! // ! // Constructors ! // ! #region ! /// <summary> ! /// Simple constructor for a left-aligned auto sized column. ! /// </summary> ! /// <param name="name"></param> ! public ResultViewColumn(String name) : this(name, (int)ColumnHeaderFormat.LEFT, (int)MMCLV.AUTO) ! { ! } ! ! /// <summary> ! /// Construct a column. ! /// </summary> ! /// <param name="name">The name of the column</param> ! /// <param name="format">ColumnHeaderFormat value</param> ! /// <param name="width">MMCLV value</param> ! public ResultViewColumn(String name, int format, int width) ! { ! m_columnName = name; ! m_format = format; ! m_width = width; ! } ! #endregion } } Index: HTMLNode.cs =================================================================== RCS file: /cvsroot/mmclibrary/mmclibrary/MMCLib2/Nodes/HTMLNode.cs,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** HTMLNode.cs 23 Apr 2004 15:07:02 -0000 1.2 --- HTMLNode.cs 22 Jul 2004 14:07:04 -0000 1.3 *************** *** 15,23 **** protected string m_strUrl; ! ////////////////////////////////////////////////////////////////// ! // ! // Implementation ! // ! /// <summary> /// ctor. --- 15,27 ---- protected string m_strUrl; ! /// <summary> ! /// Set or get the url to navigate to on startup. ! /// </summary> ! public string Url ! { ! get { return m_strUrl; } ! set { m_strUrl = value; } ! } ! /// <summary> /// ctor. *************** *** 48,60 **** m_strUrl = url; } - - /// <summary> - /// Set or get the url to navigate to on startup. - /// </summary> - public string Url - { - get { return m_strUrl; } - set { m_strUrl = value; } - } /// <summary> --- 52,55 ---- Index: ResultViewItem.cs =================================================================== RCS file: /cvsroot/mmclibrary/mmclibrary/MMCLib2/Nodes/ResultViewItem.cs,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** ResultViewItem.cs 18 May 2004 07:23:09 -0000 1.7 --- ResultViewItem.cs 22 Jul 2004 14:07:04 -0000 1.8 *************** *** 13,27 **** public class ResultViewItem : IMMCSelected, IMMCPropertyPage { protected SnapinBase m_snapin; protected ReportNode m_node; protected bool m_selected; protected String m_displayName; protected int m_largeImage; protected int m_smallImage; protected int m_dummy1; protected int m_dummy2; - protected uint m_itemID; // The item-id as assigned by MMC. ! public static readonly System.Type Class = typeof(ResultViewItem); /// <summary> --- 13,69 ---- public class ResultViewItem : IMMCSelected, IMMCPropertyPage { + + public static readonly System.Type Class = typeof(ResultViewItem); + + + /////////////////////////////////////////////////////////////////////// + // + // Member variables + // + #region + /// <summary> + /// Reference back to the snapin + /// </summary> protected SnapinBase m_snapin; + + /// <summary> + /// Reference back to the snapin + /// </summary> protected ReportNode m_node; + + /// <summary> + /// Reference to the currently selected node + /// </summary> protected bool m_selected; + + /// <summary> + /// The Display name + /// </summary> protected String m_displayName; + + /// <summary> + /// Large Image Index + /// </summary> protected int m_largeImage; + + /// <summary> + /// Small Image Index + /// </summary> protected int m_smallImage; + + /// <summary> + /// ??? + /// </summary> protected int m_dummy1; + + /// <summary> + /// ??? + /// </summary> protected int m_dummy2; ! /// <summary> ! /// The item-id as assigned by MMC. ! /// </summary> ! protected uint m_itemID; /// <summary> *************** *** 30,44 **** protected PropertySheet m_propsheet; ! // Extended properties protected int m_image = -1; protected Hashtable m_details = new Hashtable(); /// <summary> /// System.Type.GetType() is misdesigned. creating and getting the type /// at least gives us a Typecheck! This constructor exists just for that /// purpose. /// </summary> ! internal ResultViewItem() { } --- 72,214 ---- protected PropertySheet m_propsheet; ! /// <summary> ! /// ! /// </summary> protected int m_image = -1; + /// <summary> + /// The details for this list-item. The keys are ResultViewItemColumn references, the values + /// are the details (as Strings). + /// </summary> protected Hashtable m_details = new Hashtable(); /// <summary> + /// All "Task" menu items + /// </summary> + protected ArrayList m_tasks = null; + + /// <summary> + /// All "Menu" menu items + /// </summary> + protected ArrayList m_menus = null; + #endregion + + /////////////////////////////////////////////////////////////////////// + // + // Properties + // + #region + /// <summary> + /// Get a reference back to the snapin + /// </summary> + public SnapinBase SnapinBase + { + get { return m_snapin; } + } + + /// <summary> + /// Get a reference back to the node where we belong to + /// </summary> + public ReportNode Node + { + get { return m_node; } + } + + /// <summary> + /// + /// </summary> + public PropertySheet PropertySheet + { + get { return m_propsheet; } + set { this.m_propsheet = value; } + } + + /// <summary> + /// Get/set the displayname of this ResultViewItem + /// </summary> + public String DisplayName + { + get { return m_displayName; } + set { m_displayName = value; } + } + + /// <summary> + /// Get/set the selecteed status of this node + /// </summary> + public bool Selected + { + get { return m_selected; } + set { m_selected = value; } + } + + /// <summary> + /// Get/set the ItemID of this ResultViewItem + /// </summary> + public uint ItemID + { + get { return this.m_itemID; } + set { this.m_itemID = value; } + } + + /// <summary> + /// The details for this list-item. The keys are ResultViewItemColumn references, the values + /// are the details (as Strings). + /// </summary> + public virtual Hashtable Details + { + get { return this.m_details; } + set { this.m_details = value; } + } + + /// <summary> + /// Get the index of the largeImage + /// </summary> + public virtual int LargeImage + { + get { return this.m_largeImage; } + } + + /// <summary> + /// Get the index of he SmallImage + /// </summary> + public virtual int SmallImage + { + get { return this.m_smallImage; } + } + + /// <summary> + /// Get/set TopLevel menus for this node (MenuItem). + /// </summary> + public virtual ArrayList Menus + { + get { return m_menus; } + set { m_menus = value; } + } + + + /// <summary> + /// Return all Tasks for this node (MenuItem). + /// FIXME: are there any task thingies available from the mmc side ? + /// is this even possible? + /// </summary> + public virtual ArrayList Tasks + { + get { return m_tasks; } + set { m_tasks = value;} + } + #endregion + + //////////////////////////////////////////////////////////////////////////// + // + // Constructors + // + #region + /// <summary> /// System.Type.GetType() is misdesigned. creating and getting the type /// at least gives us a Typecheck! This constructor exists just for that /// purpose. /// </summary> ! internal ResultViewItem() ! { } *************** *** 73,104 **** m_dummy2 = node.ResultPaneImages.Add(smallImageName); } ! ! public SnapinBase SnapinBase { ! get { return m_snapin; } ! } ! ! public ReportNode Node { ! get { return m_node; } ! } ! ! public PropertySheet PropertySheet { ! get { return m_propsheet; } ! set { this.m_propsheet = value; } ! } ! ! public String DisplayName { ! get { return m_displayName; } ! set { m_displayName = value; } ! } ! ! public bool Selected { ! get { return m_selected; } ! set { m_selected = value; } ! } ! ! public uint ItemID { ! get { return this.m_itemID; } ! set { this.m_itemID = value; } ! } /// <summary> --- 243,247 ---- m_dummy2 = node.ResultPaneImages.Add(smallImageName); } ! #endregion /// <summary> *************** *** 119,139 **** /// <summary> - /// The details for this list-item. The keys are ResultViewItemColumn references, the values - /// are the details (as Strings). - /// </summary> - public virtual Hashtable Details { - get { return this.m_details; } - set { this.m_details = value; } - } - - public virtual int LargeImage { - get { return this.m_largeImage; } - } - - public virtual int SmallImage { - get { return this.m_smallImage; } - } - - /// <summary> /// Callback from the reportnodeext to get the details for a given item/subitem. /// </summary> --- 262,265 ---- *************** *** 170,193 **** // Called when this item is selected. We do nothing in the default implementation. } - - protected ArrayList m_menus = null; - /// <summary> - /// Return all TopLevel menus for this node (MenuItem). - /// </summary> - public virtual ArrayList Menus { - get { return m_menus; } - set { m_menus = value; } - } - - protected ArrayList m_tasks = null; - /// <summary> - /// Return all Tasks for this node (MenuItem). - /// FIXME: are there any task thingies available from the mmc side ? - /// is this even possible? - /// </summary> - public virtual ArrayList Tasks { - get { return m_tasks; } - set { m_tasks = value;} - } } } --- 296,299 ---- Index: SortListNode.cs =================================================================== RCS file: /cvsroot/mmclibrary/mmclibrary/MMCLib2/Nodes/SortListNode.cs,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** SortListNode.cs 22 Apr 2004 12:31:35 -0000 1.2 --- SortListNode.cs 22 Jul 2004 14:07:04 -0000 1.3 *************** *** 17,20 **** --- 17,25 ---- public class SortListNode : BaseNode, IMMCSaneNode { + //////////////////////////////////////////////////////////////////////////// + // + // Members + // + #region //Added by Alexander Kachalkov /// <summary> *************** *** 22,26 **** --- 27,46 ---- /// </summary> protected IConsole2 m_Console = null; + /// <summary> + /// Underlying template for the listview control + /// </summary> + protected SortedList m_List = null; + + /// <summary> + /// Underlying template for the listview control + /// </summary> + protected ArrayList m_HeaderInfo = null; + #endregion + //////////////////////////////////////////////////////////////////////////// + // + // Properties + // + #region //Added by Alexander Kachalkov /// <summary> *************** *** 42,50 **** /// <summary> ! /// Underlying template for the listview control ! /// </summary> ! protected SortedList m_List = null; ! protected ArrayList m_HeaderInfo = null; /// <summary> /// ctor takes the snapin to register with --- 62,85 ---- /// <summary> ! /// Access the underlying DataTable ! /// </summary> ! public SortedList DataList ! { ! get{ return m_List; } ! set{ m_List = value; } ! } ! ! public ArrayList HeaderInfo ! { ! get{ return m_HeaderInfo; } ! set{ m_HeaderInfo = value; } ! } ! #endregion + //////////////////////////////////////////////////////////////////////////// + // + // Constructors + // + #region /// <summary> /// ctor takes the snapin to register with *************** *** 63,79 **** { } - /// <summary> - /// Access the underlying DataTable - /// </summary> - public SortedList DataList{ - get{ return m_List; } - set{ m_List = value; } - } - public ArrayList HeaderInfo{ - get{ return m_HeaderInfo; } - set{ m_HeaderInfo = value; } - } /// <summary> --- 98,104 ---- { } + #endregion /// <summary> Index: BaseNode.cs =================================================================== RCS file: /cvsroot/mmclibrary/mmclibrary/MMCLib2/Nodes/BaseNode.cs,v retrieving revision 1.21 retrieving revision 1.22 diff -C2 -d -r1.21 -r1.22 *** BaseNode.cs 16 Jul 2004 14:13:23 -0000 1.21 --- BaseNode.cs 22 Jul 2004 14:07:04 -0000 1.22 *************** *** 20,220 **** public class BaseNode : IMMCSaneNode { - //Added by Alexander Kachalkov - protected bool m_MultiSelectMode; - /// <summary> - /// Indicate that we are in Multiselect Mode - /// </summary> - public bool MultiSelectMode - { - get{return m_MultiSelectMode;} [...1192 lines suppressed...] #endregion /// <summary> ! /// Refresh the view by requesting the MMC to redraw. /// </summary> ! public virtual void Refresh() { ! Snapin.ResultViewConsole.UpdateAllViews(new DataObject(this), 0, 0); } + // MAM: more property page support. /// <summary> ! /// Clear the set of propertypages for this node. ! /// </summary> ! public virtual void ClearPropertyPages() { ! this.PropertyPages.Clear(); } Index: ReportNode.cs =================================================================== RCS file: /cvsroot/mmclibrary/mmclibrary/MMCLib2/Nodes/ReportNode.cs,v retrieving revision 1.17 retrieving revision 1.18 diff -C2 -d -r1.17 -r1.18 *** ReportNode.cs 2 Jul 2004 13:57:37 -0000 1.17 --- ReportNode.cs 22 Jul 2004 14:07:04 -0000 1.18 *************** *** 18,27 **** public class ReportNode : BaseNode, IMMCSaneNode { //Added by Alexander Kachalkov /// <summary> /// A cached reference to the MMC console /// </summary> ! protected IConsole2 m_Console = null; //Added by Alexander Kachalkov /// <summary> --- 18,62 ---- public class ReportNode : BaseNode, IMMCSaneNode { + ////////////////////////////////////////////////////////////////////// + // + // Members + // + #region //Added by Alexander Kachalkov /// <summary> /// A cached reference to the MMC console /// </summary> ! protected IConsole2 m_Console = null; ! ! // MAM: the filtersets that are active. ! /// <summary> ! /// The currently active filters. The keys are the columns (integer), the values ! /// are filter expressions. The expressions are simply matched ! /// by testing if they occur anywhere within the value. ! /// </summary> ! protected Hashtable m_filters = null; + /// <summary> + /// The set of currently selected items. + /// Multiselection is not done yet + /// </summary> + protected ResultViewItem[] m_currentSelectedItems = null; + + /// <summary> + /// Used to get/set the resultview items. + /// </summary> + protected ArrayList m_items = new ArrayList(); + + /// <summary> + /// Used to get/set the resultview items. + /// </summary> + protected ArrayList m_columns = new ArrayList(); + #endregion + + ////////////////////////////////////////////////////////////////////// + // + // Properties + // + #region //Added by Alexander Kachalkov /// <summary> *************** *** 42,65 **** } - // MAM: the filtersets that are active. /// <summary> ! /// The currently active filters. The keys are the columns (integer), the values ! /// are filter expressions. The expressions are simply matched ! /// by testing if they occur anywhere within the value. ! /// </summary> ! protected Hashtable m_filters = null; ! ! /// <summary> ! /// The set of currently selected items. ! /// Multiselection is not done yet /// </summary> ! protected ResultViewItem[] m_currentSelectedItems = null; /// <summary> ! /// Multiselect flag. Note, this is unimplemented at the IComponent side, ! /// so don't expect this to work (it won't). /// </summary> ! //protected bool m_multiselect = false; /// <summary> /// ctor takes the snapin to register with --- 77,104 ---- } /// <summary> ! /// Get/set the resultview items. /// </summary> ! public virtual ArrayList Items ! { ! get {return m_items;} ! set { m_items = value;} ! } /// <summary> ! /// Get/set the columns for this view. Override for results. /// </summary> ! public virtual ArrayList Columns ! { ! get { return m_columns; } ! set { m_columns = value;} ! } ! #endregion + ////////////////////////////////////////////////////////////////////// + // + // Constructors + // + #region /// <summary> /// ctor takes the snapin to register with *************** *** 88,91 **** --- 127,131 ---- { } + #endregion #region ResultView handling *************** *** 121,144 **** return retval; } - - protected ArrayList m_items = new ArrayList(); - /// <summary> - /// Get the resultview items. - /// </summary> - public virtual ArrayList Items - { - get {return m_items;} - set { m_items = value;} - } - - protected ArrayList m_columns = new ArrayList(); - /// <summary> - /// Get the columns for this view. Override for results. - /// </summary> - public virtual ArrayList Columns - { - get { return m_columns; } - set { m_columns = value;} - } /// <summary> --- 161,164 ---- *************** *** 180,184 **** return true; } - public override void GetDisplayInfo(ref RESULTDATAITEM ResultDataItem) --- 200,203 ---- *************** *** 230,234 **** base.GetDisplayInfo(ref ResultDataItem); } - #endregion /// <summary> --- 249,252 ---- *************** *** 277,288 **** return (ResultViewItem[])retval.ToArray(new ResultViewItem().GetType()); } ! ! // FIXME should m_currentSelectedItems be a ArrayList too ? ! // FIXME there must be some reason that marcel did everything in in string arrays ! // TBD mail marcel about this. -> done -> only for speed ! // This is not completely accurate for some strange reason. The events do not ! // propagate as we would like them too. Sigh. Fall back to getting the selected ! // items by hand then. ! /// <summary> /// Called when a result item is selected. Sets the property-page flag. --- 295,306 ---- return (ResultViewItem[])retval.ToArray(new ResultViewItem().GetType()); } ! #endregion ! ! ////////////////////////////////////////////////////////////////////// ! // ! // Selection Handling ! // This is done by hand because the events did not propagate as we would like them too. ! // ! #region /// <summary> /// Called when a result item is selected. Sets the property-page flag. *************** *** 373,376 **** --- 391,395 ---- this.m_currentSelectedItems = items; } + /// <summary> *************** *** 383,388 **** base.OnDeselectScope(); } ! /// <summary> /// This function will create property sheet pages based --- 402,412 ---- base.OnDeselectScope(); } + #endregion ! ////////////////////////////////////////////////////////////////////// ! // ! // PropertyPages handling for items ! // ! #region /// <summary> /// This function will create property sheet pages based *************** *** 469,472 **** --- 493,497 ---- return havePropertyPage; } + #endregion /// <summary> *************** *** 474,478 **** /// with column information and data /// </summary> ! public override void OnShow() { m_Console = m_Snapin.ResultViewConsole; --- 499,504 ---- /// with column information and data /// </summary> ! public override void OnShow() ! { m_Console = m_Snapin.ResultViewConsole; *************** *** 651,655 **** // Filtering implementation // - #region Filtering --- 677,680 ---- Index: OCXNode.cs =================================================================== RCS file: /cvsroot/mmclibrary/mmclibrary/MMCLib2/Nodes/OCXNode.cs,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** OCXNode.cs 2 Jul 2004 13:57:37 -0000 1.2 --- OCXNode.cs 22 Jul 2004 14:07:04 -0000 1.3 *************** *** 24,27 **** --- 24,46 ---- /// <summary> + /// Access the ActiveX control Guid + /// </summary> + public virtual Guid OCXGuid + { + get { return m_guidOCX; } + set { m_guidOCX = value; } + } + + /// <summary> + /// This is an MMC concept. Should it create a new activeX control for each + /// result view of this type or a new one. + /// </summary> + public virtual bool CreateNew + { + get { return m_bCreateNew; } + set { m_bCreateNew = value; } + } + + /// <summary> /// ctor /// </summary> *************** *** 62,84 **** /// <summary> - /// Access the ActiveX control Guid - /// </summary> - public virtual Guid OCXGuid - { - get { return m_guidOCX; } - set { m_guidOCX = value; } - } - - /// <summary> - /// This is an MMC concept. Should it create a new activeX control for each - /// result view of this type or a new one. - /// </summary> - public virtual bool CreateNew - { - get { return m_bCreateNew; } - set { m_bCreateNew = value; } - } - - /// <summary> /// Provides the dring representation fo the guid to MMC /// to create on its terms. --- 81,84 ---- Index: FormNode.cs =================================================================== RCS file: /cvsroot/mmclibrary/mmclibrary/MMCLib2/Nodes/FormNode.cs,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** FormNode.cs 31 Mar 2004 07:58:45 -0000 1.1 --- FormNode.cs 22 Jul 2004 14:07:04 -0000 1.2 *************** *** 7,32 **** namespace Ironring.MMC.Nodes { ! /// <summary> ! /// Form node presents a Winforms UserControl as the result view ! /// implementation. Make sure you use the WinForms achor features ! /// to support dynamic sizing of controls since the result view is ! /// resizable. ! /// The FormNode is actually an OCX Node to MMC that hosts a shim ! /// ActiveX control provided as part of this library. Methods on the ! /// shim control communicate the UserControl Type to host. ! /// </summary> ! public class FormNode : OCXNode, IMMCSaneNode ! { ! /// <summary> ! /// The Type of the UserControl to create ! /// </summary> ! protected Type m_ControlType; ! protected object m_usercontrol; ! ////////////////////////////////////////////////////////////////// ! // ! // Implementation ! // /// <summary> /// Constructor --- 7,62 ---- namespace Ironring.MMC.Nodes { ! /// <summary> ! /// Form node presents a Winforms UserControl as the result view ! /// implementation. Make sure you use the WinForms achor features ! /// to support dynamic sizing of controls since the result view is ! /// resizable. ! /// The FormNode is actually an OCX Node to MMC that hosts a shim ! /// ActiveX control provided as part of this library. Methods on the ! /// shim control communicate the UserControl Type to host. ! /// </summary> ! public class FormNode : OCXNode, IMMCSaneNode ! { ! ////////////////////////////////////////////////////////////////// ! // ! // Members ! // ! #region ! /// <summary> ! /// The Type of the UserControl to create ! /// </summary> ! protected Type m_ControlType; ! /// <summary> ! /// The usercontrol ! /// </summary> ! protected object m_usercontrol; ! #endregion ! ////////////////////////////////////////////////////////////////// ! // ! // Properties ! // ! #region ! /// <summary> ! /// The Type of UserControl to host in the result view ! /// </summary> ! public virtual Type ControlType ! { ! get { return m_ControlType; } ! set { m_ControlType = value; } ! } ! ! public virtual object UserControl ! { ! get { return m_usercontrol; } ! set { m_usercontrol = value; } ! } ! #endregion + ////////////////////////////////////////////////////////////////// + // + // Constructors + // + #region /// <summary> /// Constructor *************** *** 72,90 **** this.ControlType = controlType; } ! ! /// <summary> ! /// The Type of UserControl to host in the result view ! /// </summary> ! public virtual Type ControlType ! { ! get { return m_ControlType; } ! set { m_ControlType = value; } ! } ! ! public virtual object UserControl ! { ! get { return m_usercontrol; } ! set { m_usercontrol = value; } ! } /// <summary> --- 102,106 ---- this.ControlType = controlType; } ! #endregion /// <summary> --- ListNode.cs DELETED --- |
From: Lesley v. Z. <ex...@us...> - 2004-07-22 14:07:17
|
Update of /cvsroot/mmclibrary/mmclibrary/MMCLib2/PropertyPages In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv17366/PropertyPages Modified Files: PropertyPage.cs PropertyPageBase.cs PropertySheet.cs Log Message: Reordening methods/properties/members/constructors Class FilterArgs: changed m_col and m_param to _col and _param because they are private Made sure the ArrayLists for Menus are created when needed, not when started Index: PropertyPageBase.cs =================================================================== RCS file: /cvsroot/mmclibrary/mmclibrary/MMCLib2/PropertyPages/PropertyPageBase.cs,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** PropertyPageBase.cs 15 Apr 2004 10:20:47 -0000 1.4 --- PropertyPageBase.cs 22 Jul 2004 14:07:05 -0000 1.5 *************** *** 22,54 **** private System.ComponentModel.Container components = null; protected PropertyPage m_propertypage; ! public PropertyPageBase(PropertyPage pp) : base() ! { ! this.PropertyPage = pp; ! } ! ! public PropertyPageBase() ! { ! // This call is required by the Windows.Forms Form Designer. ! InitializeComponent(); ! ! // TODO: Add any initialization after the InitializeComponent call ! ! } ! /// <summary> ! /// Get the property-page class. This is either a PropertyPage instance ! /// for ScopeNode propertypages, or a PropertyPageExt for item property-pages. ! /// use /// </summary> ! /// <example>PropertyPageExt pExt = this.PropertyPage as PropertyPageExt; ! /// if(pExt != null) { ! /// do_fancy_stuff(); ! /// } ! /// </example> ! public virtual PropertyPage PropertyPage { get { return this.m_propertypage; } ! set { System.Diagnostics.Debug.Assert(this.m_propertypage == null); System.Diagnostics.Debug.WriteLine(value); this.m_propertypage = value; --- 22,47 ---- private System.ComponentModel.Container components = null; + /////////////////////////////////////////////////////////////////////// + // + // Member variables + // + #region protected PropertyPage m_propertypage; + #endregion ! /////////////////////////////////////////////////////////////////////// ! // ! // Properties ! // ! #region /// <summary> ! /// Get the property-page class /// </summary> ! public virtual PropertyPage PropertyPage ! { get { return this.m_propertypage; } ! set ! { ! System.Diagnostics.Debug.Assert(this.m_propertypage == null); System.Diagnostics.Debug.WriteLine(value); this.m_propertypage = value; *************** *** 79,86 **** public virtual ArrayList Items { ! get { PropertyPage pp = this.PropertyPage; ! if(pp != null) { return pp.Items; ! } else { return new ArrayList(); } --- 72,84 ---- public virtual ArrayList Items { ! get ! { ! PropertyPage pp = this.PropertyPage; ! if(pp != null) ! { return pp.Items; ! } ! else ! { return new ArrayList(); } *************** *** 96,102 **** get { ! return (ResultViewItem)this.Items[0]; } } /// <summary> --- 94,117 ---- get { ! return (ResultViewItem)this.Items[0]; } } + #endregion + + //////////////////////////////////////////////////////////////////////////// + // + // Constructors + // + #region + public PropertyPageBase(PropertyPage pp) : base() + { + this.PropertyPage = pp; + } + + public PropertyPageBase() + { + InitializeComponent(); + } + #endregion /// <summary> *************** *** 104,108 **** /// the corresponding items in the propertypage). /// </summary> ! public virtual void init() { } --- 119,129 ---- /// the corresponding items in the propertypage). /// </summary> ! public virtual void init() ! { ! } ! ! protected void ActivateApplyBtn(object sender, System.EventArgs e) ! { ! this.m_propertypage.PropertySheet.ActivateApplyButton(); } *************** *** 159,168 **** #endregion - protected void ActivateApplyBtn(object sender, System.EventArgs e) - { - this.m_propertypage.PropertySheet.ActivateApplyButton(); - } - - /// <summary> /// Clean up any resources being used. --- 180,183 ---- Index: PropertyPage.cs =================================================================== RCS file: /cvsroot/mmclibrary/mmclibrary/MMCLib2/PropertyPages/PropertyPage.cs,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** PropertyPage.cs 28 Apr 2004 13:04:32 -0000 1.3 --- PropertyPage.cs 22 Jul 2004 14:07:05 -0000 1.4 *************** *** 11,14 **** --- 11,19 ---- public class PropertyPage { + //////////////////////////////////////////////////////////////////////////// + // + // Members + // + #region /// <summary> /// The property sheet we belong to *************** *** 40,44 **** --- 45,55 ---- /// </summary> protected ArrayList m_items = new ArrayList(); + #endregion + //////////////////////////////////////////////////////////////////////////// + // + // Events + // + #region /// <summary> /// Event fires when page must validate page contents *************** *** 56,60 **** /// </summary> public event EventHandler apply; - /// <summary> --- 67,70 ---- *************** *** 62,103 **** /// </summary> public event EventHandler cancel; ! ! public PropertyPage() ! { ! } ! ! /// <summary> ! /// constructor provides context ! /// </summary> ! /// <param name="title"></param> ! public PropertyPage(string title) ! { ! m_sTitle = title; ! } ! ! public PropertyPage(string title, BaseNode node) : this(title) ! { ! m_node = node; ! } ! ! public PropertyPage(string title, Type userControlType , BaseNode node) : this(title, node) ! { ! ControlType = userControlType; ! } ! ! public PropertyPage(String title, Type userControlType, BaseNode node, ResultViewItem[] items) : this(title, userControlType, node) ! { ! this.Items = new ArrayList(items); ! } ! ! public PropertyPage(String title, Type userControlType, BaseNode node, ResultViewItem item) : this(title, userControlType, node) ! { ! if(item != null) ! { ! this.Items.Add(item); ! } ! } ! /// <summary> /// Set the type of User Control to serve as the property page guts --- 72,82 ---- /// </summary> public event EventHandler cancel; + #endregion ! //////////////////////////////////////////////////////////////////////////// ! // ! // Properties ! // ! #region /// <summary> /// Set the type of User Control to serve as the property page guts *************** *** 169,172 **** --- 148,213 ---- } + /// <summary> + /// The string displayed int he tab + /// </summary> + public String Title + { + get { return m_sTitle; } + set { m_sTitle = value; } + } + + + /// <summary> + /// size of the property sheet page + /// </summary> + public Size Size + { + get { return MainControl.Size; } + set { MainControl.Size = value; } + } + + #endregion + + //////////////////////////////////////////////////////////////////////////// + // + // Constructors + // + #region + public PropertyPage() + { + } + + /// <summary> + /// constructor provides context + /// </summary> + /// <param name="title"></param> + public PropertyPage(string title) + { + m_sTitle = title; + } + + public PropertyPage(string title, BaseNode node) : this(title) + { + m_node = node; + } + + public PropertyPage(string title, Type userControlType , BaseNode node) : this(title, node) + { + ControlType = userControlType; + } + + public PropertyPage(String title, Type userControlType, BaseNode node, ResultViewItem[] items) : this(title, userControlType, node) + { + this.Items = new ArrayList(items); + } + + public PropertyPage(String title, Type userControlType, BaseNode node, ResultViewItem item) : this(title, userControlType, node) + { + if(item != null) + { + this.Items.Add(item); + } + } + #endregion /// <summary> *************** *** 198,223 **** } - - - /// <summary> - /// The string displayed int he tab - /// </summary> - public String Title - { - get { return m_sTitle; } - set { m_sTitle = value; } - } - - - /// <summary> - /// size of the property sheet page - /// </summary> - public Size Size - { - get { return MainControl.Size; } - set { MainControl.Size = value; } - } - - /// <summary> /// Method that gets called to validate the values in the TabPage --- 239,242 ---- Index: PropertySheet.cs =================================================================== RCS file: /cvsroot/mmclibrary/mmclibrary/MMCLib2/PropertyPages/PropertySheet.cs,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** PropertySheet.cs 16 Jul 2004 14:13:24 -0000 1.8 --- PropertySheet.cs 22 Jul 2004 14:07:05 -0000 1.9 *************** *** 23,28 **** public class PropertySheet : Form { ! // Controls on the page // Lesley v. Zijl: made protected for subclasses. /// <summary> --- 23,34 ---- public class PropertySheet : Form { ! //Added by Alexander Ovchinnikov for close PS after remove node ! public OnUserDelegate m_CloseHandle = null; + /////////////////////////////////////////////////////////////////////// + // + // Member variables + // + #region // Lesley v. Zijl: made protected for subclasses. /// <summary> *************** *** 67,104 **** /// </summary> protected ResultViewItem m_resultviewitem; ! //Added by Alexander Ovchinnikov for close PS after remove node ! public OnUserDelegate m_CloseHandle = null; ! ! /// <summary> ! /// Construct provides linkage to the snapin node ! /// </summary> ! /// <param name="node"></param> ! public PropertySheet(BaseNode node) ! { ! m_ParentNode = node; ! ! // Make sure nobody can resize this form ! FormBorderStyle = FormBorderStyle.FixedDialog; ! ! Icon = null; ! ShowInTaskbar = false; ! MaximizeBox = false; ! MinimizeBox = false; ! ! m_fClosed = false; ! ! //Added by Alexander Kachalkov ! //This call is required by the Windows Form Designer. ! InitializeComponent(); ! ! //Added by Alexander Ovchinnikov for close PS after remove node ! //initialise closeDelegate ! if( m_CloseHandle == null ) ! { ! m_CloseHandle += new OnUserDelegate( ClosePropertySheet ); ! } ! } ! /// <summary> /// Get the item we are a property page for. --- 73,83 ---- /// </summary> protected ResultViewItem m_resultviewitem; + #endregion ! /////////////////////////////////////////////////////////////////////// ! // ! // Properties ! // ! #region /// <summary> /// Get the item we are a property page for. *************** *** 150,153 **** --- 129,163 ---- return m_btnApply.Enabled; } + #endregion + + /// <summary> + /// Construct provides linkage to the snapin node + /// </summary> + /// <param name="node"></param> + public PropertySheet(BaseNode node) + { + m_ParentNode = node; + + // Make sure nobody can resize this form + FormBorderStyle = FormBorderStyle.FixedDialog; + + Icon = null; + ShowInTaskbar = false; + MaximizeBox = false; + MinimizeBox = false; + + m_fClosed = false; + + //Added by Alexander Kachalkov + //This call is required by the Windows Form Designer. + InitializeComponent(); + + //Added by Alexander Ovchinnikov for close PS after remove node + //initialise closeDelegate + if( m_CloseHandle == null ) + { + m_CloseHandle += new OnUserDelegate( ClosePropertySheet ); + } + } /// <summary> *************** *** 272,276 **** return origHeight += (before - m_tc.TabPages[0].Size.Height); } ! //Added by Attila Kapostyak /// <summary> --- 282,290 ---- return origHeight += (before - m_tc.TabPages[0].Size.Height); } ! /////////////////////////////////////////////////////////////////////// ! // ! // Events ! // ! #region //Added by Attila Kapostyak /// <summary> *************** *** 354,357 **** --- 368,372 ---- } } + #endregion /// <summary> |
From: Lesley v. Z. <ex...@us...> - 2004-07-22 14:07:15
|
Update of /cvsroot/mmclibrary/mmclibrary/MMCLib2/Wizards In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv17366/Wizards Modified Files: WizardBase.cs Log Message: Reordening methods/properties/members/constructors Class FilterArgs: changed m_col and m_param to _col and _param because they are private Made sure the ArrayLists for Menus are created when needed, not when started Index: WizardBase.cs =================================================================== RCS file: /cvsroot/mmclibrary/mmclibrary/MMCLib2/Wizards/WizardBase.cs,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** WizardBase.cs 4 May 2004 13:59:53 -0000 1.3 --- WizardBase.cs 22 Jul 2004 14:07:05 -0000 1.4 *************** *** 15,23 **** */ private Container components = null; ! private TabControl tabWizardPages; private Button btnCancel; private Button btnNext; private Button btnBack; - protected Bitmap m_Logo; protected ArrayList pages = new ArrayList(); --- 15,22 ---- */ private Container components = null; ! protected TabControl tabWizardPages; private Button btnCancel; private Button btnNext; private Button btnBack; protected ArrayList pages = new ArrayList(); *************** *** 47,56 **** } - public virtual Bitmap Logo - { - set{m_Logo = value;} - get{return m_Logo;} - } - /// <summary> /// Show the wizard. A new thread is created for this. When the 'finish' --- 46,49 ---- *************** *** 58,68 **** /// </summary> /// <param name="title">The forms title</param> - /// <param name="logo">custom top right logo, null for none</param> /// <param name="pages">Array of WizardPages for this WizardsPage</param> /// <param name="wizardAction">The Method that will be executed after 'finish'</param> ! public static void ShowWizard(String title, Bitmap logo, WizardPage[] pages, WizardAction wizardAction) { System.Diagnostics.Debug.WriteLine("WizardsBase::showWizard"); ! Thread t = new Thread(new ThreadStart(new WizardThread(pages, wizardAction, title, logo).Run)); t.Start(); } --- 51,60 ---- /// </summary> /// <param name="title">The forms title</param> /// <param name="pages">Array of WizardPages for this WizardsPage</param> /// <param name="wizardAction">The Method that will be executed after 'finish'</param> ! public static void ShowWizard(String title, WizardPage[] pages, WizardAction wizardAction) { System.Diagnostics.Debug.WriteLine("WizardsBase::showWizard"); ! Thread t = new Thread(new ThreadStart(new WizardThread(pages, wizardAction, title).Run)); t.Start(); } *************** *** 74,83 **** /// </summary> /// <param name="title">The forms title</param> - /// <param name="logo">custom top right logo, null for none</param> /// <param name="pages">Array of WizardPages for this WizardsPage</param> /// <param name="wizardAction">The Method that will be executed after 'finish'</param> ! public static void ShowNonThreadedWizard(String title, Bitmap logo, WizardPage[] pages, WizardAction wizardAction) { ! new WizardThread(pages, wizardAction, title, logo).Run(); } --- 66,74 ---- /// </summary> /// <param name="title">The forms title</param> /// <param name="pages">Array of WizardPages for this WizardsPage</param> /// <param name="wizardAction">The Method that will be executed after 'finish'</param> ! public static void ShowNonThreadedWizard(String title, WizardPage[] pages, WizardAction wizardAction) { ! new WizardThread(pages, wizardAction, title).Run(); } *************** *** 177,181 **** /// Get the tabpane to show our pages. /// </summary> ! public void InitPages() { this.tabWizardPages.SuspendLayout(); --- 168,172 ---- /// Get the tabpane to show our pages. /// </summary> ! public virtual void InitPages() { this.tabWizardPages.SuspendLayout(); *************** *** 190,199 **** tb.Controls.Add(wp); - //custom logo - if(m_Logo != null) - { - wp.pictWizLogo.Image = m_Logo.GetThumbnailImage(48,48,null,IntPtr.Zero); - } - this.tabWizardPages.Controls.Add(tb); } --- 181,184 ---- *************** *** 378,382 **** } } ! /// <summary> /// The form to show. --- 363,372 ---- } } ! ! /////////////////////////////////////////////////////////////////////// ! // ! // WizardThread Class ! // ! #region /// <summary> /// The form to show. *************** *** 389,400 **** protected WizardBase.WizardAction m_Action; protected String m_Title; - protected Bitmap m_Logo = null; ! public WizardThread(WizardPage[] pages, WizardBase.WizardAction act, String title, Bitmap logo) { m_Pages = pages; this.m_Action = act; this.m_Title = title; - this.m_Logo = logo; } --- 379,388 ---- protected WizardBase.WizardAction m_Action; protected String m_Title; ! public WizardThread(WizardPage[] pages, WizardBase.WizardAction act, String title) { m_Pages = pages; this.m_Action = act; this.m_Title = title; } *************** *** 411,415 **** m_Form.AddWizardPage(m_Pages[i]); } - m_Form.Logo = m_Logo; m_Form.InitPages(); System.Diagnostics.Debug.WriteLine("Showing wizard..."); --- 399,402 ---- *************** *** 442,444 **** --- 429,432 ---- } } + #endregion } |
From: Lesley v. Z. <ex...@us...> - 2004-07-22 14:07:15
|
Update of /cvsroot/mmclibrary/mmclibrary/MMCLib2/Nodes/NodeEvents In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv17366/Nodes/NodeEvents Modified Files: NodeEvents.cs Log Message: Reordening methods/properties/members/constructors Class FilterArgs: changed m_col and m_param to _col and _param because they are private Made sure the ArrayLists for Menus are created when needed, not when started Index: NodeEvents.cs =================================================================== RCS file: /cvsroot/mmclibrary/mmclibrary/MMCLib2/Nodes/NodeEvents/NodeEvents.cs,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** NodeEvents.cs 2 Jul 2004 13:57:38 -0000 1.1 --- NodeEvents.cs 22 Jul 2004 14:07:05 -0000 1.2 *************** *** 8,12 **** /// <summary> ! /// Summary description for NodeEvents. /// </summary> public class NodeEventArgs : EventArgs --- 8,12 ---- /// <summary> ! /// Base Class /// </summary> public class NodeEventArgs : EventArgs *************** *** 117,124 **** public class FilterArgs: NodeEventArgs { ! private int m_col; ! private RECT m_param; ! public FilterArgs(int col, RECT data) { m_col = col;m_param = data;} } --- 117,124 ---- public class FilterArgs: NodeEventArgs { ! private int _col; ! private RECT _param; ! public FilterArgs(int col, RECT data) { _col = col; _param = data;} } |
From: Lesley v. Z. <ex...@us...> - 2004-07-22 14:07:15
|
Update of /cvsroot/mmclibrary/mmclibrary/MMCLib2/Core In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv17366/Core Modified Files: About.cs ComStream.cs Component.cs EventHandlerSet.cs MenuItem.cs SnapinBase.cs SnapinInfo.cs Log Message: Reordening methods/properties/members/constructors Class FilterArgs: changed m_col and m_param to _col and _param because they are private Made sure the ArrayLists for Menus are created when needed, not when started Index: ComStream.cs =================================================================== RCS file: /cvsroot/mmclibrary/mmclibrary/MMCLib2/Core/ComStream.cs,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** ComStream.cs 21 Jul 2004 15:16:22 -0000 1.2 --- ComStream.cs 22 Jul 2004 14:07:04 -0000 1.3 *************** *** 15,19 **** protected int m_writeCount = 0; - #region Com Stream Property protected UCOMIStream m_comStream; public UCOMIStream comStream --- 15,18 ---- *************** *** 22,26 **** set { m_comStream = value; } } - #endregion /// <summary> --- 21,24 ---- *************** *** 33,36 **** --- 31,38 ---- } + /////////////////////////////////////////////////////////////////////// + // + // Stream Interface + // #region Stream interface Index: About.cs =================================================================== RCS file: /cvsroot/mmclibrary/mmclibrary/MMCLib2/Core/About.cs,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** About.cs 21 Jul 2004 15:16:08 -0000 1.4 --- About.cs 22 Jul 2004 14:07:04 -0000 1.5 *************** *** 29,40 **** private const int largeImageIndex = 3; ! #region properties / members ! ! #region Description /// <summary> /// A long description of the snapin /// </summary> string m_Description; ! /// <summary> /// Get or set the description --- 29,87 ---- private const int largeImageIndex = 3; ! /////////////////////////////////////////////////////////////////////// ! // ! // Members ! // /// <summary> /// A long description of the snapin /// </summary> + #region string m_Description; ! ! /// <summary> ! /// the organization providing the snapin ! /// </summary> ! string m_Provider; ! ! /// <summary> ! /// the version of the snapin: TBD: tie this to the assembly version? ! /// </summary> ! string m_Version; ! ! /// <summary> ! /// embedded image name for main icon ! /// </summary> ! string m_MainIconName; ! ! /// <summary> ! /// embedded image name for main icon ! /// </summary> ! string m_SmallOpenName; ! ! /// <summary> ! /// embedded image name for Small Open image ! /// </summary> ! string m_SmallClosedName; ! ! /// <summary> ! /// embedded image name for small closed image ! /// </summary> ! string m_LargeName; ! ! /// <summary> ! /// RGB color value describing the transparent color ! /// The color mask is important when the color depth of the screen is not 32. ! /// In this case, the unmanaged bitmaps must be translated to the color depth ! /// of the screen and the color mask should specify Color.Black ! /// </summary> ! protected Color m_Mask; ! #endregion ! ! ! /////////////////////////////////////////////////////////////////////// ! // ! // Properties / Members ! // ! #region /// <summary> /// Get or set the description *************** *** 45,55 **** set { m_Description = value; } } - #endregion - - #region Provider - /// <summary> - /// the organization providing the snapin - /// </summary> - string m_Provider; /// <summary> --- 92,95 ---- *************** *** 61,71 **** set { m_Provider = value; } } - #endregion - - #region Version - /// <summary> - /// the version of the snapin: TBD: tie this to the assembly version? - /// </summary> - string m_Version; /// <summary> --- 101,104 ---- *************** *** 77,87 **** set { m_Version = value; } } - #endregion - - #region Main Icon Name - /// <summary> - /// embedded image name for main icon - /// </summary> - string m_MainIconName; /// <summary> --- 110,113 ---- *************** *** 97,107 **** } } - #endregion - - #region Small Open Icon Name - /// <summary> - /// embedded image name for main icon - /// </summary> - string m_SmallOpenName; /// <summary> --- 123,126 ---- *************** *** 117,127 **** } } - #endregion - - #region Small Closed Icon Name - /// <summary> - /// embedded image name for Small Open image - /// </summary> - string m_SmallClosedName; /// <summary> --- 136,139 ---- *************** *** 137,147 **** } } - #endregion - - #region Large Icon Name - /// <summary> - /// embedded image name for small closed image - /// </summary> - string m_LargeName; /// <summary> --- 149,152 ---- *************** *** 157,170 **** } } - #endregion - - #region Color Mask - /// <summary> - /// RGB color value describing the transparent color - /// The color mask is important when the color depth of the screen is not 32. - /// In this case, the unmanaged bitmaps must be translated to the color depth - /// of the screen and the color mask should specify Color.Black - /// </summary> - protected Color m_Mask; /// <summary> --- 162,165 ---- *************** *** 178,189 **** #endregion ! #endregion ! ! #region Implementation ! //////////////////////////////////////////////////////////////////// ! // ! // ISnapinAbout Implementation ! // ! /// <summary> /// ctor --- 173,181 ---- #endregion ! //////////////////////////////////////////////////////////////////// ! // ! // ISnapinAbout Implementation ! // ! #region /// <summary> /// ctor Index: MenuItem.cs =================================================================== RCS file: /cvsroot/mmclibrary/mmclibrary/MMCLib2/Core/MenuItem.cs,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** MenuItem.cs 21 Jul 2004 15:16:22 -0000 1.5 --- MenuItem.cs 22 Jul 2004 14:07:04 -0000 1.6 *************** *** 21,32 **** public event MenuCommandHandler Handler; ! #region Properties ! #region Name Property /// <summary> /// Name can support mnemonics like &File /// </summary> protected string m_Name; ! /// <summary> /// The menu display name --- 21,69 ---- public event MenuCommandHandler Handler; ! //Added by Alexander Kachalkov ! /// <summary> ! /// Specifies one or more of the flags (see CCM_SPECIAL enum in interfaces.cs) ! /// </summary> ! private CCM_SPECIAL _specialFlags = 0; ! //Added by Alexander Kachalkov ! /// <summary> ! /// Specifies one or more of the style flags (see MF enum in interfaces.cs) ! /// </summary> ! private MF _flags = 0; ! ! /////////////////////////////////////////////////////////////////////// ! // ! // Members ! // ! #region /// <summary> /// Name can support mnemonics like &File /// </summary> protected string m_Name; ! ! // added by Roman Kiss ! /// <summary> ! /// Flag to control visibility of the menu ! /// </summary> ! protected bool m_Visible; ! ! /// <summary> ! /// Text to display in the MMC status bar when the user ! /// hovers over the menu item ! /// </summary> ! protected string m_StatusText; ! ! /// <summary> ! /// The integer command that MMC uses when if fires the command ! /// </summary> ! protected int m_nCommandId; ! #endregion ! ! /////////////////////////////////////////////////////////////////////// ! // ! // Properties ! // ! #region /// <summary> /// The menu display name *************** *** 37,48 **** set{ m_Name = value; } } - #endregion - - #region Visible Property - // added by Roman Kiss - /// <summary> - /// Flag to control visibility of the menu - /// </summary> - protected bool m_Visible; /// <summary> --- 74,77 ---- *************** *** 55,66 **** set{ m_Visible = value; } } - #endregion - - #region Status Text Property - /// <summary> - /// Text to display in the MMC status bar when the user - /// hovers over the menu item - /// </summary> - protected string m_StatusText; /// <summary> --- 84,87 ---- *************** *** 72,82 **** set{ m_StatusText = value; } } - #endregion - - #region CommandId Property - /// <summary> - /// The integer command that MMC uses when if fires the command - /// </summary> - protected int m_nCommandId; /// <summary> --- 93,96 ---- *************** *** 88,99 **** set{ m_nCommandId = value; } } - #endregion - #region SpecialFlag Property - //Added by Alexander Kachalkov /// <summary> /// Specifies one or more of the flags (see CCM_SPECIAL enum in interfaces.cs) /// </summary> - private CCM_SPECIAL _specialFlags = 0; public CCM_SPECIAL SpecialFlags { --- 102,109 ---- *************** *** 101,112 **** set { _specialFlags = value; } } - #endregion ! #region Flags Property ! //Adde by Alexander Kachalkov ! /// <summary> ! /// Specifies one or more of the style flags (see MF enum in interfaces.cs) ! /// </summary> ! private MF _flags = 0; public MF Flags { --- 111,118 ---- set { _specialFlags = value; } } ! /// <summary> ! /// Specifies one or more of the style flags (see MF enum in interfaces.cs) ! /// </summary> public MF Flags { *************** *** 116,121 **** #endregion ! #endregion ! /// <summary> /// default ctor --- 122,130 ---- #endregion ! /////////////////////////////////////////////////////////////////////// ! // ! // Constructors ! // ! #region /// <summary> /// default ctor *************** *** 155,158 **** --- 164,168 ---- _flags = flags; } + #endregion /// <summary> Index: SnapinInfo.cs =================================================================== RCS file: /cvsroot/mmclibrary/mmclibrary/MMCLib2/Core/SnapinInfo.cs,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** SnapinInfo.cs 21 Jul 2004 15:16:22 -0000 1.2 --- SnapinInfo.cs 22 Jul 2004 14:07:04 -0000 1.3 *************** *** 12,21 **** public class SnapinInAttribute : System.Attribute { ! #region Name Property ! /// <summary> ! /// The name ! /// </summary> ! protected string m_name; /// <summary> /// The name --- 12,44 ---- public class SnapinInAttribute : System.Attribute { ! /////////////////////////////////////////////////////////////////////// ! // ! // Properties ! // ! #region ! /// <summary> ! /// The name ! /// </summary> ! protected string m_name; ! /// <summary> ! /// The company name ! /// </summary> ! protected string m_provider; ! /// <summary> ! /// the snapin version ! /// </summary> ! protected string m_version; ! /// <summary> ! /// Standalon boolean ! /// </summary> ! protected bool m_standAlone; ! ! #endregion + /////////////////////////////////////////////////////////////////////// + // + // Properties + // + #region /// <summary> /// The name *************** *** 26,36 **** set { m_name = value; } } - #endregion - - #region Provider Property - /// <summary> - /// The company name - /// </summary> - protected string m_provider; /// <summary> --- 49,52 ---- *************** *** 42,52 **** set { m_provider = value; } } - #endregion - - #region Version Property - /// <summary> - /// the snapin version - /// </summary> - protected string m_version; /// <summary> --- 58,61 ---- *************** *** 57,67 **** get { return m_version; } } - #endregion - - #region Standalone Property - /// <summary> - /// Standalon boolean - /// </summary> - protected bool m_standAlone; /// <summary> --- 66,69 ---- *************** *** 73,80 **** set { m_standAlone = value; } } - #endregion ! #region Implementation /// <summary> /// Default ctor initialize to begnin values --- 75,85 ---- set { m_standAlone = value; } } #endregion ! /////////////////////////////////////////////////////////////////////// ! // ! // Implementation ! // ! #region /// <summary> /// Default ctor initialize to begnin values Index: Component.cs =================================================================== RCS file: /cvsroot/mmclibrary/mmclibrary/MMCLib2/Core/Component.cs,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -d -r1.13 -r1.14 *** Component.cs 21 Jul 2004 15:16:22 -0000 1.13 --- Component.cs 22 Jul 2004 14:07:04 -0000 1.14 *************** *** 16,19 **** --- 16,24 ---- public class Component : IComponent, IExtendContextMenu, IExtendControlbar, IExtendPropertySheet { + ////////////////////////////////////////////////////////////// + // + // Members + // + #region /// <summary> /// cache the MMC Console interface *************** *** 37,41 **** protected SnapinBase m_Snapin; - #region Toolbar Buttons Property //Added by Alexander Kachalkov /// <summary> --- 42,45 ---- *************** *** 43,47 **** /// </summary> protected MMCBUTTON[] m_ToolbarButtons; ! //Added by Alexander Kachalkov /// <summary> --- 47,67 ---- /// </summary> protected MMCBUTTON[] m_ToolbarButtons; ! ! /// <summary> ! /// Toolbar image index in the global collection ! /// </summary> ! protected int m_ToolbarImageIndex; ! ! /// <summary> ! /// Used to Enable/Disable Multiselection mode ! /// </summary> ! protected bool m_MultiSelectionMode = false; ! #endregion ! ! ////////////////////////////////////////////////////////////// ! // ! // Properties ! // ! #region //Added by Alexander Kachalkov /// <summary> *************** *** 53,64 **** set{m_ToolbarButtons = value;} } - #endregion - - #region Toolbar Image Index Property - /// <summary> - /// Toolbar image index in the global collection - /// </summary> - protected int m_ToolbarImageIndex; - //Added by Alexander Kachalkov /// <summary> --- 73,76 ---- *************** *** 70,77 **** set{m_ToolbarImageIndex = value;} } - #endregion - #region Multiselect Mode property - protected bool m_MultiSelectionMode = false; /// <summary> /// Enable/Disable Multiselection mode --- 82,86 ---- Index: EventHandlerSet.cs =================================================================== RCS file: /cvsroot/mmclibrary/mmclibrary/MMCLib2/Core/EventHandlerSet.cs,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** EventHandlerSet.cs 21 Jul 2004 15:16:22 -0000 1.3 --- EventHandlerSet.cs 22 Jul 2004 14:07:04 -0000 1.4 *************** *** 18,27 **** protected Hashtable m_events = new Hashtable(); ! #region Implementation ! ///////////////////////////////////////////////////////////////// ! // ! // Implementation ! // ! /// <summary> /// get and set events in the set --- 18,26 ---- protected Hashtable m_events = new Hashtable(); ! /////////////////////////////////////////////////////////////////////// ! // ! // Implementation ! // ! #region /// <summary> /// get and set events in the set Index: SnapinBase.cs =================================================================== RCS file: /cvsroot/mmclibrary/mmclibrary/MMCLib2/Core/SnapinBase.cs,v retrieving revision 1.16 retrieving revision 1.17 diff -C2 -d -r1.16 -r1.17 *** SnapinBase.cs 21 Jul 2004 15:16:22 -0000 1.16 --- SnapinBase.cs 22 Jul 2004 14:07:04 -0000 1.17 *************** *** 35,90 **** ,IPersistStream { - #region Current Scope Node Property - // Added by MAM /// <summary> ! /// The scope node that is currently selected for this snapin. This is needed ! /// for component.cs which goes through hoops to get the currently selected ! /// ScopeNode. ! /// </summary> ! protected BaseNode m_currentScopeNode; ! public BaseNode CurrentScopeNode ! { ! get { return m_currentScopeNode; } ! set { m_currentScopeNode = value; } ! } ! #endregion ! ! #region Images Property ! /// <summary> ! /// global images collection ! /// </summary> ! protected ImageList m_Images = new ImageList(); ! ! //Added by Alexander Kachalkov ! /// <summary> ! /// Global images collection ! /// Using it from Component class while creating Toolbar. ! /// </summary> ! public ImageList Images ! { ! get { return m_Images; } ! } ! #endregion ! ! /// <summary> ! /// Used for both ScopeNodeSelected and SelectedScopeNodes Property ! /// </summary> ! protected BaseNode m_selectedNodes = null; ! ! /// <summary> ! /// Is there currently a scope node selected? /// </summary> ! public virtual bool ScopeNodeSelected ! { ! get { return m_selectedNodes != null; } ! } ! /// <summary> ! /// Get the set of selected scope nodes. In MMC this always returns 0 or 1 nodes. ! /// </summary> ! public virtual BaseNode SelectedScopeNodes ! { ! get { return this.m_selectedNodes; } ! } /// <summary> --- 35,48 ---- ,IPersistStream { /// <summary> ! /// /// </summary> ! public System.Windows.Forms.ContextMenu FilterMenu; ! /////////////////////////////////////////////////////////////////////// ! // ! // Members ! // ! #region /// <summary> *************** *** 121,127 **** /// <summary> ! /// /// </summary> ! public System.Windows.Forms.ContextMenu FilterMenu; /// <summary> --- 79,146 ---- /// <summary> ! /// The scope node that is currently selected for this snapin. This is needed ! /// for component.cs which goes through hoops to get the currently selected ! /// ScopeNode. /// </summary> ! protected BaseNode m_currentScopeNode; ! ! /// <summary> ! /// global images collection ! /// </summary> ! protected ImageList m_Images = new ImageList(); ! ! /// <summary> ! /// Used for both ScopeNodeSelected and SelectedScopeNodes Property ! /// </summary> ! protected BaseNode m_selectedNodes = null; ! ! /// <summary> ! /// Represents the window handle that the control is bound to. ! /// </summary> ! protected IntPtr m_Handle; ! #endregion ! ! /////////////////////////////////////////////////////////////////////// ! // ! // Properties ! // ! #region ! // Added by MAM ! /// <summary> ! /// The scope node that is currently selected for this snapin. This is needed ! /// for component.cs which goes through hoops to get the currently selected ! /// ScopeNode. ! /// </summary> ! public BaseNode CurrentScopeNode ! { ! get { return m_currentScopeNode; } ! set { m_currentScopeNode = value; } ! } ! ! //Added by Alexander Kachalkov ! /// <summary> ! /// Global images collection ! /// Using it from Component class while creating Toolbar. ! /// </summary> ! public ImageList Images ! { ! get { return m_Images; } ! } ! ! /// <summary> ! /// Is there currently a scope node selected? ! /// </summary> ! public virtual bool ScopeNodeSelected ! { ! get { return m_selectedNodes != null; } ! } ! ! /// <summary> ! /// Get the set of selected scope nodes. In MMC this always returns 0 or 1 nodes. ! /// </summary> ! public virtual BaseNode SelectedScopeNodes ! { ! get { return this.m_selectedNodes; } ! } /// <summary> *************** *** 172,181 **** } } - - #region Handle Property - /// <summary> - /// Represents the window handle that the control is bound to. - /// </summary> - protected IntPtr m_Handle; /// <summary> --- 191,194 ---- *************** *** 883,887 **** // IPersistStream implementation. // ! #region IPersistStream /// <summary> /// The state for this snapin. --- 896,900 ---- // IPersistStream implementation. // ! #region /// <summary> /// The state for this snapin. |
From: Lesley v. Z. <ex...@us...> - 2004-07-22 14:07:14
|
Update of /cvsroot/mmclibrary/mmclibrary/MMCLib2 In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv17366 Modified Files: MMCLib2.csproj TODO.txt Log Message: Reordening methods/properties/members/constructors Class FilterArgs: changed m_col and m_param to _col and _param because they are private Made sure the ArrayLists for Menus are created when needed, not when started Index: TODO.txt =================================================================== RCS file: /cvsroot/mmclibrary/mmclibrary/MMCLib2/TODO.txt,v retrieving revision 1.16 retrieving revision 1.17 diff -C2 -d -r1.16 -r1.17 *** TODO.txt 21 Jul 2004 15:26:46 -0000 1.16 --- TODO.txt 22 Jul 2004 14:07:03 -0000 1.17 *************** *** 12,15 **** --- 12,18 ---- 7) Add a C++.net MMCTest2 + 8) Create a BaseNode::CopyNode() (Type to create the new node) <-- tried before, failed + ps. the numbers are just indexes, no priority whatsoever + Index: MMCLib2.csproj =================================================================== RCS file: /cvsroot/mmclibrary/mmclibrary/MMCLib2/MMCLib2.csproj,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** MMCLib2.csproj 20 Jul 2004 15:06:26 -0000 1.11 --- MMCLib2.csproj 22 Jul 2004 14:07:03 -0000 1.12 *************** *** 226,234 **** /> <File - RelPath = "Nodes\ListNode.cs" - SubType = "Code" - BuildAction = "Compile" - /> - <File RelPath = "Nodes\OCXNode.cs" SubType = "Code" --- 226,229 ---- |
From: Lesley v. Z. <ex...@us...> - 2004-07-21 15:26:55
|
Update of /cvsroot/mmclibrary/mmclibrary/MMCLib2 In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv11623 Modified Files: TODO.txt Log Message: updated Index: TODO.txt =================================================================== RCS file: /cvsroot/mmclibrary/mmclibrary/MMCLib2/TODO.txt,v retrieving revision 1.15 retrieving revision 1.16 diff -C2 -d -r1.15 -r1.16 *** TODO.txt 16 Jul 2004 14:13:22 -0000 1.15 --- TODO.txt 21 Jul 2004 15:26:46 -0000 1.16 *************** *** 4,7 **** --- 4,8 ---- 3) no renaming/cutable/pasteable/deleteable on resultItems? 4) Fix the ordening of the methods / properties / ctors / members + - done for Core 5) MMCTest2: *************** *** 10,14 **** 6) Add a VB.net MMCTest2 7) Add a C++.net MMCTest2 - 8) Remove the logo in wizard code, should be able to set through the designer ps. the numbers are just indexes, no priority whatsoever --- 11,14 ---- |
From: Lesley v. Z. <ex...@us...> - 2004-07-21 15:26:34
|
Update of /cvsroot/mmclibrary/mmclibrary/MMCLib2 In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv11579 Modified Files: Changelog.txt Log Message: reorganized Index: Changelog.txt =================================================================== RCS file: /cvsroot/mmclibrary/mmclibrary/MMCLib2/Changelog.txt,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** Changelog.txt 20 Jul 2004 15:06:25 -0000 1.4 --- Changelog.txt 21 Jul 2004 15:26:25 -0000 1.5 *************** *** 27,67 **** Core/Component.cs: ! - Added support for PropertyPages on the ResultItems of a ResultNode Core/SnapinBase: ! - Added support for SnapinManagers Nodes/BaseNode.cs: ! - Added Selection registering ! - Added a virtual property for Menus/Tasks/ResultViewImages ! - Added better ctors with icon handling Nodes/FormNode: ! - Added better ctors with icon handling ! - Made some properties virtual Nodes/OCXNode: ! - Added better ctors with icon handling ! - Made some properties virtual Nodes/ReportNode: ! - No longer works with DataTables ! - Has a virtual property for ResultViewItems,ResultViewColumns ! - Added a GetCurrentSelected, this method is used in stead of GetSelectedItem() it's able to return multiple items. ! To use it with non-multiselect: GetCurrentSelected()[0]; ! NOTE: Not sure about the removing of GetSelectedItem, maybe we should use 'GetSelectedItem()' and 'GetSelectedItems()' ! - Added ctors with icon handling Nodes/DataTableNode: ! - Copy of the MMCLib1 ReportNode for backwards compatibility, The only changes I made where to be able to compile. ! NOTE: this node is deprecated and may eventually be removed. PropertyPages/PropertyPage: ! - Added Multiselection possibilites (not implemented yet) ! - Added support for ResultItem PropertyPages ! - Added a reference too the node before the sheet is initialised PropertyPages/ProperySheet: ! - Added a property to get the propertypages ResultItem --- 27,67 ---- Core/Component.cs: ! - Added support for PropertyPages on the ResultItems of a ResultNode Core/SnapinBase: ! - Added support for SnapinManagers Nodes/BaseNode.cs: ! - Added Selection registering ! - Added a virtual property for Menus/Tasks/ResultViewImages ! - Added better ctors with icon handling Nodes/FormNode: ! - Added better ctors with icon handling ! - Made some properties virtual Nodes/OCXNode: ! - Added better ctors with icon handling ! - Made some properties virtual Nodes/ReportNode: ! - No longer works with DataTables ! - Has a virtual property for ResultViewItems,ResultViewColumns ! - Added a GetCurrentSelected, this method is used in stead of GetSelectedItem() it's able to return multiple items. ! To use it with non-multiselect: GetCurrentSelected()[0]; ! NOTE: Not sure about the removing of GetSelectedItem, maybe we should use 'GetSelectedItem()' and 'GetSelectedItems()' ! - Added ctors with icon handling Nodes/DataTableNode: ! - Copy of the MMCLib1 ReportNode for backwards compatibility, The only changes I made where to be able to compile. ! NOTE: this node is deprecated and may eventually be removed. PropertyPages/PropertyPage: ! - Added Multiselection possibilites (not implemented yet) ! - Added support for ResultItem PropertyPages ! - Added a reference too the node before the sheet is initialised PropertyPages/ProperySheet: ! - Added a property to get the propertypages ResultItem |
Update of /cvsroot/mmclibrary/mmclibrary/MMCLib2/Core In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv9415 Modified Files: About.cs ComStream.cs Component.cs EventHandlerSet.cs ExceptionHandler.cs MenuItem.cs SnapinBase.cs SnapinInfo.cs Log Message: Added comments / reorganized some classes Index: ComStream.cs =================================================================== RCS file: /cvsroot/mmclibrary/mmclibrary/MMCLib2/Core/ComStream.cs,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** ComStream.cs 31 Mar 2004 07:58:44 -0000 1.1 --- ComStream.cs 21 Jul 2004 15:16:22 -0000 1.2 *************** *** 15,43 **** protected int m_writeCount = 0; protected UCOMIStream m_comStream; ! public UCOMIStream comStream { get { return m_comStream; } set { m_comStream = value; } } ! public ComStream(UCOMIStream stream) : base() { comStream = stream; } #region Stream interface ! public override bool CanRead { get { return true; } } ! public override bool CanSeek { get { return true; } } ! public override bool CanWrite { get { return true; } } ! public override long Length { ! get { System.Runtime.InteropServices.STATSTG pstatstg; this.comStream.Stat(out pstatstg, 0); --- 15,69 ---- protected int m_writeCount = 0; + #region Com Stream Property protected UCOMIStream m_comStream; ! public UCOMIStream comStream ! { get { return m_comStream; } set { m_comStream = value; } } + #endregion ! /// <summary> ! /// ctor ! /// </summary> ! /// <param name="stream">The UCOMIStream to wrap</param> ! public ComStream(UCOMIStream stream) : base() ! { comStream = stream; } #region Stream interface ! ! /// <summary> ! /// Always return true ! /// </summary> ! public override bool CanRead ! { get { return true; } } ! /// <summary> ! /// Always returns true ! /// </summary> ! public override bool CanSeek ! { get { return true; } } ! /// <summary> ! /// Always returns true ! /// </summary> ! public override bool CanWrite ! { get { return true; } } ! /// <summary> ! /// Gets the length in bytes of the stream ! /// </summary> ! public override long Length ! { ! get ! { System.Runtime.InteropServices.STATSTG pstatstg; this.comStream.Stat(out pstatstg, 0); *************** *** 46,56 **** } ! public override long Position { ! get { System.IntPtr ptr = new System.IntPtr(); this.comStream.Seek(0, (int)SeekOrigin.Current, ptr); return ptr.ToInt64(); } ! set { System.IntPtr ptr = new System.IntPtr(); this.comStream.Seek(value, (int)SeekOrigin.Begin, ptr); --- 72,88 ---- } ! /// <summary> ! /// Gets or sets the position within the current stream. ! /// </summary> ! public override long Position ! { ! get ! { System.IntPtr ptr = new System.IntPtr(); this.comStream.Seek(0, (int)SeekOrigin.Current, ptr); return ptr.ToInt64(); } ! set ! { System.IntPtr ptr = new System.IntPtr(); this.comStream.Seek(value, (int)SeekOrigin.Begin, ptr); *************** *** 58,63 **** } ! public override void Close() { ! if(this.comStream != null) { this.comStream.Commit(0); // Make sure we really unwrap. --- 90,100 ---- } ! /// <summary> ! /// Closes the current stream and releases any resources associated with the stream. ! /// </summary> ! public override void Close() ! { ! if(this.comStream != null) ! { this.comStream.Commit(0); // Make sure we really unwrap. *************** *** 66,75 **** } ! public override void Flush() { ! if(this.comStream != null) { this.comStream.Commit(0); - } } public override long Seek(long offset, SeekOrigin origin) { System.IntPtr newPos = new System.IntPtr(); --- 103,121 ---- } ! /// <summary> ! /// Clears all buffers for this stream and causes any buffered data to be written to the underlying device. ! /// </summary> ! public override void Flush() ! { ! if(this.comStream != null) this.comStream.Commit(0); } + /// <summary> + /// Sets the position within the current stream. + /// </summary> + /// <param name="offset">A byte offset relative to the origin parameter</param> + /// <param name="origin">A value of type SeekOrigin indicating the reference point used to obtain the new position</param> + /// <returns></returns> public override long Seek(long offset, SeekOrigin origin) { System.IntPtr newPos = new System.IntPtr(); *************** *** 78,82 **** } ! public override int Read([In,Out] byte[] buffer, int offset, int count) { byte[] buf = new byte[count]; System.IntPtr lenPtr = new System.IntPtr(); --- 124,140 ---- } ! /// <summary> ! /// Reads a sequence of bytes from the current stream and advances the position within the stream ! /// by the number of bytes read. ! /// </summary> ! /// <param name="buffer">An array of bytes. When this method returns, the buffer contains the specified ! /// byte array with the values between offset and (offset + count- 1) replaced by the bytes read from the ! /// current source.</param> ! /// <param name="offset">The zero-based byte offset in buffer at which to begin storing the data read ! /// from the current stream.</param> ! /// <param name="count">The maximum number of bytes to be read from the current stream.</param> ! /// <returns></returns> ! public override int Read([In,Out] byte[] buffer, int offset, int count) ! { byte[] buf = new byte[count]; System.IntPtr lenPtr = new System.IntPtr(); *************** *** 86,109 **** System.Diagnostics.Debug.WriteLine("Read: " + m_readCount + " bytes of the requested: " + count + " bytes"); int pos=0; ! //while(pos < len) { ! while(pos < count) { buffer[offset++] = buf[pos++]; ! } ! //return lenPtr.ToInt32(); return count; } ! public override void SetLength(long value) { this.comStream.SetSize(value); } ! public override void Write(byte[] buffer, int offset, int count) { System.IntPtr writtenPtr = new System.IntPtr(); byte[] buf = new byte[count]; m_writeCount += count; System.Diagnostics.Debug.WriteLine("Wrote: " + m_writeCount + " bytes"); ! for(int i=0; i<count; i++) { buf[i] = buffer[offset+i]; - } this.comStream.Write(buf, count, writtenPtr); --- 144,177 ---- System.Diagnostics.Debug.WriteLine("Read: " + m_readCount + " bytes of the requested: " + count + " bytes"); int pos=0; ! while(pos < count) buffer[offset++] = buf[pos++]; ! return count; } ! /// <summary> ! /// Sets the length of the current stream ! /// </summary> ! /// <param name="value"></param> ! public override void SetLength(long value) ! { this.comStream.SetSize(value); } ! /// <summary> ! /// writes a sequence of bytes to the current stream and advances the current position within ! /// this stream by the number of bytes written. ! /// </summary> ! /// <param name="buffer">An array of bytes. This method copies count bytes from buffer to the current stream.</param> ! /// <param name="offset">The zero-based byte offset in buffer at which to begin copying bytes to the current stream.</param> ! /// <param name="count">The number of bytes to be written to the current stream.</param> ! public override void Write(byte[] buffer, int offset, int count) ! { System.IntPtr writtenPtr = new System.IntPtr(); byte[] buf = new byte[count]; m_writeCount += count; System.Diagnostics.Debug.WriteLine("Wrote: " + m_writeCount + " bytes"); ! for(int i=0; i<count; i++) buf[i] = buffer[offset+i]; this.comStream.Write(buf, count, writtenPtr); Index: About.cs =================================================================== RCS file: /cvsroot/mmclibrary/mmclibrary/MMCLib2/Core/About.cs,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** About.cs 13 Jul 2004 15:36:51 -0000 1.3 --- About.cs 21 Jul 2004 15:16:08 -0000 1.4 *************** *** 17,58 **** { /// <summary> - /// A long description of the snapin - /// </summary> - string m_Description; - - /// <summary> - /// the organization providing the snapin - /// </summary> - string m_Provider; - - /// <summary> - /// the version of the snapin: TBD: tie this to the assembly version? - /// </summary> - string m_Version; - - /// <summary> - /// embedded image name for main icon - /// </summary> - string m_MainIconName; - - /// <summary> - /// embedded image name for main icon - /// </summary> - string m_SmallOpenName; - - /// <summary> - /// embedded image name for Small Open image - /// </summary> - string m_SmallClosedName; - - /// <summary> - /// embedded image name for small closed image - /// </summary> - string m_LargeName; - - /// <summary> /// ImageList contains images for all "about" images. /// </summary> ! ImageList staticFolderIcons = new ImageList(); /// <summary> --- 17,23 ---- { /// <summary> /// ImageList contains images for all "about" images. /// </summary> ! private ImageList staticFolderIcons = new ImageList(); /// <summary> *************** *** 64,144 **** private const int largeImageIndex = 3; ! /// <summary> ! /// RGB color value describing the transparent color ! /// The color mask is important when the color depth of the screen is not 32. ! /// In this case, the unmanaged bitmaps must be translated to the color depth ! /// of the screen and the color mask should specify Color.Black ! /// </summary> ! Color m_Mask; ! ! /////////////////////////////////////////////////////////////////// ! // ! // Implementation ! // ! ! /// <summary> ! /// ctor ! /// </summary> ! public About() ! { ! // lift the provider and version information from the ! // snapin attribute on the associated snapin class. ! ! object[] attrs = GetType().GetCustomAttributes(typeof(AboutSnapinAttribute), true); ! if (attrs.Length > 0) ! { ! AboutSnapinAttribute aboutAttrib = (AboutSnapinAttribute)attrs[0]; ! attrs = aboutAttrib.SnapinType.GetCustomAttributes(typeof(SnapinInAttribute), true); ! if (attrs.Length != 0) ! { ! SnapinInAttribute snapinAttrib = (SnapinInAttribute)attrs[0]; ! ! m_Provider = snapinAttrib.Provider; ! if (snapinAttrib.Version != null) ! m_Version = snapinAttrib.Version; ! else ! m_Version = GetType().Module.Assembly.GetName().Version.ToString(); ! } ! } ! ! m_Mask = Color.Black; ! ! staticFolderIcons.Insert(mainIconIndex, ""); ! staticFolderIcons.Insert(smallOpenImageIndex, ""); ! staticFolderIcons.Insert(smallClosedImageIndex, ""); ! staticFolderIcons.Insert(largeImageIndex, ""); ! } ! /// <summary> ! /// Get or set the description ! /// </summary> ! public string Description { get { return m_Description; } set { m_Description = value; } } /// <summary> ! /// Get or set the provider /// </summary> ! public string Provider { get { return m_Provider; } set { m_Provider = value; } } /// <summary> ! /// Get or set the version /// </summary> ! public string Version { get { return m_Version; } set { m_Version = value; } } ! /// <summary> ! /// Get or set the main icon name ! /// </summary> ! public string MainIconName { get { return m_MainIconName; } --- 29,92 ---- private const int largeImageIndex = 3; ! #region properties / members ! #region Description ! /// <summary> ! /// A long description of the snapin ! /// </summary> ! string m_Description; ! ! /// <summary> ! /// Get or set the description ! /// </summary> ! public string Description { get { return m_Description; } set { m_Description = value; } } + #endregion + #region Provider /// <summary> ! /// the organization providing the snapin /// </summary> ! string m_Provider; ! ! /// <summary> ! /// Get or set the provider ! /// </summary> ! public string Provider { get { return m_Provider; } set { m_Provider = value; } } + #endregion + #region Version /// <summary> ! /// the version of the snapin: TBD: tie this to the assembly version? /// </summary> ! string m_Version; ! ! /// <summary> ! /// Get or set the version ! /// </summary> ! public string Version { get { return m_Version; } set { m_Version = value; } } + #endregion ! #region Main Icon Name ! /// <summary> ! /// embedded image name for main icon ! /// </summary> ! string m_MainIconName; ! ! /// <summary> ! /// Get or set the main icon name ! /// </summary> ! public string MainIconName { get { return m_MainIconName; } *************** *** 149,156 **** } } ! ! /// <summary> ! /// Get or set the small open image name /// </summary> public string SmallOpenImageName { --- 97,111 ---- } } ! #endregion ! ! #region Small Open Icon Name ! /// <summary> ! /// embedded image name for main icon /// </summary> + string m_SmallOpenName; + + /// <summary> + /// Get or set the small open image name + /// </summary> public string SmallOpenImageName { *************** *** 162,170 **** } } /// <summary> ! /// Get or set the small closed image name /// </summary> ! public string SmallClosedImageName { get { return m_SmallClosedName; } --- 117,132 ---- } } + #endregion + #region Small Closed Icon Name /// <summary> ! /// embedded image name for Small Open image /// </summary> ! string m_SmallClosedName; ! ! /// <summary> ! /// Get or set the small closed image name ! /// </summary> ! public string SmallClosedImageName { get { return m_SmallClosedName; } *************** *** 175,183 **** } } ! /// <summary> ! /// Get or set the large image name /// </summary> ! public string LargeImageName { get { return m_LargeName; } --- 137,152 ---- } } + #endregion ! #region Large Icon Name ! /// <summary> ! /// embedded image name for small closed image /// </summary> ! string m_LargeName; ! ! /// <summary> ! /// Get or set the large image name ! /// </summary> ! public string LargeImageName { get { return m_LargeName; } *************** *** 188,206 **** } } ! /// <summary> ! /// Get or set the image color mask ! /// </summary> ! public Color ImageColorMask { get { return m_Mask; } set { m_Mask = value; } } //////////////////////////////////////////////////////////////////// // // ISnapinAbout Implementation // /// <summary> --- 157,221 ---- } } + #endregion ! #region Color Mask ! /// <summary> ! /// RGB color value describing the transparent color ! /// The color mask is important when the color depth of the screen is not 32. ! /// In this case, the unmanaged bitmaps must be translated to the color depth ! /// of the screen and the color mask should specify Color.Black ! /// </summary> ! protected Color m_Mask; ! ! /// <summary> ! /// Get or set the image color mask ! /// </summary> ! public Color ImageColorMask { get { return m_Mask; } set { m_Mask = value; } } + #endregion + #endregion + #region Implementation //////////////////////////////////////////////////////////////////// // // ISnapinAbout Implementation // + + /// <summary> + /// ctor + /// </summary> + public About() + { + // lift the provider and version information from the + // snapin attribute on the associated snapin class. + + object[] attrs = GetType().GetCustomAttributes(typeof(AboutSnapinAttribute), true); + if (attrs.Length > 0) + { + AboutSnapinAttribute aboutAttrib = (AboutSnapinAttribute)attrs[0]; + attrs = aboutAttrib.SnapinType.GetCustomAttributes(typeof(SnapinInAttribute), true); + if (attrs.Length != 0) + { + SnapinInAttribute snapinAttrib = (SnapinInAttribute)attrs[0]; + + m_Provider = snapinAttrib.Provider; + if (snapinAttrib.Version != null) + m_Version = snapinAttrib.Version; + else + m_Version = GetType().Module.Assembly.GetName().Version.ToString(); + } + } + + m_Mask = Color.Black; + + staticFolderIcons.Insert(mainIconIndex, ""); + staticFolderIcons.Insert(smallOpenImageIndex, ""); + staticFolderIcons.Insert(smallClosedImageIndex, ""); + staticFolderIcons.Insert(largeImageIndex, ""); + } /// <summary> *************** *** 257,260 **** --- 272,276 ---- cMask = (uint) m_Mask.ToArgb(); } + #endregion } } Index: MenuItem.cs =================================================================== RCS file: /cvsroot/mmclibrary/mmclibrary/MMCLib2/Core/MenuItem.cs,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** MenuItem.cs 8 Jul 2004 13:27:15 -0000 1.4 --- MenuItem.cs 21 Jul 2004 15:16:22 -0000 1.5 *************** *** 17,46 **** { /// <summary> ! /// Name can support mnemonics like &File ! /// </summary> ! protected string m_Name; ! ! // added by Roman Kiss ! /// <summary> ! /// Flag to control visibility of the menu ! /// </summary> ! protected bool m_Visible; ! ! /// <summary> ! /// Text to display in the MMC status bar when the user ! /// hovers over the menu item /// </summary> ! protected string m_StatusText; ! /// <summary> ! /// The integer command that MMC uses when if fires the command ! /// </summary> ! protected int m_nCommandId; /// <summary> ! /// Command handler event for revicing notifications fo the menu command /// </summary> ! public event MenuCommandHandler Handler; ! /// <summary> /// The menu display name --- 17,32 ---- { /// <summary> ! /// Command handler event for revicing notifications fo the menu command /// </summary> ! public event MenuCommandHandler Handler; ! #region Properties + #region Name Property /// <summary> ! /// Name can support mnemonics like &File /// </summary> ! protected string m_Name; ! /// <summary> /// The menu display name *************** *** 51,54 **** --- 37,48 ---- set{ m_Name = value; } } + #endregion + + #region Visible Property + // added by Roman Kiss + /// <summary> + /// Flag to control visibility of the menu + /// </summary> + protected bool m_Visible; /// <summary> *************** *** 61,64 **** --- 55,67 ---- set{ m_Visible = value; } } + #endregion + + #region Status Text Property + /// <summary> + /// Text to display in the MMC status bar when the user + /// hovers over the menu item + /// </summary> + protected string m_StatusText; + /// <summary> /// The silly status bar text *************** *** 69,73 **** --- 72,83 ---- set{ m_StatusText = value; } } + #endregion + #region CommandId Property + /// <summary> + /// The integer command that MMC uses when if fires the command + /// </summary> + protected int m_nCommandId; + /// <summary> /// the command Id *************** *** 78,82 **** --- 88,94 ---- set{ m_nCommandId = value; } } + #endregion + #region SpecialFlag Property //Added by Alexander Kachalkov /// <summary> *************** *** 89,93 **** set { _specialFlags = value; } } ! //Adde by Alexander Kachalkov /// <summary> --- 101,107 ---- set { _specialFlags = value; } } ! #endregion ! ! #region Flags Property //Adde by Alexander Kachalkov /// <summary> *************** *** 100,108 **** set { _flags = value; } } ! //////////////////////////////////////////////////////////////////////// ! // ! // Implementation ! // /// <summary> --- 114,120 ---- set { _flags = value; } } + #endregion ! #endregion /// <summary> Index: SnapinInfo.cs =================================================================== RCS file: /cvsroot/mmclibrary/mmclibrary/MMCLib2/Core/SnapinInfo.cs,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** SnapinInfo.cs 31 Mar 2004 07:58:44 -0000 1.1 --- SnapinInfo.cs 21 Jul 2004 15:16:22 -0000 1.2 *************** *** 12,15 **** --- 12,16 ---- public class SnapinInAttribute : System.Attribute { + #region Name Property /// <summary> /// The name *************** *** 17,25 **** --- 18,48 ---- protected string m_name; + /// <summary> + /// The name + /// </summary> + public string Namestring + { + get { return m_name; } + set { m_name = value; } + } + #endregion + + #region Provider Property /// <summary> /// The company name /// </summary> protected string m_provider; + + /// <summary> + /// Provider + /// </summary> + public string Provider + { + get { return m_provider; } + set { m_provider = value; } + } + #endregion + #region Version Property /// <summary> /// the snapin version *************** *** 27,30 **** --- 50,63 ---- protected string m_version; + /// <summary> + /// Version + /// </summary> + public string Version + { + get { return m_version; } + } + #endregion + + #region Standalone Property /// <summary> /// Standalon boolean *************** *** 32,41 **** protected bool m_standAlone; ! /////////////////////////////////////////////////////////////////////// ! // ! // Implementaiton ! // ! /// <summary> /// Default ctor initialize to begnin values --- 65,80 ---- protected bool m_standAlone; + /// <summary> + /// StandAlone + /// </summary> + public bool StandAlone + { + get { return m_standAlone; } + set { m_standAlone = value; } + } ! #endregion ! ! #region Implementation /// <summary> /// Default ctor initialize to begnin values *************** *** 90,130 **** m_standAlone = standAlone; } ! ! /// <summary> ! /// The name ! /// </summary> ! public string Namestring ! { ! get { return m_name; } ! set { m_name = value; } ! ! } ! ! /// <summary> ! /// StandAlone ! /// </summary> ! public bool StandAlone ! { ! get { return m_standAlone; } ! set { m_standAlone = value; } ! } ! ! /// <summary> ! /// Provider ! /// </summary> ! public string Provider ! { ! get { return m_provider; } ! set { m_provider = value; } ! } ! ! /// <summary> ! /// Version ! /// </summary> ! public string Version ! { ! get { return m_version; } ! } ! } --- 129,133 ---- m_standAlone = standAlone; } ! #endregion } Index: ExceptionHandler.cs =================================================================== RCS file: /cvsroot/mmclibrary/mmclibrary/MMCLib2/Core/ExceptionHandler.cs,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** ExceptionHandler.cs 8 Jul 2004 13:27:15 -0000 1.2 --- ExceptionHandler.cs 21 Jul 2004 15:16:22 -0000 1.3 *************** *** 6,17 **** { /// <summary> ! /// Summary description for ExceptionHandler. /// </summary> - // Creates a class to handle the exception event. public class CustomExceptionHandler { ! ! // Handles the exception event. ! public static void OnThreadException(object sender, ThreadExceptionEventArgs t) { DialogResult result = DialogResult.Cancel; --- 6,19 ---- { /// <summary> ! /// Creates a class to handle the exception event. /// </summary> public class CustomExceptionHandler { ! /// <summary> ! /// Handles the exception event. ! /// </summary> ! /// <param name="sender"></param> ! /// <param name="t"></param> ! public static void OnThreadException(object sender, ThreadExceptionEventArgs t) { DialogResult result = DialogResult.Cancel; *************** *** 40,45 **** } ! // Creates the error message and displays it. ! private static DialogResult ShowThreadExceptionDialog(Exception e) { string errorMsg = "An error occurred please contact the administrator with the following information:\n\n"; --- 42,51 ---- } ! /// <summary> ! /// Creates the error message and displays it. ! /// </summary> ! /// <param name="e"></param> ! /// <returns></returns> ! private static DialogResult ShowThreadExceptionDialog(Exception e) { string errorMsg = "An error occurred please contact the administrator with the following information:\n\n"; Index: Component.cs =================================================================== RCS file: /cvsroot/mmclibrary/mmclibrary/MMCLib2/Core/Component.cs,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** Component.cs 16 Jul 2004 14:13:23 -0000 1.12 --- Component.cs 21 Jul 2004 15:16:22 -0000 1.13 *************** *** 16,26 **** public class Component : IComponent, IExtendContextMenu, IExtendControlbar, IExtendPropertySheet { - protected bool m_MultiSelectionMode = false; - - public bool MultiSelectionMode - { - get{return m_MultiSelectionMode;} - } - /// <summary> /// cache the MMC Console interface --- 16,19 ---- *************** *** 34,52 **** protected IControlbar m_pControlbar; - //Added by Alexander Kachalkov /// <summary> ! /// Toolbar buttons array /// </summary> ! protected MMCBUTTON[] m_ToolbarButtons; /// <summary> ! /// cache the MMC Toolbar interface /// </summary> ! protected IToolbar m_pToolbar; /// <summary> ! /// Toolbar image index in the global collection /// </summary> ! protected int m_ToolbarImageIndex; //Added by Alexander Kachalkov --- 27,46 ---- protected IControlbar m_pControlbar; /// <summary> ! /// cache the MMC Toolbar interface /// </summary> ! protected IToolbar m_pToolbar; /// <summary> ! /// Back reference ot the Snapin Base object /// </summary> ! protected SnapinBase m_Snapin; + #region Toolbar Buttons Property + //Added by Alexander Kachalkov /// <summary> ! /// Toolbar buttons array /// </summary> ! protected MMCBUTTON[] m_ToolbarButtons; //Added by Alexander Kachalkov *************** *** 59,62 **** --- 53,63 ---- set{m_ToolbarButtons = value;} } + #endregion + + #region Toolbar Image Index Property + /// <summary> + /// Toolbar image index in the global collection + /// </summary> + protected int m_ToolbarImageIndex; //Added by Alexander Kachalkov *************** *** 69,77 **** set{m_ToolbarImageIndex = value;} } ! /// <summary> ! /// Back reference ot the Snapin Base object ! /// </summary> ! protected SnapinBase m_Snapin; ////////////////////////////////////////////////////////////// --- 70,85 ---- set{m_ToolbarImageIndex = value;} } + #endregion ! #region Multiselect Mode property ! protected bool m_MultiSelectionMode = false; ! /// <summary> ! /// Enable/Disable Multiselection mode ! /// </summary> ! public bool MultiSelectionMode ! { ! get{return m_MultiSelectionMode;} ! } ! #endregion ////////////////////////////////////////////////////////////// Index: EventHandlerSet.cs =================================================================== RCS file: /cvsroot/mmclibrary/mmclibrary/MMCLib2/Core/EventHandlerSet.cs,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** EventHandlerSet.cs 22 Apr 2004 12:33:34 -0000 1.2 --- EventHandlerSet.cs 21 Jul 2004 15:16:22 -0000 1.3 *************** *** 18,21 **** --- 18,22 ---- protected Hashtable m_events = new Hashtable(); + #region Implementation ///////////////////////////////////////////////////////////////// // *************** *** 75,78 **** --- 76,80 ---- m_events = null; } + #endregion } Index: SnapinBase.cs =================================================================== RCS file: /cvsroot/mmclibrary/mmclibrary/MMCLib2/Core/SnapinBase.cs,v retrieving revision 1.15 retrieving revision 1.16 diff -C2 -d -r1.15 -r1.16 *** SnapinBase.cs 16 Jul 2004 14:13:23 -0000 1.15 --- SnapinBase.cs 21 Jul 2004 15:16:22 -0000 1.16 *************** *** 35,38 **** --- 35,39 ---- ,IPersistStream { + #region Current Scope Node Property // Added by MAM /// <summary> *************** *** 42,53 **** /// </summary> protected BaseNode m_currentScopeNode; ! public BaseNode CurrentScopeNode { get { return m_currentScopeNode; } set { m_currentScopeNode = value; } } protected BaseNode m_selectedNodes = null; /// <summary> /// We only want to see one Manager per Snapin /// </summary> --- 43,92 ---- /// </summary> protected BaseNode m_currentScopeNode; ! public BaseNode CurrentScopeNode ! { get { return m_currentScopeNode; } set { m_currentScopeNode = value; } } + #endregion + + #region Images Property + /// <summary> + /// global images collection + /// </summary> + protected ImageList m_Images = new ImageList(); + + //Added by Alexander Kachalkov + /// <summary> + /// Global images collection + /// Using it from Component class while creating Toolbar. + /// </summary> + public ImageList Images + { + get { return m_Images; } + } + #endregion + /// <summary> + /// Used for both ScopeNodeSelected and SelectedScopeNodes Property + /// </summary> protected BaseNode m_selectedNodes = null; /// <summary> + /// Is there currently a scope node selected? + /// </summary> + public virtual bool ScopeNodeSelected + { + get { return m_selectedNodes != null; } + } + + /// <summary> + /// Get the set of selected scope nodes. In MMC this always returns 0 or 1 nodes. + /// </summary> + public virtual BaseNode SelectedScopeNodes + { + get { return this.m_selectedNodes; } + } + + /// <summary> /// We only want to see one Manager per Snapin /// </summary> *************** *** 75,104 **** //protected ArrayList m_Nodes = new ArrayList(16); protected HybridDictionary m_Nodes = new HybridDictionary(8); - protected int m_NodeId = 0; - - /// <summary> - /// global images collection - /// </summary> - protected ImageList m_Images = new ImageList(); - - public System.Windows.Forms.ContextMenu FilterMenu; - //Added by Alexander Kachalkov /// <summary> ! /// Global images collection ! /// Using it from Component class while creating Toolbar. /// </summary> ! public ImageList Images ! { ! get { return m_Images; } ! } /// <summary> ! /// Is there currently a scope node selected? /// </summary> ! public virtual bool ScopeNodeSelected ! { ! get { return m_selectedNodes != null; } ! } /// <summary> --- 114,127 ---- //protected ArrayList m_Nodes = new ArrayList(16); protected HybridDictionary m_Nodes = new HybridDictionary(8); /// <summary> ! /// /// </summary> ! protected int m_NodeId = 0; /// <summary> ! /// /// </summary> ! public System.Windows.Forms.ContextMenu FilterMenu; /// <summary> *************** *** 122,139 **** /// <summary> - /// Get the set of selected scope nodes. In MMC this always returns 0 or 1 nodes. - /// </summary> - public virtual BaseNode SelectedScopeNodes - { - get { return this.m_selectedNodes; } - } - - /// <summary> /// Get the last selected scope node. This is the node that is currently active, /// or the last node that was clicked before focus was transfered to the result-pane. /// </summary> - /// <remarks>The returned node is most probably a BaseNodeExt and in most - /// cases can be cast to one. - /// </remarks> public virtual BaseNode LastSelectedScopeNode { --- 145,151 ---- *************** *** 161,164 **** --- 173,177 ---- } + #region Handle Property /// <summary> /// Represents the window handle that the control is bound to. *************** *** 173,176 **** --- 186,190 ---- get {return m_Handle;} } + #endregion /// <summary> *************** *** 601,605 **** { WizardBase.ShowWizard( this.ManagerTitle, - this.ManagerLogo, this.Managers, new WizardBase.WizardAction(ManagerHandler)); --- 615,618 ---- *************** *** 619,629 **** } - protected Bitmap m_managerLogo = null; - public virtual Bitmap ManagerLogo - { - get{return m_managerLogo;} - set{m_managerLogo = value;} - } - // This is the method that handles the finish of the Wizard, in this example it does nothing // but this method could send data to a remote server or could adjust some nodes, be creative :) --- 632,635 ---- |
From: Lesley v. Z. <ex...@us...> - 2004-07-20 15:06:37
|
Update of /cvsroot/mmclibrary/mmclibrary/MMCLib2 In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv18282 Modified Files: Changelog.txt Interfaces.cs MMCLib2.csproj MMCLib2.csproj.user Added Files: mmclib2.tex Log Message: Added DataTableNode (this is the old mmclib1 ReportNode Added docs Added docs source tex Index: Changelog.txt =================================================================== RCS file: /cvsroot/mmclibrary/mmclibrary/MMCLib2/Changelog.txt,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** Changelog.txt 31 Mar 2004 07:58:43 -0000 1.3 --- Changelog.txt 20 Jul 2004 15:06:25 -0000 1.4 *************** *** 9,54 **** Splitted interfaces.cs into ! - interfaces-core.cs ! - interfaces-propertypages.cs ! - Added some interfaces ! Added PropertyPageBase.cs - Class to use with 'Add inherited UserControl' - Class offers some shortcuts to commonly used things. ! Added PropertySheetThreadStarter.cs ! - Starts a property sheet for a given ResultItem ! ! Added ResultViewColumn - Is able to set size, align, title etc. ! Added ResultViewItem - Has it's own collection of Tasks/Menus/PropertyPages ! BaseNode.cs: - Added Selection registering - Added a virtual property for Menus/Tasks/ResultViewImages - Added better ctors with icon handling ! Component.cs: ! - Added support for PropertyPages on the ResultItems of a ResultNode ! ! FormNode: - Added better ctors with icon handling - Made some properties virtual ! OCXNode: - Added better ctors with icon handling - Made some properties virtual ! PropertyPage: ! - Added Multiselection possibilites (not implemented yet) ! - Added support for ResultItem PropertyPages ! - Added a reference too the node before the sheet is initialised ! ! ProperySheet: ! - Added a property to get the propertypages ResultItem ! ! ReportNode: - No longer works with DataTables - Has a virtual property for ResultViewItems,ResultViewColumns --- 9,49 ---- Splitted interfaces.cs into ! - Common.cs -> struct / enums ! - Interfaces.cs -> all interfaces ! - Core.cs -> classes ! - interfaces-propertypages.cs -> all interfaces for propertypages ! - Added some interfaces/structs/enums ! Added PropertyPages/PropertyPageBase.cs - Class to use with 'Add inherited UserControl' - Class offers some shortcuts to commonly used things. + - Has an overidable init() function do initialise the propertypage before it is painted. ! Added Core/ResultViewColumn.cs - Is able to set size, align, title etc. ! Added Core/ResultViewItem.cs - Has it's own collection of Tasks/Menus/PropertyPages ! Core/Component.cs: ! - Added support for PropertyPages on the ResultItems of a ResultNode ! ! Core/SnapinBase: ! - Added support for SnapinManagers ! ! Nodes/BaseNode.cs: - Added Selection registering - Added a virtual property for Menus/Tasks/ResultViewImages - Added better ctors with icon handling ! Nodes/FormNode: - Added better ctors with icon handling - Made some properties virtual ! Nodes/OCXNode: - Added better ctors with icon handling - Made some properties virtual ! Nodes/ReportNode: - No longer works with DataTables - Has a virtual property for ResultViewItems,ResultViewColumns *************** *** 58,63 **** - Added ctors with icon handling ! SnapinBase: ! - Added support for SnapinManagers --- 53,67 ---- - Added ctors with icon handling ! Nodes/DataTableNode: ! - Copy of the MMCLib1 ReportNode for backwards compatibility, The only changes I made where to be able to compile. ! NOTE: this node is deprecated and may eventually be removed. ! ! PropertyPages/PropertyPage: ! - Added Multiselection possibilites (not implemented yet) ! - Added support for ResultItem PropertyPages ! - Added a reference too the node before the sheet is initialised ! ! PropertyPages/ProperySheet: ! - Added a property to get the propertypages ResultItem --- NEW FILE: mmclib2.tex --- \documentclass[html]{article} \documentstyle[html]{article} \usepackage{verbatim} \usepackage{verbatimfiles} \begin{document} \title{MMCLib2 Documentation} \author{Lesley van Zijl} \date{\today} \maketitle \section{Introduction} \textbf{About the project}\\ MMC .NET Library - managed wrapper library to support MMC snapin development for Windows. \\ \\ \textbf{About the Documenation}\\ There is no documentation about the project at the moment, there is a compressed html (chm) file available with the API in it, this is generated from the sourcecode xml comments. There is allot of comment missing in the sourcecode so this API isn't even complete. I for one think that the source code is the documentation, I have managed to write several snapins and work allot with the mmclib since version 0.5, so it isn't impossible at all. \\ \\ The purpose of this documentation is trying to help developers in using this library. Writing documentation is a boring and time consuming job and that is why it will be pretty poor. If something is missing and you really need it, please contact us. We would also appreciate it if you add something to this documentation, just mail us or drop a note on the forums/mailing lists. \\ \\ \textbf{Who should use this documenation}\\ This documentation is for those who want to use a .NET language to build snapins for the mmc, both beginners and advanced users of the mmclib could get something out of this documentation. \\ \\ \textbf{Documentation Guidelines}\\ The first part (this part) of the documentation is about the MMC and MMCLib, what they are, why you should use them there is also a part about what we we're trying to do with the mmclib2. \\ \\ The second part of the documentation is about the namespaces of the mmclib2. all the classes are listed and get a small description plus the changes from mmclib1 to mmclib2. There will be a link to the MSDN wherever possible. \\ \\ The last part is a tutorial about building a basic snapin with the MMCLib2. \\ \\ \textbf{Why is this documentation not up to date?}\\ Writing it is boring. The source code and API documenation should be enough. \subsection{The MMC} A link to the \htmladdnormallink{MSDN}{http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnanchor/html/mmc.asp} will be enough for now \subsection{The MMCLib} wat is de MMCLib\\ duidelijke uitleg over het nog niet volledig supporten van de MMCv2. geschiedenis van de MMCLib\\ goal\\ basic uitleg over waarom de mmclib uberhaupt bestaat \subsection{What is new in MMCLib2?} There are a number of changes in the MMCLib2, some of these changes are in the core of the code, like the way that selection is handled. ReportNode has some mayor changes too, it's not connected to a datatable anymore, it has it's own collection of items that are loaded in the report node as IRESULTITEM's, these objects have their own collection of Menu's, PropertyPages and icons. The biggest change would be the api, the MMC API isn't the easiest api around, and it's learning curve is a bit steep. that's why we tryed to wrap all the MMC components in easier .net components, all the converting is done in the mmclib2 itself. this doesn't mean that the possibilties are decreased, you could override functions to still use these MMC components. The biggest challenge was to decrease the learning curve but still be 'fun' enough to be used by the more advanced snap-in writers. If we somehow failed in doing that, please inform us, or send patches etc. \section{MMCLib2 Namespaces} Since mmclib2 the mmclib is splitted up in namespaces. At that time there wasn't any good reason for it, except that it would look better :). The result of the split up is a better(more?) understandable projects with 4 namespaces: \begin{itemize} \item Core \item Nodes \item PropertyPages \item Wizards \end{itemize} \\ And it also made the collision chance in class/var/function names smaller. \textbf{Core}\\ Here you can find all the wrapped core components of the mmc, everything that is not a part of a Node, a PropertyPage or a Wizard is defined in this namespace. \textbf{Nodes}\\ Here you can find all the Nodes: \begin{itemize} \item BaseNode \item HTMLNode \item OCXNode \item FormNode \item ReportNode + resultitems/resultcolumns \item FolderNode \end{itemize} \textbf{PropertyPages}\\ Here you can find everything that has something todo with PropertyPages, it also has a simple base class with some helpers to reach the mmc from the propertypage. \textbf{Wizards}\\ Here you can find everything that has something to do with the MMC Wizards. \section{Creating snapins with the MMCLib2} You could use this part as a small tutorial to create basic snap-ins. Visual Studio.net 2003. you require the components C++/C# and some tools to be able to create random GUIDs.(FIXME what part is it :P ) \subsection{Creating a new Project} You'll need MMCLib2 in your solution, this is a .Net Assembly, I guess you are able to Add existing projects yourself :) you'll also need MMCFormsShim in your project, this is an C++ project. This is why you need to have C++ installed in your VS.net Your project should be a class library. you should set certain options in your project properties: \begin{verbatim} Common Properties: General: Output type: Class Library Configuration properties: Build: - Register for COMInterop: true (This part is only for debugging, but it's nice to be able to debug) Debugging: - Debug Mode: Program - Start Application: path/to/your/mmc.exe References: MMCLib2 -> MMCFormsShim YourSnapin -> MMCLib2 \end{verbatim} MMCLib2 can be found in the "projects" tab of the "Add References" screen MMCFormsShim can be found in the "COM" tab of the "Add References" screen \subsection{Creating the root of the Snapin (snapinbase)} NOTE: the code in this chapter will compile, but won't load into the Snapin yet, wait for the About Class chapter (next one) As you know, the snapinbase is the root of the snapin, this part is loaded into the mmc and takes care of managing the snapin. you could see this component as the brains. Before the SnapinBase is able to initialise it needs some information, this is done with attributes. An example of a Basic SnapinBase Class: \begin{verbatim} using Ironring.MMC.Core; namespace MMCTutorial { [ SnapinIn("MMClib2 Tutorial", "MMCLib2 Software", "0.1.0.000"), ProgId("MMCLibrary.MMCTutorial"), Guid("CC80F65A-54D8-4899-B1AE-892248EEE50D") ] public class TutSnapinBase : SnapinBase { public TutSnapinBase() : base() { } } } \end{verbatim} First of all, we will need the core components of the mmclib2, so we will include those in this Class. The Core namespace includes all but Nodes/PropertyPages/Wizards classes (except ReportNode components). The Namespace declaration should be pretty clear. The Attributes make sure that the mmc could take a quick look into the snapin before actually loading it. SnapinIn require 3 parameters:\\ \begin{itemize} \item A name for the snapin, this is shown on the left while selecting nodes to load into the snapin ("Add standalone Snap-in" screen).\\ \item A Vendor, this is shown on the right while selecting nodes to lead into the snapin ("Add standalone Snap-in" screen).\\ \item A Version Id\\ \end{itemize} ProgId requires only a identifier for this particular snapin. Guid requires a unique GUID identifier for this snapin, you can generate one with tools -> Create Guid (if you installed the right components) Both the ProgId and Guid attributes should be unique for every snapin, so don't just blindly copy paste. The rest should be pretty clear, just a normal class setup where you tell that your SnapinBase is a subclass of the SnapinBase in the mmclib2 Your snapinbase should call the base snapinbase to fully initialise. USING THE SNAPIN TO SHOW NODES Every Node that is added in the constructor of the snapin is loaded into the snapin on startup. this example shows how to load one basic BaseNode into the snapin on startup. (it requires a 'using Ironring.MMC.Nodes') \begin{verbatim} public TutSnapinBase() : base() { BaseNode root = new BaseNode(this); } \end{verbatim} This is the most basic node that could be created, it doesn't even have a name. The only thing it needs is a reference back to the SnapinBase where it needs will be registered. Look further into the API to see what kind of constructors are available. \subsection{Creating the about class} Now the Snapin needs a face, A class derived from Core.About to obtain copyright and version information. It's also used to obtain images for the static folder from the snap-in. Again a basic example \begin{verbatim} using System; using Ironring.MMC.Core; using System.Runtime.InteropServices; namespace MMCTutorial { [ Guid("C3FE40F2-8B76-4820-91F6-38E81F659E0D"), AboutSnapin(typeof(TutSnapinBase)) ] public class TutorialAbout : About { public TutorialAbout() { Description = "Tutorial snapin for mmclib2"; MainIconName = "MMCTutorial.images.backup.ico"; SmallOpenImageName = "MMCTutorial.images.backup.ico"; SmallClosedImageName = "MMCTutorial.images.backup.ico"; LargeImageName = "MMCTutorial.images.backup.ico"; } } } \end{verbatim} It requires some namespaces to compile and a namespace, just use the same namespace as you used in your SnapinBase. Attributes: This class also requires another unique and _DIFFERENT_ from the SnapinBase Guid. This About is linked to the SnapinBase with the AboutSnapin attribute, it needs the type of your SnapinBase. There are several Properties set in the constructor, Description: This String is shown in the Description textbox on the "Add Standalone Snap-in" screen. MainIconName: A path to the Image you want to use for the MainIcon, this one is shown in the about screen (add/remove snap-in screen) SmallOpenImageName: A path to the image you want to use for the SmallOpenImageName, this one is used for the main node icon when it's selected SmallClosedImageName: A path to the image you want to use for the SmallClosedImageName, this one is used for the main node icon when it's not selected LargeImageName: UNKNOWN FIXME etc. From now on you can compile your project if you did setup the way it was explained in chapter X \subsection{Adding nodes} Creating a Node like we did in the SnapinBase example, but we can reach the true power of the BaseNode by making a subclass of it and reimplement specific methods. Basic subclass: \begin{verbatim} using System; using System.Collections; using Ironring.MMC.Core; using Ironring.MMC.Nodes; namespace MMCTest2 { public class MyBaseNode : BaseNode { public MyHTMLNode(SnapinBase snapin, string displayName, string url, string icon) : base(snapin, displayName,url,icon,icon) { } } } \end{verbatim} As you can see this does nothing but redirect the constructor parameters to the base class. But now we can override properties to add our own collection of menu's, propertypages, resultimages etc. and we are also able to implement caches or change basic behaviour. try to do as little in the constructor as possible, allot isn't initialised when the constructor is called and if the constructor fails, the entire node will fail to function. \subsubsection{Adding Menus to nodes} There are 4 kinds of menus to add to nodes: \begin{itemize} \item TopMenu \item TaskMenu \item ViewMenu \item NewMenu \end{itemize} Adding these to nodes is the same for every Node in the MMCLib2, too add a TopMenu item just override the Menus Property in your node. and let it return a collection of MenuItems: \begin{verbatim} public override ArrayList Menus { get { ArrayList menus = new ArrayList(); menus.Add(new MenuItem("Menu 1", "Example Menu 1", new MenuCommandHandler(voidHandler))); // one item menus.Add(new MenuItem(MF.SEPARATOR); // a seperator menus.Add(new MenuItem("Menu 2", "Example Menu 2", new MenuCommandHandler(voidHandler))); // another item return menus; } } private void voidHandler(object o, BaseNode a) { // do nothing } \end{verbatim} The MenuCommandHandler is called whenever someone clicks on the menuitem. To implement other kinds of menuitems override their properties: TopMenu : Menus Taskmenu : Tasks ViewMenu : ViewMenus NewMenus : NewMenus \subsubsection{Adding PropertyPages to nodes} Addind PropertyPages is the same as MenuItems, Override the PropertyPages property: \begin{verbatim} public override ArrayList propertyPages { get { ArrayList pages = new Arraylist() pages.Add(new PropertyPage("PropertyPage", typeof(MyPropertyPage), this)); return pages; } } \end{verbatim} Every page that is added results in an extra tab in the final propertyPage. The typeof(MyPropertyPage) should be a subclass from PropertyPageBase. PropertyPageBase has a virtual 'Init()' method that is called before the the PropertySheet is created, so you can initialize the propertyPage. \subsubsection{Icon Handling in Nodes} \begin{verbatim} public override string[] ResultViewImages { get { return new String[] { "MMCTest2.images.Happy.ico" }; } } \end{verbatim} \subsection{ReportNodes} \subsubsection{ResultViewColumns} \subsubsection{ResultViewItems} \subsection{Using Wizards} \end{document} Index: MMCLib2.csproj.user =================================================================== RCS file: /cvsroot/mmclibrary/mmclibrary/MMCLib2/MMCLib2.csproj.user,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** MMCLib2.csproj.user 16 Jul 2004 14:13:22 -0000 1.5 --- MMCLib2.csproj.user 20 Jul 2004 15:06:26 -0000 1.6 *************** *** 18,22 **** StartWorkingDirectory = "" StartWithIE = "true" ! /> <Config Name = "Release" --- 18,28 ---- StartWorkingDirectory = "" StartWithIE = "true" ! > ! <InteropRegistration ! RegisteredComClassic = "true" ! RegisteredOutput = "MMCLib2.dll" ! RegisteredTypeLib = "MMCLib2.tlb" ! /> ! </Config> <Config Name = "Release" Index: MMCLib2.csproj =================================================================== RCS file: /cvsroot/mmclibrary/mmclibrary/MMCLib2/MMCLib2.csproj,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** MMCLib2.csproj 13 Jul 2004 15:36:51 -0000 1.10 --- MMCLib2.csproj 20 Jul 2004 15:06:26 -0000 1.11 *************** *** 206,209 **** --- 206,214 ---- /> <File + RelPath = "Nodes\DataTableNode.cs" + SubType = "Code" + BuildAction = "Compile" + /> + <File RelPath = "Nodes\FolderNode.cs" SubType = "Code" Index: Interfaces.cs =================================================================== RCS file: /cvsroot/mmclibrary/mmclibrary/MMCLib2/Interfaces.cs,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** Interfaces.cs 16 Jul 2004 14:13:22 -0000 1.4 --- Interfaces.cs 20 Jul 2004 15:06:26 -0000 1.5 *************** *** 53,60 **** public interface IComponentData { - /// <summary> - /// doet dit het? - /// </summary> - /// <param name="pUnknown">moeilijk</param> void Initialize([MarshalAs(UnmanagedType.Interface)] Object pUnknown); void CreateComponent(out IComponent ppComponent); --- 53,56 ---- |
Update of /cvsroot/mmclibrary/mmclibrary/MMCLib2/docs In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv18282/docs Added Files: footnode.html index.html labels.pl mmclib2.css mmclib2.html next.gif next_g.gif node1.html node10.html node11.html node12.html node13.html node14.html node15.html node16.html node17.html node18.html node19.html node2.html node20.html node21.html node22.html node3.html node4.html node5.html node6.html node7.html node8.html node9.html prev.gif prev_g.gif up.gif up_g.gif Log Message: Added DataTableNode (this is the old mmclib1 ReportNode Added docs Added docs source tex --- NEW FILE: node9.html --- <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN"> <!--Converted with LaTeX2HTML 2002-2-1 (1.71) original version by: Nikos Drakos, CBLU, University of Leeds * revised and updated by: Marcus Hennecke, Ross Moore, Herb Swan * with significant contributions from: Jens Lippmann, Marek Rouchal, Martin Wilck and others --> <HTML> <HEAD> <TITLE>Using the Snap-in to show nodes</TITLE> <META NAME="description" CONTENT="Using the Snap-in to show nodes"> <META NAME="keywords" CONTENT="mmclib2"> <META NAME="resource-type" CONTENT="document"> <META NAME="distribution" CONTENT="global"> <META NAME="Generator" CONTENT="LaTeX2HTML v2002-2-1"> <META HTTP-EQUIV="Content-Style-Type" CONTENT="text/css"> <LINK REL="STYLESHEET" HREF="mmclib2.css"> <LINK REL="next" HREF="node10.html"> <LINK REL="previous" HREF="node8.html"> <LINK REL="up" HREF="node6.html"> <LINK REL="next" HREF="node10.html"> </HEAD> <BODY > <!--Navigation Panel--> <A NAME="tex2html123" HREF="node10.html"> <IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next.gif"></A> <A NAME="tex2html121" HREF="node6.html"> <IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up.gif"></A> <A NAME="tex2html115" HREF="node8.html"> <IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="prev.gif"></A> <BR> <B> Next:</B> <A NAME="tex2html124" HREF="node10.html">Creating the about class</A> <B> Up:</B> <A NAME="tex2html122" HREF="node6.html">Creating snapins with the</A> <B> Previous:</B> <A NAME="tex2html116" HREF="node8.html">Creating the root of</A> <BR> <BR> <!--End of Navigation Panel--> <H2><A NAME="SECTION00033000000000000000"> Using the Snap-in to show nodes</A> </H2> Every Node that is added in the constructor of the snapin is loaded into the snapin on startup if it's not already detached to another node. This example shows how to load one basic BaseNode into the snapin on startup. (it requires a 'using Ironring.MMC.Nodes') <P> <PRE> public TutSnapinBase() : base() { BaseNode root = new BaseNode(this); } </PRE> <P> This is the most basic node that could be created, it doesn't even have a name. The only thing it needs is a reference back to the SnapinBase where it needs will be registered. Look further into the API to see what kind of constructors are available. <P> <BR><HR> <ADDRESS> 2004-07-20 </ADDRESS> </BODY> </HTML> --- NEW FILE: node11.html --- <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN"> <!--Converted with LaTeX2HTML 2002-2-1 (1.71) original version by: Nikos Drakos, CBLU, University of Leeds * revised and updated by: Marcus Hennecke, Ross Moore, Herb Swan * with significant contributions from: Jens Lippmann, Marek Rouchal, Martin Wilck and others --> <HTML> <HEAD> <TITLE>Adding nodes</TITLE> <META NAME="description" CONTENT="Adding nodes"> <META NAME="keywords" CONTENT="mmclib2"> <META NAME="resource-type" CONTENT="document"> <META NAME="distribution" CONTENT="global"> <META NAME="Generator" CONTENT="LaTeX2HTML v2002-2-1"> <META HTTP-EQUIV="Content-Style-Type" CONTENT="text/css"> <LINK REL="STYLESHEET" HREF="mmclib2.css"> <LINK REL="next" HREF="node15.html"> <LINK REL="previous" HREF="node10.html"> <LINK REL="up" HREF="node6.html"> <LINK REL="next" HREF="node12.html"> </HEAD> <BODY > <!--Navigation Panel--> <A NAME="tex2html143" HREF="node12.html"> <IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next.gif"></A> <A NAME="tex2html141" HREF="node6.html"> <IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up.gif"></A> <A NAME="tex2html135" HREF="node10.html"> <IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="prev.gif"></A> <BR> <B> Next:</B> <A NAME="tex2html144" HREF="node12.html">Adding Menus to nodes</A> <B> Up:</B> <A NAME="tex2html142" HREF="node6.html">Creating snapins with the</A> <B> Previous:</B> <A NAME="tex2html136" HREF="node10.html">Creating the about class</A> <BR> <BR> <!--End of Navigation Panel--> <H2><A NAME="SECTION00035000000000000000"> Adding nodes</A> </H2> Creating a Node like we did in the SnapinBase example, but we can reach the true power of the BaseNode by making a subclass of it and reimplement specific methods. <P> Basic subclass: <PRE> using System; using System.Collections; using Ironring.MMC.Core; using Ironring.MMC.Nodes; namespace MMCTest2 { public class MyBaseNode : BaseNode { public MyBaseNode(SnapinBase snapin, string displayName, string icon) : base(snapin, displayName,url,icon,icon) { } } } </PRE> <P> As you can see this does nothing but redirect the constructor parameters to the base class. But now we can override properties to add our own collection of menu's, propertypages, resultimages etc. and we are also able to implement caches or change basic behaviour. try to do as little in the constructor as possible, a lot isn't initialised when the constructor is called and if the constructor fails, the entire node will fail to function. <P> <BR><HR> <!--Table of Child-Links--> <A NAME="CHILD_LINKS"><STRONG>Subsections</STRONG></A> <UL> <LI><A NAME="tex2html145" HREF="node12.html">Adding Menus to nodes</A> <LI><A NAME="tex2html146" HREF="node13.html">Adding PropertyPages to nodes</A> <LI><A NAME="tex2html147" HREF="node14.html">Icon Handling in Nodes</A> </UL> <!--End of Table of Child-Links--> <BR><HR> <ADDRESS> 2004-07-20 </ADDRESS> </BODY> </HTML> --- NEW FILE: node13.html --- <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN"> <!--Converted with LaTeX2HTML 2002-2-1 (1.71) original version by: Nikos Drakos, CBLU, University of Leeds * revised and updated by: Marcus Hennecke, Ross Moore, Herb Swan * with significant contributions from: Jens Lippmann, Marek Rouchal, Martin Wilck and others --> <HTML> <HEAD> <TITLE>Adding PropertyPages to nodes</TITLE> <META NAME="description" CONTENT="Adding PropertyPages to nodes"> <META NAME="keywords" CONTENT="mmclib2"> <META NAME="resource-type" CONTENT="document"> <META NAME="distribution" CONTENT="global"> <META NAME="Generator" CONTENT="LaTeX2HTML v2002-2-1"> <META HTTP-EQUIV="Content-Style-Type" CONTENT="text/css"> <LINK REL="STYLESHEET" HREF="mmclib2.css"> <LINK REL="next" HREF="node14.html"> <LINK REL="previous" HREF="node12.html"> <LINK REL="up" HREF="node11.html"> <LINK REL="next" HREF="node14.html"> </HEAD> <BODY > <!--Navigation Panel--> <A NAME="tex2html166" HREF="node14.html"> <IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next.gif"></A> <A NAME="tex2html164" HREF="node11.html"> <IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up.gif"></A> <A NAME="tex2html158" HREF="node12.html"> <IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="prev.gif"></A> <BR> <B> Next:</B> <A NAME="tex2html167" HREF="node14.html">Icon Handling in Nodes</A> <B> Up:</B> <A NAME="tex2html165" HREF="node11.html">Adding nodes</A> <B> Previous:</B> <A NAME="tex2html159" HREF="node12.html">Adding Menus to nodes</A> <BR> <BR> <!--End of Navigation Panel--> <H3><A NAME="SECTION00035200000000000000"> Adding PropertyPages to nodes</A> </H3> Addind PropertyPages is the same as MenuItems, Override the PropertyPages property: <P> <PRE> public override ArrayList propertyPages { get { ArrayList pages = new Arraylist() pages.Add(new PropertyPage("PropertyPage", typeof(MyPropertyPage), this)); return pages; } } </PRE> <P> Every page that is added results in an extra tab in the final propertyPage. The typeof(MyPropertyPage) should be a subclass from PropertyPageBase. <P> PropertyPageBase has a virtual 'Init()' method that is called before the the PropertySheet is created, so you can use that to initialize the propertyPage. <P> <BR><HR> <ADDRESS> 2004-07-20 </ADDRESS> </BODY> </HTML> --- NEW FILE: next_g.gif --- (This appears to be a binary file; contents omitted.) --- NEW FILE: node15.html --- <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN"> <!--Converted with LaTeX2HTML 2002-2-1 (1.71) original version by: Nikos Drakos, CBLU, University of Leeds * revised and updated by: Marcus Hennecke, Ross Moore, Herb Swan * with significant contributions from: Jens Lippmann, Marek Rouchal, Martin Wilck and others --> <HTML> <HEAD> <TITLE>ReportNodes</TITLE> <META NAME="description" CONTENT="ReportNodes"> <META NAME="keywords" CONTENT="mmclib2"> <META NAME="resource-type" CONTENT="document"> <META NAME="distribution" CONTENT="global"> <META NAME="Generator" CONTENT="LaTeX2HTML v2002-2-1"> <META HTTP-EQUIV="Content-Style-Type" CONTENT="text/css"> <LINK REL="STYLESHEET" HREF="mmclib2.css"> <LINK REL="next" HREF="node16.html"> <LINK REL="previous" HREF="node11.html"> <LINK REL="up" HREF="node6.html"> <LINK REL="next" HREF="node16.html"> </HEAD> <BODY > <!--Navigation Panel--> <A NAME="tex2html184" HREF="node16.html"> <IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next.gif"></A> <A NAME="tex2html182" HREF="node6.html"> <IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up.gif"></A> <A NAME="tex2html176" HREF="node14.html"> <IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="prev.gif"></A> <BR> <B> Next:</B> <A NAME="tex2html185" HREF="node16.html">Using Wizards</A> <B> Up:</B> <A NAME="tex2html183" HREF="node6.html">Creating snapins with the</A> <B> Previous:</B> <A NAME="tex2html177" HREF="node14.html">Icon Handling in Nodes</A> <BR> <BR> <!--End of Navigation Panel--> <H2><A NAME="SECTION00036000000000000000"> ReportNodes</A> </H2> Report node is the same as any other Node, the only difference is that it requires columns for the resultPane. Define the required Columns as global static variables: <P> <PRE> public static ResultViewColumn col1 = new ResultViewColumn("Column Name", (int)ColumnHeaderFormat.LEFT, 100); public static ResultViewColumn col2 = new ResultViewColumn("test test", (int)ColumnHeaderFormat.LEFT, 100); </PRE> <P> <B>ResultViewColumns</B> <PRE> public override ArrayList Columns { get { ArrayList cols = new ArrayList(2); // we already know the size cols.Add(col1); cols.Add(col2); return cols; } } </PRE> <P> <B>ResultViewItems</B> Items could be added by just using Items.Append(), but if you have a very dynamic set of items like getting information from a server you could override the Items property like this: <P> <PRE> public override ArrayList Items { get { ResultViewItem item; ArrayList items = new ArrayList(); ArrayList serverInfo = GetServerInfo(); foreach(Hashtable htable in serverInfo) { item = new ResultViewItem(Snapin, this, (String)hTable["name"], "MMCTest2.images.ritem.ico", "MMCTest2.images.ritem.ico"); item.AddDetail(col2, (String)htable["value"]); items.Add(item); } return items; } } </PRE> <P> You could also build in caches or trigger methods everytime the MMC asks for the ResultNodes items <P> <BR><HR> <ADDRESS> 2004-07-20 </ADDRESS> </BODY> </HTML> --- NEW FILE: up_g.gif --- (This appears to be a binary file; contents omitted.) --- NEW FILE: footnode.html --- <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN"> <!--Converted with LaTeX2HTML 2002-2-1 (1.71) original version by: Nikos Drakos, CBLU, University of Leeds * revised and updated by: Marcus Hennecke, Ross Moore, Herb Swan * with significant contributions from: Jens Lippmann, Marek Rouchal, Martin Wilck and others --> <HTML> <HEAD> <TITLE>Footnotes</TITLE> <META NAME="description" CONTENT="Footnotes"> <META NAME="keywords" CONTENT="mmclib2"> <META NAME="resource-type" CONTENT="document"> <META NAME="distribution" CONTENT="global"> <META NAME="Generator" CONTENT="LaTeX2HTML v2002-2-1"> <META HTTP-EQUIV="Content-Style-Type" CONTENT="text/css"> <LINK REL="STYLESHEET" HREF="mmclib2.css"> <LINK REL="previous" HREF="node6.html"> <LINK REL="up" HREF="mmclib2.html"> </HEAD> <BODY > <DL> <DT><A NAME="foot8">... </A><A HREF="mmclib2.html#tex2html1"><SUP>1</SUP></A></DT> <DD>non yet <PRE>. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . </PRE> </DD> </DL> </BODY> </HTML> --- NEW FILE: node19.html --- <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN"> <!--Converted with LaTeX2HTML 2002-2-1 (1.71) original version by: Nikos Drakos, CBLU, University of Leeds * revised and updated by: Marcus Hennecke, Ross Moore, Herb Swan * with significant contributions from: Jens Lippmann, Marek Rouchal, Martin Wilck and others --> <HTML> <HEAD> <TITLE>ResultViewColumns</TITLE> <META NAME="description" CONTENT="ResultViewColumns"> <META NAME="keywords" CONTENT="mmclib2"> <META NAME="resource-type" CONTENT="document"> <META NAME="distribution" CONTENT="global"> <META NAME="Generator" CONTENT="LaTeX2HTML v2002-2-1"> <META HTTP-EQUIV="Content-Style-Type" CONTENT="text/css"> <LINK REL="STYLESHEET" HREF="mmclib2.css"> <LINK REL="next" HREF="node20.html"> <LINK REL="previous" HREF="node18.html"> <LINK REL="up" HREF="node18.html"> <LINK REL="next" HREF="node20.html"> </HEAD> <BODY > <!--Navigation Panel--> <A NAME="tex2html232" HREF="node20.html"> <IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="file:/usr/lib/latex2html/icons/next.gif"></A> <A NAME="tex2html230" HREF="node18.html"> <IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="file:/usr/lib/latex2html/icons/up.gif"></A> <A NAME="tex2html224" HREF="node18.html"> <IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="file:/usr/lib/latex2html/icons/prev.gif"></A> <BR> <B> Next:</B> <A NAME="tex2html233" HREF="node20.html">ResultViewItems</A> <B> Up:</B> <A NAME="tex2html231" HREF="node18.html">ReportNodes</A> <B> Previous:</B> <A NAME="tex2html225" HREF="node18.html">ReportNodes</A> <BR> <BR> <!--End of Navigation Panel--> <H3><A NAME="SECTION00035100000000000000"> ResultViewColumns</A> </H3> <BR><HR> <ADDRESS> 2004-05-03 </ADDRESS> </BODY> </HTML> --- NEW FILE: prev.gif --- (This appears to be a binary file; contents omitted.) --- NEW FILE: node20.html --- <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN"> <!--Converted with LaTeX2HTML 2002-2-1 (1.71) original version by: Nikos Drakos, CBLU, University of Leeds * revised and updated by: Marcus Hennecke, Ross Moore, Herb Swan * with significant contributions from: Jens Lippmann, Marek Rouchal, Martin Wilck and others --> <HTML> <HEAD> <TITLE>ResultViewItems</TITLE> <META NAME="description" CONTENT="ResultViewItems"> <META NAME="keywords" CONTENT="mmclib2"> <META NAME="resource-type" CONTENT="document"> <META NAME="distribution" CONTENT="global"> <META NAME="Generator" CONTENT="LaTeX2HTML v2002-2-1"> <META HTTP-EQUIV="Content-Style-Type" CONTENT="text/css"> <LINK REL="STYLESHEET" HREF="mmclib2.css"> <LINK REL="previous" HREF="node19.html"> <LINK REL="up" HREF="node18.html"> <LINK REL="next" HREF="node21.html"> </HEAD> <BODY > <!--Navigation Panel--> <A NAME="tex2html240" HREF="node21.html"> <IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="file:/usr/lib/latex2html/icons/next.gif"></A> <A NAME="tex2html238" HREF="node18.html"> <IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="file:/usr/lib/latex2html/icons/up.gif"></A> <A NAME="tex2html234" HREF="node19.html"> <IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="file:/usr/lib/latex2html/icons/prev.gif"></A> <BR> <B> Next:</B> <A NAME="tex2html241" HREF="node21.html">Using Wizards</A> <B> Up:</B> <A NAME="tex2html239" HREF="node18.html">ReportNodes</A> <B> Previous:</B> <A NAME="tex2html235" HREF="node19.html">ResultViewColumns</A> <BR> <BR> <!--End of Navigation Panel--> <H3><A NAME="SECTION00035200000000000000"> ResultViewItems</A> </H3> <P> <BR><HR> <ADDRESS> 2004-05-03 </ADDRESS> </BODY> </HTML> --- NEW FILE: node3.html --- <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN"> <!--Converted with LaTeX2HTML 2002-2-1 (1.71) original version by: Nikos Drakos, CBLU, University of Leeds * revised and updated by: Marcus Hennecke, Ross Moore, Herb Swan * with significant contributions from: Jens Lippmann, Marek Rouchal, Martin Wilck and others --> <HTML> <HEAD> <TITLE>The MMCLib</TITLE> <META NAME="description" CONTENT="The MMCLib"> <META NAME="keywords" CONTENT="mmclib2"> <META NAME="resource-type" CONTENT="document"> <META NAME="distribution" CONTENT="global"> <META NAME="Generator" CONTENT="LaTeX2HTML v2002-2-1"> <META HTTP-EQUIV="Content-Style-Type" CONTENT="text/css"> <LINK REL="STYLESHEET" HREF="mmclib2.css"> <LINK REL="next" HREF="node4.html"> <LINK REL="previous" HREF="node2.html"> <LINK REL="up" HREF="node1.html"> <LINK REL="next" HREF="node4.html"> </HEAD> <BODY > <!--Navigation Panel--> <A NAME="tex2html54" HREF="node4.html"> <IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next.gif"></A> <A NAME="tex2html52" HREF="node1.html"> <IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up.gif"></A> <A NAME="tex2html46" HREF="node2.html"> <IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="prev.gif"></A> <BR> <B> Next:</B> <A NAME="tex2html55" HREF="node4.html">What is new in</A> <B> Up:</B> <A NAME="tex2html53" HREF="node1.html">Introduction</A> <B> Previous:</B> <A NAME="tex2html47" HREF="node2.html">The MMC</A> <BR> <BR> <!--End of Navigation Panel--> <H2><A NAME="SECTION00012000000000000000"> The MMCLib</A> </H2> The MMCLib made it possible to write snap-ins in .net, it begun as a project of Jim Murphy from IronRing Software He released a version 0.5 and later 1.0, both releases are still available at <TT><A NAME="tex2html2" HREF="www.ironringsoftware.com">www.ironringsoftware.com</A></TT> <BR> After the 1.0 release Jim released it as a sourceforge project where we 'embraced' it :) <BR> TODO needs some work <P> <BR><HR> <ADDRESS> 2004-07-20 </ADDRESS> </BODY> </HTML> --- NEW FILE: node4.html --- <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN"> <!--Converted with LaTeX2HTML 2002-2-1 (1.71) original version by: Nikos Drakos, CBLU, University of Leeds * revised and updated by: Marcus Hennecke, Ross Moore, Herb Swan * with significant contributions from: Jens Lippmann, Marek Rouchal, Martin Wilck and others --> <HTML> <HEAD> <TITLE>What is new in MMCLib2?</TITLE> <META NAME="description" CONTENT="What is new in MMCLib2?"> <META NAME="keywords" CONTENT="mmclib2"> <META NAME="resource-type" CONTENT="document"> <META NAME="distribution" CONTENT="global"> <META NAME="Generator" CONTENT="LaTeX2HTML v2002-2-1"> <META HTTP-EQUIV="Content-Style-Type" CONTENT="text/css"> <LINK REL="STYLESHEET" HREF="mmclib2.css"> <LINK REL="previous" HREF="node3.html"> <LINK REL="up" HREF="node1.html"> <LINK REL="next" HREF="node5.html"> </HEAD> <BODY > <!--Navigation Panel--> <A NAME="tex2html62" HREF="node5.html"> <IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next.gif"></A> <A NAME="tex2html60" HREF="node1.html"> <IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up.gif"></A> <A NAME="tex2html56" HREF="node3.html"> <IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="prev.gif"></A> <BR> <B> Next:</B> <A NAME="tex2html63" HREF="node5.html">MMCLib2 Namespaces</A> <B> Up:</B> <A NAME="tex2html61" HREF="node1.html">Introduction</A> <B> Previous:</B> <A NAME="tex2html57" HREF="node3.html">The MMCLib</A> <BR> <BR> <!--End of Navigation Panel--> <H2><A NAME="SECTION00013000000000000000"> What is new in MMCLib2?</A> </H2> There are a number of changes in the MMCLib2, some of these changes are in the core of the code, like the way that selection is handled. ReportNode has some mayor changes too, it's not connected to a datatable anymore, it has it's own collection of items that are loaded in the report node as IRESULTITEM's, these objects have their own collection of Menu's, PropertyPages and icons. <P> The biggest change would be the api, the MMC API isn't the easiest api around, and it's learning curve is a bit steep. that's why we tried to wrap all the MMC components in easier .net components, all the converting is done in the mmclib2 itself. this doesn't mean that the possibilties are decreased, you could override functions to still use these MMC components. <P> The biggest challenge was to decrease the learning curve but still be 'fun' enough to be used by the more advanced snap-in writers. If we somehow failed in doing that, please inform us, or send patches etc. <P> <BR><HR> <ADDRESS> 2004-07-20 </ADDRESS> </BODY> </HTML> --- NEW FILE: node12.html --- <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN"> <!--Converted with LaTeX2HTML 2002-2-1 (1.71) original version by: Nikos Drakos, CBLU, University of Leeds * revised and updated by: Marcus Hennecke, Ross Moore, Herb Swan * with significant contributions from: Jens Lippmann, Marek Rouchal, Martin Wilck and others --> <HTML> <HEAD> <TITLE>Adding Menus to nodes</TITLE> <META NAME="description" CONTENT="Adding Menus to nodes"> <META NAME="keywords" CONTENT="mmclib2"> <META NAME="resource-type" CONTENT="document"> <META NAME="distribution" CONTENT="global"> <META NAME="Generator" CONTENT="LaTeX2HTML v2002-2-1"> <META HTTP-EQUIV="Content-Style-Type" CONTENT="text/css"> <LINK REL="STYLESHEET" HREF="mmclib2.css"> <LINK REL="next" HREF="node13.html"> <LINK REL="previous" HREF="node11.html"> <LINK REL="up" HREF="node11.html"> <LINK REL="next" HREF="node13.html"> </HEAD> <BODY > <!--Navigation Panel--> <A NAME="tex2html156" HREF="node13.html"> <IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next.gif"></A> <A NAME="tex2html154" HREF="node11.html"> <IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up.gif"></A> <A NAME="tex2html148" HREF="node11.html"> <IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="prev.gif"></A> <BR> <B> Next:</B> <A NAME="tex2html157" HREF="node13.html">Adding PropertyPages to nodes</A> <B> Up:</B> <A NAME="tex2html155" HREF="node11.html">Adding nodes</A> <B> Previous:</B> <A NAME="tex2html149" HREF="node11.html">Adding nodes</A> <BR> <BR> <!--End of Navigation Panel--> <H3><A NAME="SECTION00035100000000000000"> Adding Menus to nodes</A> </H3> There are 4 kinds of menus to add to nodes: <UL> <LI>TopMenu </LI> <LI>TaskMenu </LI> <LI>ViewMenu </LI> <LI>NewMenu </LI> </UL> <P> Adding these to nodes is the same for every Node in the MMCLib2, too add a TopMenu item just override the Menus Property in your node. and let it return a collection of MenuItems: <P> <PRE> public override ArrayList Menus { get { ArrayList menus = new ArrayList(); menus.Add(new MenuItem("Menu 1", "Example Menu 1", new MenuCommandHandler(voidHandler))); // one item menus.Add(new MenuItem(MF.SEPARATOR); // a seperator menus.Add(new MenuItem("Menu 2", "Example Menu 2", new MenuCommandHandler(voidHandler))); // another item return menus; } } private void voidHandler(object o, BaseNode a) { // do nothing } </PRE> <P> The MenuCommandHandler is called whenever someone clicks on the menuitem. To implement other kinds of menuitems override their properties: TopMenu : Menus Taskmenu : Tasks ViewMenu : ViewMenus NewMenus : NewMenus <P> <BR><HR> <ADDRESS> 2004-07-20 </ADDRESS> </BODY> </HTML> --- NEW FILE: node10.html --- <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN"> <!--Converted with LaTeX2HTML 2002-2-1 (1.71) original version by: Nikos Drakos, CBLU, University of Leeds * revised and updated by: Marcus Hennecke, Ross Moore, Herb Swan * with significant contributions from: Jens Lippmann, Marek Rouchal, Martin Wilck and others --> <HTML> <HEAD> <TITLE>Creating the about class</TITLE> <META NAME="description" CONTENT="Creating the about class"> <META NAME="keywords" CONTENT="mmclib2"> <META NAME="resource-type" CONTENT="document"> <META NAME="distribution" CONTENT="global"> <META NAME="Generator" CONTENT="LaTeX2HTML v2002-2-1"> <META HTTP-EQUIV="Content-Style-Type" CONTENT="text/css"> <LINK REL="STYLESHEET" HREF="mmclib2.css"> <LINK REL="next" HREF="node11.html"> <LINK REL="previous" HREF="node9.html"> <LINK REL="up" HREF="node6.html"> <LINK REL="next" HREF="node11.html"> </HEAD> <BODY > <!--Navigation Panel--> <A NAME="tex2html133" HREF="node11.html"> <IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next.gif"></A> <A NAME="tex2html131" HREF="node6.html"> <IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up.gif"></A> <A NAME="tex2html125" HREF="node9.html"> <IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="prev.gif"></A> <BR> <B> Next:</B> <A NAME="tex2html134" HREF="node11.html">Adding nodes</A> <B> Up:</B> <A NAME="tex2html132" HREF="node6.html">Creating snapins with the</A> <B> Previous:</B> <A NAME="tex2html126" HREF="node9.html">Using the Snap-in to</A> <BR> <BR> <!--End of Navigation Panel--> <H2><A NAME="SECTION00034000000000000000"> Creating the about class</A> </H2> Now the Snapin needs a face, A class derived from Core.About to obtain copyright and version information. It's also used to obtain images for the static folder from the snap-in. <P> Again a basic example <P> <PRE> using System; using Ironring.MMC.Core; using System.Runtime.InteropServices; namespace MMCTutorial { [ Guid("C3FE40F2-8B76-4820-91F6-38E81F659E0D"), AboutSnapin(typeof(TutSnapinBase)) ] public class TutorialAbout : About { public TutorialAbout() { Description = "Tutorial snapin for mmclib2"; MainIconName = "MMCTutorial.images.backup.ico"; SmallOpenImageName = "MMCTutorial.images.backup.ico"; SmallClosedImageName = "MMCTutorial.images.backup.ico"; LargeImageName = "MMCTutorial.images.backup.ico"; } } } </PRE> <P> It requires some namespaces to compile and a namespace, just use the same namespace as you used in your SnapinBase. <P> Attributes: This class also requires another unique and _DIFFERENT_ from the SnapinBase Guid. This About is linked to the SnapinBase with the AboutSnapin attribute, it needs the type of your SnapinBase. <P> There are several Properties set in the constructor, Description: This String is shown in the Description textbox on the "Add Standalone Snap-in" screen. MainIconName: A path to the Image you want to use for the MainIcon, this one is shown in the about screen (add/remove snap-in screen) SmallOpenImageName: A path to the image you want to use for the SmallOpenImageName, this one is used for the main node icon when it's selected SmallClosedImageName: A path to the image you want to use for the SmallClosedImageName, this one is used for the main node icon when it's not selected LargeImageName: FIXME <P> From now on you can compile your project if you did setup the way it was explained in chapter FIXME <P> <HR> <!--Navigation Panel--> <A NAME="tex2html133" HREF="node11.html"> <IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next.gif"></A> <A NAME="tex2html131" HREF="node6.html"> <IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up.gif"></A> <A NAME="tex2html125" HREF="node9.html"> <IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="prev.gif"></A> <BR> <B> Next:</B> <A NAME="tex2html134" HREF="node11.html">Adding nodes</A> <B> Up:</B> <A NAME="tex2html132" HREF="node6.html">Creating snapins with the</A> <B> Previous:</B> <A NAME="tex2html126" HREF="node9.html">Using the Snap-in to</A> <!--End of Navigation Panel--> <ADDRESS> 2004-07-20 </ADDRESS> </BODY> </HTML> --- NEW FILE: node21.html --- <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN"> <!--Converted with LaTeX2HTML 2002-2-1 (1.71) original version by: Nikos Drakos, CBLU, University of Leeds * revised and updated by: Marcus Hennecke, Ross Moore, Herb Swan * with significant contributions from: Jens Lippmann, Marek Rouchal, Martin Wilck and others --> <HTML> <HEAD> <TITLE>Using Wizards</TITLE> <META NAME="description" CONTENT="Using Wizards"> <META NAME="keywords" CONTENT="mmclib2"> <META NAME="resource-type" CONTENT="document"> <META NAME="distribution" CONTENT="global"> <META NAME="Generator" CONTENT="LaTeX2HTML v2002-2-1"> <META HTTP-EQUIV="Content-Style-Type" CONTENT="text/css"> <LINK REL="STYLESHEET" HREF="mmclib2.css"> <LINK REL="previous" HREF="node18.html"> <LINK REL="up" HREF="node10.html"> <LINK REL="next" HREF="node22.html"> </HEAD> <BODY > <!--Navigation Panel--> <A NAME="tex2html248" HREF="node22.html"> <IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="file:/usr/lib/latex2html/icons/next.gif"></A> <A NAME="tex2html246" HREF="node10.html"> <IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="file:/usr/lib/latex2html/icons/up.gif"></A> <A NAME="tex2html242" HREF="node20.html"> <IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="file:/usr/lib/latex2html/icons/prev.gif"></A> <BR> <B> Next:</B> <A NAME="tex2html249" HREF="node22.html">About this document ...</A> <B> Up:</B> <A NAME="tex2html247" HREF="node10.html">Creating snapins with the</A> <B> Previous:</B> <A NAME="tex2html243" HREF="node20.html">ResultViewItems</A> <BR> <BR> <!--End of Navigation Panel--> <H2><A NAME="SECTION00036000000000000000"> Using Wizards</A> </H2> <P> <BR><HR> <ADDRESS> 2004-05-03 </ADDRESS> </BODY> </HTML> --- NEW FILE: node22.html --- <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN"> <!--Converted with LaTeX2HTML 2002-2-1 (1.71) original version by: Nikos Drakos, CBLU, University of Leeds * revised and updated by: Marcus Hennecke, Ross Moore, Herb Swan * with significant contributions from: Jens Lippmann, Marek Rouchal, Martin Wilck and others --> <HTML> <HEAD> <TITLE>About this document ...</TITLE> <META NAME="description" CONTENT="About this document ..."> <META NAME="keywords" CONTENT="mmclib2"> <META NAME="resource-type" CONTENT="document"> <META NAME="distribution" CONTENT="global"> <META NAME="Generator" CONTENT="LaTeX2HTML v2002-2-1"> <META HTTP-EQUIV="Content-Style-Type" CONTENT="text/css"> <LINK REL="STYLESHEET" HREF="mmclib2.css"> <LINK REL="previous" HREF="node10.html"> <LINK REL="up" HREF="mmclib2.html"> </HEAD> <BODY > <!--Navigation Panel--> <IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="file:/usr/lib/latex2html/icons/next_g.gif"> <A NAME="tex2html254" HREF="mmclib2.html"> <IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="file:/usr/lib/latex2html/icons/up.gif"></A> <A NAME="tex2html250" HREF="node21.html"> <IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="file:/usr/lib/latex2html/icons/prev.gif"></A> <BR> <B> Up:</B> <A NAME="tex2html255" HREF="mmclib2.html">MMCLib2 Documentation</A> <B> Previous:</B> <A NAME="tex2html251" HREF="node21.html">Using Wizards</A> <BR> <BR> <!--End of Navigation Panel--> <H1><A NAME="SECTION00040000000000000000"> About this document ...</A> </H1> <STRONG>MMCLib2 Documentation</STRONG><P> This document was generated using the <A HREF="http://www.latex2html.org/"><STRONG>LaTeX</STRONG>2<tt>HTML</tt></A> translator Version 2002-2-1 (1.71) <P> Copyright © 1993, 1994, 1995, 1996, <A HREF="http://cbl.leeds.ac.uk/nikos/personal.html">Nikos Drakos</A>, Computer Based Learning Unit, University of Leeds. <BR> Copyright © 1997, 1998, 1999, <A HREF="http://www.maths.mq.edu.au/~ross/">Ross Moore</A>, Mathematics Department, Macquarie University, Sydney. <P> The command line arguments were: <BR> <STRONG>latex2html</STRONG> <TT><A NAME="tex2html2" HREF="../mmclib2.tex">mmclib2.tex</A></TT> <P> The translation was initiated by on 2004-05-03 <BR><HR> <ADDRESS> 2004-05-03 </ADDRESS> </BODY> </HTML> --- NEW FILE: node18.html --- <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN"> <!--Converted with LaTeX2HTML 2002-2-1 (1.71) original version by: Nikos Drakos, CBLU, University of Leeds * revised and updated by: Marcus Hennecke, Ross Moore, Herb Swan * with significant contributions from: Jens Lippmann, Marek Rouchal, Martin Wilck and others --> <HTML> <HEAD> <TITLE>About this document ...</TITLE> <META NAME="description" CONTENT="About this document ..."> <META NAME="keywords" CONTENT="mmclib2"> <META NAME="resource-type" CONTENT="document"> <META NAME="distribution" CONTENT="global"> <META NAME="Generator" CONTENT="LaTeX2HTML v2002-2-1"> <META HTTP-EQUIV="Content-Style-Type" CONTENT="text/css"> <LINK REL="STYLESHEET" HREF="mmclib2.css"> <LINK REL="previous" HREF="node6.html"> <LINK REL="up" HREF="mmclib2.html"> </HEAD> <BODY > <!--Navigation Panel--> <IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next_g.gif"> <A NAME="tex2html208" HREF="mmclib2.html"> <IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up.gif"></A> <A NAME="tex2html204" HREF="node17.html"> <IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="prev.gif"></A> <BR> <B> Up:</B> <A NAME="tex2html209" HREF="mmclib2.html">MMCLib2 Documentation</A> <B> Previous:</B> <A NAME="tex2html205" HREF="node17.html">Using SnapinManagers</A> <BR> <BR> <!--End of Navigation Panel--> <H1><A NAME="SECTION00040000000000000000"> About this document ...</A> </H1> <STRONG>MMCLib2 Documentation</STRONG><P> This document was generated using the <A HREF="http://www.latex2html.org/"><STRONG>LaTeX</STRONG>2<tt>HTML</tt></A> translator Version 2002-2-1 (1.71) <P> Copyright © 1993, 1994, 1995, 1996, <A HREF="http://cbl.leeds.ac.uk/nikos/personal.html">Nikos Drakos</A>, Computer Based Learning Unit, University of Leeds. <BR> Copyright © 1997, 1998, 1999, <A HREF="http://www.maths.mq.edu.au/~ross/">Ross Moore</A>, Mathematics Department, Macquarie University, Sydney. <P> The command line arguments were: <BR> <STRONG>latex2html</STRONG> <TT>-local_icons mmclib2.tex</TT> <P> The translation was initiated by on 2004-07-20 <BR><HR> <ADDRESS> 2004-07-20 </ADDRESS> </BODY> </HTML> --- NEW FILE: next.gif --- (This appears to be a binary file; contents omitted.) --- NEW FILE: node7.html --- <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN"> <!--Converted with LaTeX2HTML 2002-2-1 (1.71) original version by: Nikos Drakos, CBLU, University of Leeds * revised and updated by: Marcus Hennecke, Ross Moore, Herb Swan * with significant contributions from: Jens Lippmann, Marek Rouchal, Martin Wilck and others --> <HTML> <HEAD> <TITLE>Creating a new Project</TITLE> <META NAME="description" CONTENT="Creating a new Project"> <META NAME="keywords" CONTENT="mmclib2"> <META NAME="resource-type" CONTENT="document"> <META NAME="distribution" CONTENT="global"> <META NAME="Generator" CONTENT="LaTeX2HTML v2002-2-1"> <META HTTP-EQUIV="Content-Style-Type" CONTENT="text/css"> <LINK REL="STYLESHEET" HREF="mmclib2.css"> <LINK REL="next" HREF="node8.html"> <LINK REL="previous" HREF="node6.html"> <LINK REL="up" HREF="node6.html"> <LINK REL="next" HREF="node8.html"> </HEAD> <BODY > <!--Navigation Panel--> <A NAME="tex2html103" HREF="node8.html"> <IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next.gif"></A> <A NAME="tex2html101" HREF="node6.html"> <IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up.gif"></A> <A NAME="tex2html95" HREF="node6.html"> <IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="prev.gif"></A> <BR> <B> Next:</B> <A NAME="tex2html104" HREF="node8.html">Creating the root of</A> <B> Up:</B> <A NAME="tex2html102" HREF="node6.html">Creating snapins with the</A> <B> Previous:</B> <A NAME="tex2html96" HREF="node6.html">Creating snapins with the</A> <BR> <BR> <!--End of Navigation Panel--> <H2><A NAME="SECTION00031000000000000000"> Creating a new Project</A> </H2> You'll need MMCLib2 in your solution, this is a .Net Assembly, I guess you are able to Add existing projects yourself :) you'll also need MMCFormsShim in your project, this is an C++ project. This is why you need to have C++ installed in your VS.net <P> Your project should be a class library. you should set certain options in your project properties: <P> <PRE> Common Properties: General: Output type: Class Library Configuration properties: Build: - Register for COMInterop: true (This part is only for debugging, but it's nice to be able to debug) Debugging: - Debug Mode: Program - Start Application: path/to/your/mmc.exe References: MMCLib2 -> MMCFormsShim YourSnapin -> MMCLib2 </PRE> <P> MMCLib2 can be found in the "projects" tab of the "Add References" screen MMCFormsShim can be found in the "COM" tab of the "Add References" screen <P> <BR><HR> <ADDRESS> 2004-07-20 </ADDRESS> </BODY> </HTML> --- NEW FILE: index.html --- <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN"> <!--Converted with LaTeX2HTML 2002-2-1 (1.71) original version by: Nikos Drakos, CBLU, University of Leeds * revised and updated by: Marcus Hennecke, Ross Moore, Herb Swan * with significant contributions from: Jens Lippmann, Marek Rouchal, Martin Wilck and others --> <HTML> <HEAD> <TITLE>MMCLib2 Documentation</TITLE> <META NAME="description" CONTENT="MMCLib2 Documentation"> <META NAME="keywords" CONTENT="mmclib2"> <META NAME="resource-type" CONTENT="document"> <META NAME="distribution" CONTENT="global"> <META NAME="Generator" CONTENT="LaTeX2HTML v2002-2-1"> <META HTTP-EQUIV="Content-Style-Type" CONTENT="text/css"> <LINK REL="STYLESHEET" HREF="mmclib2.css"> <LINK REL="next" HREF="node1.html"> </HEAD> <BODY > <!--Navigation Panel--> <A NAME="tex2html3" HREF="node1.html"> <IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next.gif"></A> <IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up_g.gif"> <IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="prev_g.gif"> <BR> <B> Next:</B> <A NAME="tex2html4" HREF="node1.html">Introduction</A> <BR> <BR> <!--End of Navigation Panel--> <P> <H1 ALIGN="CENTER">MMCLib2 Documentation</H1> <DIV> <P ALIGN="CENTER"><STRONG>Lesley van Zijl</STRONG></P> <P ALIGN="CENTER"><STRONG>July 20, 2004</STRONG></P> </DIV> <P> <BR><HR> <!--Table of Child-Links--> <A NAME="CHILD_LINKS"></A> <UL> <LI><A NAME="tex2html5" HREF="node1.html">Introduction</A> <UL> <LI><A NAME="tex2html6" HREF="node2.html">The MMC</A> <LI><A NAME="tex2html7" HREF="node3.html">The MMCLib</A> <LI><A NAME="tex2html8" HREF="node4.html">What is new in MMCLib2?</A> </UL> <BR> <LI><A NAME="tex2html9" HREF="node5.html">MMCLib2 Namespaces</A> <LI><A NAME="tex2html10" HREF="node6.html">Creating snapins with the MMCLib2</A> <UL> <LI><A NAME="tex2html11" HREF="node7.html">Creating a new Project</A> <LI><A NAME="tex2html12" HREF="node8.html">Creating the root of the Snapin (snapinbase)</A> <LI><A NAME="tex2html13" HREF="node9.html">Using the Snap-in to show nodes</A> <LI><A NAME="tex2html14" HREF="node10.html">Creating the about class</A> <LI><A NAME="tex2html15" HREF="node11.html">Adding nodes</A> <UL> <LI><A NAME="tex2html16" HREF="node12.html">Adding Menus to nodes</A> <LI><A NAME="tex2html17" HREF="node13.html">Adding PropertyPages to nodes</A> <LI><A NAME="tex2html18" HREF="node14.html">Icon Handling in Nodes</A> </UL> <LI><A NAME="tex2html19" HREF="node15.html">ReportNodes</A> <LI><A NAME="tex2html20" HREF="node16.html">Using Wizards</A> <LI><A NAME="tex2html21" HREF="node17.html">Using SnapinManagers</A> </UL> <BR> <LI><A NAME="tex2html22" HREF="node18.html">About this document ...</A> </UL> <!--End of Table of Child-Links--> <BR><HR> <ADDRESS> 2004-07-20 </ADDRESS> </BODY> </HTML> --- NEW FILE: labels.pl --- # LaTeX2HTML 2002-2-1 (1.71) # Associate labels original text with physical files. 1; # LaTeX2HTML 2002-2-1 (1.71) # labels from external_latex_labels array. 1; --- NEW FILE: up.gif --- (This appears to be a binary file; contents omitted.) --- NEW FILE: node14.html --- <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN"> <!--Converted with LaTeX2HTML 2002-2-1 (1.71) original version by: Nikos Drakos, CBLU, University of Leeds * revised and updated by: Marcus Hennecke, Ross Moore, Herb Swan * with significant contributions from: Jens Lippmann, Marek Rouchal, Martin Wilck and others --> <HTML> <HEAD> <TITLE>Icon Handling in Nodes</TITLE> <META NAME="description" CONTENT="Icon Handling in Nodes"> <META NAME="keywords" CONTENT="mmclib2"> <META NAME="resource-type" CONTENT="document"> <META NAME="distribution" CONTENT="global"> <META NAME="Generator" CONTENT="LaTeX2HTML v2002-2-1"> <META HTTP-EQUIV="Content-Style-Type" CONTENT="text/css"> <LINK REL="STYLESHEET" HREF="mmclib2.css"> <LINK REL="previous" HREF="node13.html"> <LINK REL="up" HREF="node11.html"> <LINK REL="next" HREF="node15.html"> </HEAD> <BODY > <!--Navigation Panel--> <A NAME="tex2html174" HREF="node15.html"> <IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next.gif"></A> <A NAME="tex2html172" HREF="node11.html"> <IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up.gif"></A> <A NAME="tex2html168" HREF="node13.html"> <IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="prev.gif"></A> <BR> <B> Next:</B> <A NAME="tex2html175" HREF="node15.html">ReportNodes</A> <B> Up:</B> <A NAME="tex2html173" HREF="node11.html">Adding nodes</A> <B> Previous:</B> <A NAME="tex2html169" HREF="node13.html">Adding PropertyPages to nodes</A> <BR> <BR> <!--End of Navigation Panel--> <H3><A NAME="SECTION00035300000000000000"> Icon Handling in Nodes</A> </H3> <P> <PRE> public override string[] ResultViewImages { get { return new String[] { "MMCTest2.images.Happy.ico" }; } } </PRE> <P> <BR><HR> <ADDRESS> 2004-07-20 </ADDRESS> </BODY> </HTML> --- NEW FILE: node5.html --- <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN"> <!--Converted with LaTeX2HTML 2002-2-1 (1.71) original version by: Nikos Drakos, CBLU, University of Leeds * revised and updated by: Marcus Hennecke, Ross Moore, Herb Swan * with significant contributions from: Jens Lippmann, Marek Rouchal, Martin Wilck and others --> <HTML> <HEAD> <TITLE>MMCLib2 Namespaces</TITLE> <META NAME="description" CONTENT="MMCLib2 Namespaces"> <META NAME="keywords" CONTENT="mmclib2"> <META NAME="resource-type" CONTENT="document"> <META NAME="distribution" CONTENT="global"> <META NAME="Generator" CONTENT="LaTeX2HTML v2002-2-1"> <META HTTP-EQUIV="Content-Style-Type" CONTENT="text/css"> <LINK REL="STYLESHEET" HREF="mmclib2.css"> <LINK REL="next" HREF="node6.html"> <LINK REL="previous" HREF="node1.html"> <LINK REL="up" HREF="mmclib2.html"> <LINK REL="next" HREF="node6.html"> </HEAD> <BODY > <!--Navigation Panel--> <A NAME="tex2html72" HREF="node6.html"> <IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next.gif"></A> <A NAME="tex2html70" HREF="mmclib2.html"> <IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up.gif"></A> <A NAME="tex2html64" HREF="node4.html"> <IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="prev.gif"></A> <BR> <B> Next:</B> <A NAME="tex2html73" HREF="node6.html">Creating snapins with the</A> <B> Up:</B> <A NAME="tex2html71" HREF="mmclib2.html">MMCLib2 Documentation</A> <B> Previous:</B> <A NAME="tex2html65" HREF="node4.html">What is new in</A> <BR> <BR> <!--End of Navigation Panel--> <H1><A NAME="SECTION00020000000000000000"> MMCLib2 Namespaces</A> </H1> Since mmclib2 the mmclib is splitted up in multiple namespaces. At the time that happened there wasn't any good reason for it, except that it would look better :). <P> The result of the split up is a better(more?) understandable projects with 4 namespaces: <UL> <LI>Core </LI> <LI>Nodes </LI> <LI>PropertyPages </LI> <LI>Wizards </LI> </UL> <BR> And it also made the collision chance in class/var/function names smaller. <P> <B>Core</B> <BR> Here you can find all the wrapped core components of the mmc, everything that is not a part of a Node, a PropertyPage or a Wizard is defined in this namespace. <P> <B>Nodes</B> <BR> Here you can find all the Nodes: <UL> <LI>BaseNode </LI> <LI>HTMLNode </LI> <LI>OCXNode </LI> <LI>FormNode </LI> <LI>ReportNode + resultitems/resultcolumns </LI> <LI>FolderNode </LI> </UL> <P> <B>PropertyPages</B> <BR> Here you can find everything that has something todo with PropertyPages, it also has a simple base class with some helpers to reach the mmc from the propertypage. <P> <B>Wizards</B> <BR> Here you can find everything that has something to do with the MMC Wizards. <P> <BR><HR> <ADDRESS> 2004-07-20 </ADDRESS> </BODY> </HTML> --- NEW FILE: mmclib2.html --- <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN"> <!--Converted with LaTeX2HTML 2002-2-1 (1.71) original version by: Nikos Drakos, CBLU, University of Leeds * revised and updated by: Marcus Hennecke, Ross Moore, Herb Swan * with significant contributions from: Jens Lippmann, Marek Rouchal, Martin Wilck and others --> <HTML> <HEAD> <TITLE>MMCLib2 Documentation</TITLE> <META NAME="description" CONTENT="MMCLib2 Documentation"> <META NAME="keywords" CONTENT="mmclib2"> <META NAME="resource-type" CONTENT="document"> <META NAME="distribution" CONTENT="global"> <META NAME="Generator" CONTENT="LaTeX2HTML v2002-2-1"> <META HTTP-EQUIV="Content-Style-Type" CONTENT="text/css"> <LINK REL="STYLESHEET" HREF="mmclib2.css"> <LINK REL="next" HREF="node1.html"> </HEAD> <BODY > <!--Navigation Panel--> <A NAME="tex2html3" HREF="node1.html"> <IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next.gif"></A> <IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up_g.gif"> <IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="prev_g.gif"> <BR> <B> Next:</B> <A NAME="tex2html4" HREF="node1.html">Introduction</A> <BR> <BR> <!--End of Navigation Panel--> <P> <H1 ALIGN="CENTER">MMCLib2 Documentation</H1> <DIV> <P ALIGN="CENTER"><STRONG>Lesley van Zijl</STRONG></P> <P ALIGN="CENTER"><STRONG>July 20, 2004</STRONG></P> </DIV> <P> <BR><HR> <!--Table of Child-Links--> <A NAME="CHILD_LINKS"></A> <UL> <LI><A NAME="tex2html5" HREF="node1.html">Introduction</A> <UL> <LI><A NAME="tex2html6" HREF="node2.html">The MMC</A> <LI><A NAME="tex2html7" HREF="node3.html">The MMCLib</A> <LI><A NAME="tex2html8" HREF="node4.html">What is new in MMCLib2?</A> </UL> <BR> <LI><A NAME="tex2html9" HREF="node5.html">MMCLib2 Namespaces</A> <LI><A NAME="tex2html10" HREF="node6.html">Creating snapins with the MMCLib2</A> <UL> <LI><A NAME="tex2html11" HREF="node7.html">Creating a new Project</A> <LI><A NAME="tex2html12" HREF="node8.html">Creating the root of the Snapin (snapinbase)</A> <LI><A NAME="tex2html13" HREF="node9.html">Using the Snap-in to show nodes</A> <LI><A NAME="tex2html14" HREF="node10.html">Creating the about class</A> <LI><A NAME="tex2html15" HREF="node11.html">Adding nodes</A> <UL> <LI><A NAME="tex2html16" HREF="node12.html">Adding Menus to nodes</A> <LI><A NAME="tex2html17" HREF="node13.html">Adding PropertyPages to nodes</A> <LI><A NAME="tex2html18" HREF="node14.html">Icon Handling in Nodes</A> </UL> <LI><A NAME="tex2html19" HREF="node15.html">ReportNodes</A> <LI><A NAME="tex2html20" HREF="node16.html">Using Wizards</A> <LI><A NAME="tex2html21" HREF="node17.html">Using SnapinManagers</A> </UL> <BR> <LI><A NAME="tex2html22" HREF="node18.html">About this document ...</A> </UL> <!--End of Table of Child-Links--> <BR><HR> <ADDRESS> 2004-07-20 </ADDRESS> </BODY> </HTML> --- NEW FILE: node1.html --- <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN"> <!--Converted with LaTeX2HTML 2002-2-1 (1.71) original version by: Nikos Drakos, CBLU, University of Leeds * revised and updated by: Marcus Hennecke, Ross Moore, Herb Swan * with significant contributions from: Jens Lippmann, Marek Rouchal, Martin Wilck and others --> <HTML> <HEAD> <TITLE>Introduction</TITLE> <META NAME="description" CONTENT="Introduction"> <META NAME="keywords" CONTENT="mmclib2"> <META NAME="resource-type" CONTENT="document"> <META NAME="distribution" CONTENT="global"> <META NAME="Generator" CONTENT="LaTeX2HTML v2002-2-1"> <META HTTP-EQUIV="Content-Style-Type" CONTENT="text/css"> <LINK REL="STYLESHEET" HREF="mmclib2.css"> <LINK REL="next" HREF="node5.html"> <LINK REL="previous" HREF="mmclib2.html"> <LINK REL="up" HREF="mmclib2.html"> <LINK REL="next" HREF="node2.html"> </HEAD> <BODY > <!--Navigation Panel--> <A NAME="tex2html31" HREF="node2.html"> <IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next.gif"></A> <A NAME="tex2html29" HREF="mmclib2.html"> <IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up.gif"></A> <A NAME="tex2html23" HREF="mmclib2.html"> <IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="prev.gif"></A> <BR> <B> Next:</B> <A NAME="tex2html32" HREF="node2.html">The MMC</A> <B> Up:</B> <A NAME="tex2html30" HREF="mmclib2.html">MMCLib2 Documentation</A> <B> Previous:</B> <A NAME="tex2html24" HREF="mmclib2.html">MMCLib2 Documentation</A> <BR> <BR> <!--End of Navigation Panel--> <H1><A NAME="SECTION00010000000000000000"> Introduction</A> </H1> <B>About the project</B> <BR> MMC .NET Library - managed wrapper library to support MMC snapin development for Windows. <BR> <BR><B>About the Documenation</B> <BR> There is no documentation about the project at the moment, there is a compressed html (chm) file available with the API in it, this is generated from the sourcecode xml comments. There is allot of comment missing in the sourcecode so this API isn't even complete. I for one think that the source code is the documentation, I have managed to write several snapins and work a lot with the mmclib since version 0.5, so it isn't impossible at all. <BR> <BR> The purpose of this documentation is trying to help developers in using this library. Writing documentation is a boring and time consuming job and that is why it will be pretty poor. If something is missing and you really need it, please contact us. We would also appreciate it if you add something to this documentation, just mail us or drop a note on the forums/mailing lists. <BR> <BR><B>Who should use this documentation</B> <BR> This documentation is for those who want to use a .NET language to build snapins for the MMC, both beginners and advanced users of the mmclib could get something out of this documentation. <BR> <BR><B>Documentation Guidelines</B> <BR> The first part (this part) of the documentation is about the MMC and MMCLib, what they are, why you should use them there is also a part about what we're trying to do with the mmclib2. <BR> <BR> The last part is a tutorial about building a basic snapin with the MMCLib2. <BR> <BR><B>Why is this documentation not up to date?</B> <BR> Writing it is boring. The source code and API documenation should be enough. <P> <BR><HR> <!--Table of Child-Links--> <A NAME="CHILD_LINKS"><STRONG>Subsections</STRONG></A> <UL> <LI><A NAME="tex2html33" HREF="node2.html">The MMC</A> <LI><A NAME="tex2html34" HREF="node3.html">The MMCLib</A> <LI><A NAME="tex2html35" HREF="node4.html">What is new in MMCLib2?</A> </UL> <!--End of Table of Child-Links--> <HR> <!--Navigation Panel--> <A NAME="tex2html31" HREF="node2.html"> <IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next.gif"></A> <A NAME="tex2html29" HREF="mmclib2.html"> <IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up.gif"></A> <A NAME="tex2html23" HREF="mmclib2.html"> <IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="prev.gif"></A> <BR> <B> Next:</B> <A NAME="tex2html32" HREF="node2.html">The MMC</A> <B> Up:</B> <A NAME="tex2html30" HREF="mmclib2.html">MMCLib2 Documentation</A> <B> Previous:</B> <A NAME="tex2html24" HREF="mmclib2.html">MMCLib2 Documentation</A> <!--End of Navigation Panel--> <ADDRESS> 2004-07-20 </ADDRESS> </BODY> </HTML> --- NEW FILE: node8.html --- <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN"> <!--Converted with LaTeX2HTML 2002-2-1 (1.71) original version by: Nikos Drakos, CBLU, University of Leeds * revised and updated by: Marcus Hennecke, Ross Moore, Herb Swan * with significant contributions from: Jens Lippmann, Marek Rouchal, Martin Wilck and others --> <HTML> <HEAD> <TITLE>Creating the root of the Snapin (snapinbase)</TITLE> <META NAME="description" CONTENT="Creating the root of the Snapin (snapinbase)"> <META NAME="keywords" CONTENT="mmclib2"> <META NAME="resource-type" CONTENT="document"> <META NAME="distribution" CONTENT="global"> <META NAME="Generator" CONTENT="LaTeX2HTML v2002-2-1"> <META HTTP-EQUIV="Content-Style-Type" CONTENT="text/css"> <LINK REL="STYLESHEET" HREF="mmclib2.css"> <LINK REL="next" HREF="node9.html"> <LINK REL="previous" HREF="node7.html"> <LINK REL="up" HREF="node6.html"> <LINK REL="next" HREF="node9.html"> </HEAD> <BODY > <!--Navigation Panel--> <A NAME="tex2html113" HREF="node9.html"> <IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next.gif"></A> <A NAME="tex2html111" HREF="node6.html"> <IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up.gif"></A> <A NAME="tex2html105" HREF="node7.html"> <IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="prev.gif"></A> <BR> <B> Next:</B> <A NAME="tex2html114" HREF="node9.html">Using the Snap-in to</A> <B> Up:</B> <A NAME="tex2html112" HREF="node6.html">Creating snapins with the</A> <B> Previous:</B> <A NAME="tex2html106" HREF="node7.html">Creating a new Project</A> <BR> <BR> <!--End of Navigation Panel--> <H2><A NAME="SECTION00032000000000000000"> Creating the root of the Snapin (snapinbase)</A> </H2> NOTE: the code in this chapter will compile, but won't load into the Snapin yet, wait for the About Class chapter (next one) <P> As you know, the snapinbase is the root of the snapin, this part is loaded into the mmc and takes care of managing the snapin. you could see this component as the brains. <P> Before the SnapinBase is able to initialise it needs some information, this is done with attributes. An example of a Basic SnapinBase Class: <P> <PRE> using Ironring.MMC.Core; namespace MMCTutorial { [ SnapinIn("MMClib2 Tutorial", "MMCLib2 Software", "0.1.0.000"), ProgId("MMCLibrary.MMCTutorial"), Guid("CC80F65A-54D8-4899-B1AE-892248EEE50D") ] public class TutSnapinBase : SnapinBase { public TutSnapinBase() : base() { } } } </PRE> <P> First of all, we will need the core components of the mmclib2, so we will include those in this Class. The Core namespace includes all but Nodes/PropertyPages/Wizards classes (except ReportNode components). <P> The Namespace declaration should be pretty clear. <P> The Attributes make sure that the mmc could take a quick look into the snapin before actually loading it. SnapinIn require 3 parameters: <BR> <UL> <LI>A name for the snapin, this is shown on the left while selecting nodes to load into the snapin ("Add standalone Snap-in" screen). <BR></LI> <LI>A Vendor, this is shown on the right while selecting nodes to lead into the snapin ("Add standalone Snap-in" screen). <BR></LI> <LI>A Version Id <BR></LI> </UL> <P> ProgId requires only a identifier for this particular snapin. <P> Guid requires a unique GUID identifier for this snapin, you can generate one with tools -> Create Guid (if you installed the right components) <P> Both the ProgId and Guid attributes should be unique for every snapin, so don't just blindly copy paste. <P> The rest should be pretty clear, just a normal class setup where you tell that your SnapinBase is a subclass of the SnapinBase in the mmclib2 Your snapinbase should call the base snapinbase to fully initialise. <P> <HR> <!--Navigation Panel--> <A NAME="tex2html113" HREF="node9.html"> <IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next.gif"></A> <A NAME="tex2html111" HREF="node6.html"> <IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up.gif"></A> <A NAME="tex2html105" HREF="node7.html"> <IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="prev.gif"></A> <BR> <B> Next:</B> <A NAME="tex2html114" HREF="node9.html">Using the Snap-in to</A> <B> Up:</B> <A NAME="tex2html112" HREF="node6.html">Creating snapins with the</A> <B> Previous:</B> <A NAME="tex2html106" HREF="node7.html">Creating a new Project</A> <!--End of Navigation Panel--> <ADDRESS> 2004-07-20 </ADDRESS> </BODY> </HTML> --- NEW FILE: mmclib2.css --- /* Century Schoolbook font is very similar to Computer Modern Math: cmmi */ .MATH { font-family: "Century Schoolbook", serif; } .MATH I { font-family: "Century Schoolbook", serif; font-style: italic } .BOLDMATH { font-family: "Century Schoolbook", serif; font-weight: bold } /* implement both fixed-size and relative sizes */ SMALL.XTINY { font-size : xx-small } SMALL.TINY { font-size : x-small } SMALL.SCRIPTSIZE { font-size : smaller } SMALL.FOOTNOTESIZE { font-size : small } SMALL.SMALL { } BIG.LARGE { } BIG.XLARGE { font-size : large } BIG.XXLARGE { font-size : x-large } BIG.HUGE { font-size : larger } BIG.XHUGE { font-size : xx-large } /* heading styles */ H1 { } H2 { } H3 { } H4 { } H5 { } /* mathematics styles */ DIV.displaymath { } /* math displays */ TD.eqno { } /* equation-number cells */ /* document-specific styles come next */ --- NEW FILE: node16.html --- <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN"> <!--Converted with LaTeX2HTML 2002-2-1 (1.71) original version by: Nikos Drakos, CBLU, University of Leeds * revised and updated by: Marcus Hennecke, Ross Moore, Herb Swan * with significant contributions from: Jens Lippmann, Marek Rouchal, Martin Wilck and others --> <HTML> <HEAD> <TITLE>Using Wizards</TITLE> <META NAME="description" CONTENT="Using Wizards"> <META NAME="keywords" CONTENT="mmclib2"> <META NAME="resource-type" CONTENT="document"> <META NAME="distribution" CONTENT="global"> <META NAME="Generator" CONTENT="LaTeX2HTML v2002-2-1"> <META HTTP-EQUIV="Content-Style-Type" CONTENT="text/css"> <LINK REL="STYLESHEET" HREF="mmclib2.css"> <LINK REL="next" HREF="node17.html"> <LINK REL="previous" HREF="node15.html"> <LINK REL="up" HREF="node6.html"> <LINK REL="next" HREF="node17.html"> </HEAD> <BODY > <!--Navigation Panel--> <A NAME="tex2html194" HREF="node17.html"> <IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next.gif"></A> <A NAME="tex2html192" HREF="node6.html"> <IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up.gif"></A> <A NAME="tex2html186" HREF="node15.html"> <IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="prev.gif"></A> <BR> <B> Next:</B> <A NAME="tex2html195" HREF="node17.html">Using SnapinManagers</A> <B> Up:</B> <A NAME="tex2html193" HREF="node6.html">Creating snapins with the</A> <B> Previous:</B> <A NAME="tex2html187" HREF="node15.html">ReportNodes</A> <BR> <BR> <!--End of Navigation Panel--> <H2><A NAME="SECTION00037000000000000000"> Using Wizards</A> </H2> When you want to ask the user some questions before you execute a menu option you could use a Wizard. <P> private void SomeHandler(object o, BaseNode a) WizardBase.ShowWizard("Add an Item to the List", null, new WizardPage[] new WzdAddItem() , new WizardBase.WizardAction(WizardHandler)); <P> private void WizardHandler(WizardPage[] pages) String name = ((WzdAddItem)pages[0]).tbName.Text; String type = ((WzdAddItem)pages[0]).tbKind.Text; String age = ((WzdAddItem)pages[0]).spinnerAge.Value.ToString(); m_items.Add(new MyResultViewItem(name, age, type, this.Snapin, this, "MMCTest2.images.Happy.ico","MMCTest2.images.Happy.ico")); this.Snapin.Invoke(new OnUserDelegate(this.O... [truncated message content] |
From: Lesley v. Z. <ex...@us...> - 2004-07-20 15:06:36
|
Update of /cvsroot/mmclibrary/mmclibrary/MMCLib2/Nodes In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv18282/Nodes Added Files: DataTableNode.cs Log Message: Added DataTableNode (this is the old mmclib1 ReportNode Added docs Added docs source tex --- NEW FILE: DataTableNode.cs --- using System; using System.Data; using System.Runtime.InteropServices; using System.Collections; using System.Text.RegularExpressions; using System.Threading; using Ironring.MMC.Core; using ceh = Ironring.MMC.Core.CustomExceptionHandler; namespace Ironring.MMC.Nodes { // TBD: overridable data binding methods to augment GetDisplayInfo /// <summary> /// Configures the resultview as a Listview control. /// Supports binding to a DataTable to provide the schema and data /// </summary> public class DataTableNode : BaseNode { //Added by Alexander Kachalkov /// <summary> /// A cached reference to the MMC console /// </summary> protected IConsole2 m_Console = null; //Added by Alexander Kachalkov /// <summary> /// Return the cached member variable to get at MMC /// </summary> public IHeaderCtrl2 HeaderCtrl { get { return (IHeaderCtrl2)m_Console; } } //Added by Alexander Kachalkov /// <summary> /// Return the cached member variable to get at MMC /// </summary> public IResultData ResultData { get { return (IResultData)m_Console; } } /// <summary> /// Underlying template for the listview control /// </summary> protected DataTable m_table = null; // MAM: the filtersets that are active. /// <summary> /// The currently active filters. The keys are the columns (integer), the values /// are filter expressions. The expressions are simply matched /// by testing if they occur anywhere within the value. /// </summary> protected Hashtable m_filters = null; //Added by Arunjeet Singh /// <summary> /// Variable to hold the AutoRefresh property /// </summary> protected bool m_AutoRefresh = false; /// <summary> /// ctor takes the snapin to register with /// </summary> /// <param name="snapin"></param> public DataTableNode(SnapinBase snapin) : base(snapin) { } /// <summary> /// ctor takes the snapin to register with /// </summary> /// <param name="snapin"></param> /// <param name="parentNode"></param> public DataTableNode(SnapinBase snapin, BaseNode parentNode) : base(snapin, parentNode) { } /// <summary> /// Access the underlying DataTable /// </summary> public DataTable Table { get { return m_table; } set { m_table = value; if(AutoRefresh) { Snapin.SelectScopeNode(this); } } } //Added by Arunjeet Singh /// <summary> /// Property that controls whether or not the resultview is refreshed when the /// Table property changes. /// </summary> public bool AutoRefresh { get { return m_AutoRefresh; } set { m_AutoRefresh = value; } } /// <summary> /// BaseNode override to populate the treeview control /// with column information and data /// </summary> public override void OnShow() { m_Console = m_Snapin.ResultViewConsole; // setup the header for the columns we want to show //Changed by Alexander Kachalkov //IHeaderCtrl2 header = console as IHeaderCtrl2; //OnShowHeader(header); OnShowHeader(HeaderCtrl); // add the actual data items //Changed by Alexander Kachalkov //IResultData rdata = console as IResultData; //OnShowData(rdata); OnShowData(ResultData); // MAM: make it possible to override the (default) viewtype per scope-node. ResultData.SetViewMode(this.GetViewType()); base.OnShow(); } // MAM: from MMCLibExt: make the viewmode for a report-node overrideable. // Defaults to Report-mode (the default for MMCLib). /// <summary> /// Overrideable method to get the actual type of view for this report-node. /// Return one of the ViewMode enum. values. /// </summary> /// <returns></returns> public virtual int GetViewType() { return (int)ViewMode.Report; } //////////////////////////////////////////////////////////////////// // // Helper methods // #region /// <summary> /// Overridable Helper method to populate the column header /// </summary> /// <param name="header"></param> public virtual void OnShowHeader(IHeaderCtrl2 header) { try { if (m_table != null) // Let's put in the column titles foreach (DataColumn col in m_table.Columns) { string name = col.Caption; int ord = col.Ordinal; //int nWidth = col.MaxLength; int nWidth = (int)ColumnHeaderWidth.AUTO_WIDTH; foreach(DataColumn prkey in m_table.PrimaryKey) if (col == prkey) nWidth = (int)ColumnHeaderWidth.HIDE_COLUMN; header.InsertColumn(ord, name, (int)ColumnHeaderFormat.LEFT, nWidth); } } catch(COMException e) { System.Diagnostics.Debug.WriteLine(e.Message); //throw e; ceh.OnThreadException(this, new ThreadExceptionEventArgs(e)); } catch(Exception e) { System.Diagnostics.Debug.WriteLine(e.Message); //throw e; ceh.OnThreadException(this, new ThreadExceptionEventArgs(e)); } } /// <summary> /// Overridable helper method to populate the column data /// </summary> /// <param name="ResultData"></param> public virtual void OnShowData(IResultData ResultData) { if (m_table != null) { int nRow = 1; //Added by Alexander Kachalkov Table.AcceptChanges(); foreach (DataRow row in m_table.Rows) { // MAM: check if the item should be added based on the filtering. if(CheckItem(row)) { InsertItem(row, nRow); } nRow++; } } } /// <summary> /// Overridable helper method to InsertItem /// </summary> /// <param name="row"></param> /// <param name="nRow"></param> public virtual void InsertItem(DataRow row, int nRow) { if (row != null) { RESULTDATAITEM rdi = new RESULTDATAITEM(); row.ToString(); rdi.mask = (uint)RDI.STR | (uint)RDI.IMAGE | (uint)RDI.PARAM; // TBD: what image? rdi.nImage = -1; rdi.str = (IntPtr)(-1); // callback for names rdi.nCol = 0; rdi.lParam = GetItemLParam(nRow); ResultData.InsertItem(ref rdi); } } /// <summary> /// Overridable helper method to SetItem /// </summary> /// <param name="row"></param> /// <param name="nRow"></param> public virtual void SetItem(DataRow row, int nRow) { if (row != null) { int lParam = GetItemLParam(nRow); uint pItemID; RESULTDATAITEM rdi = new RESULTDATAITEM(); row.ToString(); rdi.mask = (uint)RDI.STR | (uint)RDI.PARAM; rdi.str = (IntPtr)(-1); // callback for names rdi.nCol = 0; //Find ItemID ResultData.FindItemByLParam(lParam, out pItemID); rdi.lParam = lParam; rdi.itemID = (int)pItemID; ResultData.SetItem(ref rdi); } } /// <summary> /// Overridable helper method to UpdateItem /// </summary> /// <param name="lParam"></param> public virtual void UpdateItem(int lParam) { uint pItemID; //Find ItemID ResultData.FindItemByLParam(lParam, out pItemID); ResultData.UpdateItem(pItemID); } /// <summary> /// Overridable helper method to DeleteItem /// </summary> /// <param name="lParam"></param> public virtual void DeleteItem(int lParam) { uint pItemID; //Find ItemID ResultData.FindItemByLParam(lParam, out pItemID); ResultData.DeleteItem(pItemID, 0); } /// <summary> /// Overridable helper method to GetItem /// </summary> /// <param name="ResultDataItem"></param> /// <param name="pItemID"></param> public virtual void GetItem(out RESULTDATAITEM ResultDataItem, uint pItemID) { RESULTDATAITEM rdi = new RESULTDATAITEM(); rdi.mask = (uint)RDI.STR; // STR is valid rdi.itemID = (int)pItemID; rdi.nCol = 0; ResultData.GetItem(ref rdi); ResultDataItem = rdi; } /// <summary> /// Overridable helper method to ClearSelection /// </summary> public virtual void ClearSelection() { RESULTDATAITEM rdi = GetSelectedItem(); while (rdi.nIndex!=-1) { ResultData.ModifyItemState(rdi.nIndex, (uint)rdi.itemID, 0, (uint)LVIS.SELECTED | (uint)LVIS.FOCUSED); rdi = GetSelectedItem(); } } /// <summary> /// Overridable helper method to SelectItem /// </summary> /// <param name="nRow"></param> public virtual void SelectItem(int nRow) { int lParam = GetItemLParam(nRow); uint pItemID; //Find ItemID ResultData.FindItemByLParam(lParam, out pItemID); //ResultData.SetItem(ref rdi); ResultData.ModifyItemState(0, pItemID, (uint)LVIS.SELECTED | (uint)LVIS.FOCUSED, 0); } /// <summary> /// Overridable helper method to Set /// </summary> /// <param name="nRow"></param> public virtual void SetFocus(int nRow) { int lParam = GetItemLParam(nRow); uint pItemID; //Find ItemID ResultData.FindItemByLParam(lParam, out pItemID); RESULTDATAITEM rdi = new RESULTDATAITEM(); rdi.itemID = (int)pItemID; rdi.mask = (uint)RDI.STATE; rdi.nState = (uint)LVIS.SELECTED; // select the item rdi.nCol = 0; ResultData.SetItem(ref rdi); } /// <summary> /// Overridable helper method to GetSelectedItem /// </summary> public virtual RESULTDATAITEM GetSelectedItem() { return GetSelectedItem(-1); // nIndex == -1 to start at first item } /// <summary> /// Overridable helper method to GetSelectedItem /// </summary> /// <param name="nIndex"></param> public virtual RESULTDATAITEM GetSelectedItem(int nIndex) { RESULTDATAITEM rdi = new RESULTDATAITEM(); rdi.mask = (uint)RDI.STATE; // nState is valid rdi.nCol = 0; rdi.nIndex = nIndex; // nIndex == -1 to start at first item rdi.nState = (uint)LVIS.SELECTED; // only interested in selected items ResultData.GetNextItem(ref rdi); //out return rdi; } /// <summary> /// helper method to get item row ID by lParam /// </summary> /// <param name="lParam"></param> public virtual int GetTableRowID(int lParam) { return (lParam >> 16) - 1; } /// <summary> /// helper method to get item lParam by nRow /// The low word contains the cookie for the node, while the high word /// contains the row number + 1 we're inserting /// </summary> /// <param name="nRow"></param> public virtual int GetItemLParam(int nRow) { return m_iCookie | (nRow << 16); } #endregion /// <summary> /// BaseNode callback override responsible for provided data. Lookup the /// row info in the lparam of the resultdataitem since its packed in with /// our own cookie /// </summary> /// <param name="rdi"></param> public override void GetDisplayInfo(ref RESULTDATAITEM rdi) { bool bCallbase = true; int nRow = 0; // the "cell" data if (Table != null) { //int nRow = (ResultDataItem.lParam >> 16) - 1; nRow = GetTableRowID(rdi.lParam); int nCol = rdi.nCol; if ((rdi.mask & (uint)RDI.STR) > 0) { string data = DisplayName; if (nRow >= 0 && nRow < Table.Rows.Count && nCol >= 0 && nCol < Table.Columns.Count) { data = Table.Rows[nRow].ItemArray[nCol].ToString(); bCallbase = false; //System.Diagnostics.Trace.WriteLine(string.Format("GetDisplayInfo: data={0}, row={1}", data, nRow)); } rdi.str = Marshal.StringToCoTaskMemUni(data); } } // the image - requires 2 images in the image list // small - 0 // large - 1 //Changed by Alexander Kachalkov // small - SmallImageIndex // large - LargeImageIndex if ((rdi.mask & (uint)RDI.IMAGE) > 0) { int offset = 0; if (IsUseSmallIcons()) offset = SmallImageIndex; else offset = LargeImageIndex; rdi.nImage = (Cookie << 16) + offset; } if (bCallbase) base.GetDisplayInfo(ref rdi); } public virtual void RefreshResultView() { Snapin.SelectScopeNode(this); } ////////////////////////////////////////////////////////////// // // Filtering implementation // #region Filtering // MAM: override the filter-event and do something (only called when the // view-mode is also filtered). /// <summary> /// When we receive a filter event, we construct a full set of filters per column. /// </summary> /// <param name="code">The filter-change operator.</param> /// <param name="col">The column for which the change is.</param> public override void OnFilterChange(MMC_FILTER_CHANGE_CODE code, int col) { switch(code) { case MMC_FILTER_CHANGE_CODE.MFCC_DISABLE: this.m_filters = null; break; case MMC_FILTER_CHANGE_CODE.MFCC_ENABLE: //ignore break; case MMC_FILTER_CHANGE_CODE.MFCC_VALUE_CHANGE: try { int bufLen = 1000; string strData = GetColumnFilter(col, bufLen); // Get the column object and set the string if(this.m_filters == null) { this.m_filters = new Hashtable(); } // Huh? We get a string back: instead of a null-ptr or zero-terminated string // we get some strange characters. Assume that if we get a really large string an // empty string is meant. Probably some funky interop is needed to get this // correct in microsoft parlance. // TODO: get this verified/looked at by some COM guru. if (!Regex.IsMatch(strData, @"\w") || strData.Length >= (bufLen / 2)) { this.m_filters.Remove(col); } else { this.m_filters[col] = strData; } // Performance: unset the filter object when no filters are active. if(this.m_filters.Count == 0) { this.m_filters = null; } // Do a forced refresh of all items. RemoveAllItems(); } catch(Exception e) { System.Diagnostics.Debug.WriteLine(e.Message); //throw e; ceh.OnThreadException(this, new ThreadExceptionEventArgs(e)); } break; } base.OnFilterChange(code, col); } // MAM: this is taken from the MMClibExt2 and changed a bit to // be a little brute about which item is removed. /// <summary> /// Remove all items from the view and forces a refresh. /// </summary> public virtual void RemoveAllItems() { try { IConsole2 console = base.Snapin.ResultViewConsole; if(console != null) { // add the actual data items IResultData rdata = console as IResultData; if(rdata != null) { rdata.DeleteAllRsltItems(); this.OnShowData(rdata); } else { System.Diagnostics.Debug.WriteLine("Rdata cannot be cast"); } } else { System.Diagnostics.Debug.WriteLine("Cannot find console"); } } catch(Exception e) { System.Diagnostics.Debug.WriteLine("Aaargh: " + e); ceh.OnThreadException(this, new ThreadExceptionEventArgs(e)); } } // MAM: filtering code. Generic checker. /// <summary> /// Overrideable checker method to see if this row is acceptable. /// </summary> /// <param name="row"></param> /// <returns></returns> public virtual bool CheckItem(DataRow row) { // Performance: No filters: return early. if(m_filters == null) { return true; } object[] data = row.ItemArray; for(int i=0; i<data.Length; i++) { string filterValue = m_filters[i] as string; if(filterValue != null && data[i] != null) { if(data[i].ToString().IndexOf(filterValue) == -1) { // There is a filter and there is a value but the value does // not contain the filter. return false; } } } return true; } //Added by Alexande Kachalkov /// <summary> /// Overridable helper method to GetColumnFilter /// </summary> /// <param name="col">Filter column</param> /// <param name="bufLen">Buffer length</param> /// <returns>string</returns> public virtual string GetColumnFilter(int col, int bufLen) { int retval = 0; MMC_FILTERDATA data = new MMC_FILTERDATA(); try { uint type = 0; // Some arbitrary buffer length. data.pszText = IntPtr.Zero; // COM magic. data.pszText = Marshal.AllocCoTaskMem(bufLen); data.cchTextMax = bufLen; retval = HeaderCtrl.GetColumnFilter((uint)col, ref type, ref data); string strData = Marshal.PtrToStringAuto(data.pszText); // the size doesn't change?, data.cchTextMax); System.Diagnostics.Debug.WriteLine("Got: " + strData + " for column: " + col + " Length of string: " + strData.Length); return strData; } catch(Exception e) { System.Diagnostics.Debug.WriteLine(e.Message); //throw e; ceh.OnThreadException(this, new ThreadExceptionEventArgs(e)); } finally { if(! data.pszText.Equals(IntPtr.Zero)) { Marshal.FreeCoTaskMem(data.pszText); } } return null; } //Added by Alexande Kachalkov /// <summary> /// Overridable helper method to SetColumnFilter /// </summary> /// <param name="col">Filter column</param> /// <param name="type">Filter type</param> /// <param name="text">Filter text</param> /// <returns></returns> public virtual int SetColumnFilter(int col, MMC_FILTER_TYPE type, string text) { int retval = 0; MMC_FILTERDATA2 data = new MMC_FILTERDATA2(); try { data.pszText = text; retval = HeaderCtrl.SetColumnFilter((uint)col, (uint)type, data); } catch(Exception e) { System.Diagnostics.Debug.WriteLine(e.Message); //throw e; ceh.OnThreadException(this, new ThreadExceptionEventArgs(e)); } return retval; } #endregion } } |
From: Lesley v. Z. <ex...@us...> - 2004-07-20 15:03:50
|
Update of /cvsroot/mmclibrary/mmclibrary/MMCLib2/docs In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv17918/docs Log Message: Directory /cvsroot/mmclibrary/mmclibrary/MMCLib2/docs added to the repository |