/// <summary> /// Event Wrapper /// </summary> /// <param name="sender"></param> /// <param name="pk"></param> void ClosedToolPluginHandler(object sender, PackageArg pk) { if (ClosedToolPlugin != null) { ClosedToolPlugin(sender, pk); } }
private void ClickItem(object sender, System.EventArgs e) { try { if (tool.IsEnabled(pfd, package)) { SimPe.Interfaces.Plugin.IToolResult tr = tool.ShowDialog(ref pfd, ref package); WaitingScreen.Stop(); if (tr.ChangedAny) { PackageArg p = new PackageArg(); p.Package = package; p.FileDescriptor = pfd; p.Result = tr; if (chghandler != null) { chghandler(this, p); } } } } catch (Exception ex) { Helper.ExceptionMessage("Unable to Start ToolPlugin.", ex); } }
private void ClosedToolPlugin(object sender, PackageArg pk) { try { if (pk.Result.ChangedPackage) { package.LoadFromPackage((SimPe.Packages.GeneratableFile)pk.Package); } if (pk.Result.ChangedFile) { SimPe.Interfaces.Scenegraph.IScenegraphFileIndexItem fii = new SimPe.Plugin.FileIndexItem(pk.FileDescriptor, pk.Package); resloader.AddResource(fii, true); remote.FireLoadEvent(fii); } } catch (Exception ex) { Helper.ExceptionMessage(ex); } }