Beispiel #1
0
 /// <summary>
 /// Event Wrapper
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="pk"></param>
 void ClosedToolPluginHandler(object sender, PackageArg pk)
 {
     if (ClosedToolPlugin != null)
     {
         ClosedToolPlugin(sender, pk);
     }
 }
Beispiel #2
0
 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);
     }
 }
Beispiel #3
0
 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);
     }
 }