Hi All
I have a problem as title. I have wrote a simple addin and want to use it with IDispatcher. The addin looks like is loaded as normal; however, when I type the customized command, I/Dispatcher complains it is unrecognized. I expected once the addin is loaded, I can type command JUS and a messagebox would popup.
I attach the addin code here.
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Intergraph.IPS.AddInFramework;
using System.Windows.Forms;
using System.ComponentModel.Design;
using Intergraph.IPS.Logging;
using Intergraph.IPS.Utility;
namespace Intergraph.IPS.AddInModule.JustTestAddIn
{
[AddInType("JustTestAddIn")]
public class JustTestAddIn : IDisposable, ICommandSet
{
private Dictionary<string, ICommandInvoke> commands = new Dictionary<string, ICommandInvoke>();
private IServiceContainer m_SC;
private CommandInvoke<CommandArgs> command = new CommandInvoke<CommandArgs>();
public IDictionary<string, ICommandInvoke> Commands
{
get
{
return (IDictionary<string, ICommandInvoke>)this.commands;
}
}
public string CommandSet
{
get
{
return "JustTestAddIn";
}
}
public JustTestAddIn(IServiceContainer sc)
{
this.m_SC = sc;
this.command.Invoked += this.ManualNotificationCommandLine_Invoked;
this.commands.Add("JUS", this.command);
}
public void ManualNotificationCommandLine_Invoked(object sender, CommandArgs e)
{
MessageBox.Show("hi");
}
public void Dispose()
{
}
}
}
Any idea is appreciated.
Regards
gelin yan
|