Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

MMC 3.0

12 views
Skip to first unread message

nishi...@gmail.com

unread,
Oct 11, 2006, 8:00:22 AM10/11/06
to
Hi,
I am developing a Sample in C# using MMC3.0. the problem is in the Left
panel...There are two panels...left one to show the tree structure.
1.In MMC I want to refresh whenver I delete any nodes.Currently If I
rightclick on a node and click on Delete it still keeps on showing the
node in the left panel treeview.If I close the Snap-IN and re-open it
....I dont see the deleted node.

2.In the left panel treeview I have a custom action verb called "Show"
which opens a propertypage.
In this propertypage I want to see the parent node from which I came.
I mean ..if the tree structure is
RootNode1
Application1
Application2
Application3
When I rightclick Application3 and click "Show"....a propertypage
pops-up...now in this propertypage I want to get the name
"Application3".

To pop-up propertypage I am using the standard sample provided by
MIcrosoft.
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnanchor/html/setupsysadmin.asp

I am facing all this problems with left panel...with right panel
everything works fine.

Kevin Qian [MSFT]

unread,
Oct 13, 2006, 12:14:26 AM10/13/06
to
1. How did you implement deletion of a scope node. There should not be
such a problem. If you delete the scopenode from inside OnDelete, the
scopenode will be deleted and removed from the scope tree automatically.

2. You can pass the scopenode infor into the your PropertyPage object, such
as through an argument in the constructor ...


--

K. Qian [MSFT]
--
[This posting is provided 'as is' with no warranties, and confers no rights.
You assume all risk for your use. © 2006 Microsoft Corporation. All rights
reserved.]


<nishi...@gmail.com> wrote in message
news:1160568022.2...@e3g2000cwe.googlegroups.com...

NISHIL

unread,
Oct 13, 2006, 1:15:52 AM10/13/06
to
Hi Kevin...
1.I am using Custom actionpanesItem to delete the scope node.
The code for it is
protected override void OnAction(Action action, AsyncStatus status)
{
switch ((string)action.Tag)
{
case "Delete":
{
HelperClass.SsoConfiguration objSSOConfig = new
HelperClass.SsoConfiguration();
objSSOConfig.DeleteApplication(DisplayName);

break;
}
}
}

I have mailed you the SnapInpage.cs Code.....which is the main class
from where the SnapIn is initialized.I still cant refresh the SnapIn.I
am calling a helper class to delete the node from my custom database.

2.It worked out by sending the scopenode as an argument.

So now the only problem is refreshing after deleting anything from
anywmere.I want to refresh the rootnode ....whatver I delete from where
ever.

Kevin Qian [MSFT]

unread,
Oct 13, 2006, 2:35:10 PM10/13/06
to
You need to call ScopeNode.Parent.Children.Remove(scopenode) some where in
your delete operation to delete the scope node.

--

K. Qian [MSFT]
--
[This posting is provided 'as is' with no warranties, and confers no rights.
You assume all risk for your use. © 2006 Microsoft Corporation. All rights
reserved.]


"NISHIL" <nishi...@gmail.com> wrote in message
news:1160716552....@i3g2000cwc.googlegroups.com...

NISHIL

unread,
Oct 17, 2006, 2:17:56 AM10/17/06
to
That delete thing worked fine.

IS there any limitation while working with SnapIn and C#.
I had a tree structure like this in Left Panel.
Rootnode1
Application1
Application2

I have custom verb on rootnode1 as "Add Application",which opens up a
Propertypage.
In the "ok" event of propertypage I have following code which adds the
Application to the tree along with the verbs.....but the verbs are not
working fine.

ScopeNode objSNode = new ScopeNode();
objSNode.DisplayName = this.txtApplicationName.Text;
scopeNode.Children.Add(objSNode);
int AppCount = scopeNode.Children.Count;

MmcListViewDescription mmcListViewDescription = new
MmcListViewDescription();
mmcListViewDescription.DisplayName = "User List with
Properties";
mmcListViewDescription.ViewType = typeof(UserListView);

mmcListViewDescription.Options =
MmcListViewOptions.SingleSelect;

scopeNode.Children[AppCount-1].ViewDescriptions.Add(mmcListViewDescription);

scopeNode.Children[AppCount-1].ActionsPaneItems.Add(new
Action("Delete", "Deletes the Application", -1, "Delete"));
scopeNode.Children[AppCount-1].ActionsPaneItems.Add(new
Action("ADD Key Value Pair", "Adds Key Value Pair", -1,
"ADD_KeyValue"));


My problem is I can see the new node added...but can execute the
verb..."Delete","Add keyvalue pair".
While initialising the SnapIn I have the same code and it works
fine.How do I catch these verbs in Propertypages.

Kevin Qian [MSFT]

unread,
Oct 18, 2006, 2:14:47 PM10/18/06
to
Since you can see the new nodes in the tree, I think they are added fine.
When you select the added node, did you see the actions (Delete, ...) appear
on the Actions pane? If so, they are ok. Then make sure you implemneted
deletion of the node inside "OnAction".

--

K. Qian [MSFT]
--
[This posting is provided 'as is' with no warranties, and confers no rights.
You assume all risk for your use. © 2006 Microsoft Corporation. All rights
reserved.]


"NISHIL" <nishi...@gmail.com> wrote in message

news:1161065876.3...@b28g2000cwb.googlegroups.com...

NISHIL

unread,
Oct 26, 2006, 5:53:53 AM10/26/06
to
Thnx Kevin for your time.
I have resolved that problem of verbs. Now I dont show up a
propertypage to add new Application(To read the name from textbox).On
click of "Add Application" on root node...i direcly add a child element
named "Child1".Then I allow renaming it as per user needs. Now
everything is fine.Its not so easy to work with MMC 3.0 and C#

Regards,
NISHIL
http://biztalkblogs.com/nishil/default.aspx

0 new messages