using System;
using System.Collections;
using Ironring.MMC.Core;
using Ironring.MMC.Nodes;
using Ironring.MMC.PropertyPages;
namespace MMCTest2{
public class MyOCXNode : OCXNode
{
public MyOCXNode(SnapinBase snapin, String name, Guid guid, String closedIco, String openIco) : base(snapin, name, guid, closedIco, openIco)
{
}
public override string ResultViewSmallImage
{
get
{
return "MMCTest2.images.snapin.Ico";
}
}
public override string ResultViewLargeImage
{
get
{
return "MMCTest2.images.snapin.Ico";
}
}
public override ArrayList Menus
{
get
{
ArrayList menus = new ArrayList();
menus.Add(new MenuItem("Doesn't work?", "Click if the FormNode doesn't work", new MenuCommandHandler(DoesntworkHandler)));
return menus;
}
}
private void DoesntworkHandler(object o, BaseNode node)
{
System.Windows.Forms.MessageBox.Show("This particular OCX Object only works on Systems with Microsoft Office installed");
}
public override ArrayList PropertyPages
{
get
{
ArrayList pages = new ArrayList();
pages.Add(new PropertyPage("PropertyPage", typeof(MyPropertyPage), this));
return pages;
}
}
}
}
|