Code: Select all
[ProvideEditorFactory(typeof(WDEditorFactory), "Workflow Dashboard Editor Factory")]
[ProvideEditorExtension(typeof(WDEditorFactory), "sp-select", "wd", 10)]
partial class MyPackage : Package
{
protected override void OnInitialize()
{
RegisterEditorFactory(new WDEditorFactory(this));
var shell = GetService<IShell>();
shell.Load += ShellLoadHandler;
}
private void ShellLoadHandler(object sender, EventArgs e)
{
var shell = GetService<IShell>();
shell.OpenStandardEditor(new Uri("sp-select:///wd")); // InvalidOperationException thrown here.
}
}
Code: Select all
at System.Linq.Enumerable.Single[TSource](IEnumerable`1 source, Func`2 predicate)
at SoftPro.Select.Managers.MRUListManager.GetRecentDcumentsManager()
at SoftPro.Select.Managers.MRUListManager.SoftPro.Select.Shell.IMRUList.Add(Uri moniker, String title, DateTime lastAccess)
at SoftPro.Select.Managers.ShellManager.SoftPro.Select.Shell.IShell.OpenDocumentWindow(Uri moniker, String view, Object existingData, Boolean openAsNew, Boolean shellExecute)
at SoftPro.Select.Managers.ShellManager.SoftPro.Select.Shell.IShell.OpenStandardEditor(Uri moniker)
at WorkflowDashboard.MyPackage.ShellLoadHandler(Object sender, EventArgs e)
at System.EventHandler.Invoke(Object sender, EventArgs e)
at SoftPro.Select.Managers.ShellManager.InvokeLoad()
at SoftPro.Select.Runtime.OnRun()
at SoftPro.Select.Runtime.Start()
Here is another forum post that may be similar, but it is for opening orders through the order store.
viewtopic.php?f=6&t=748