GetComponentAssemblyByGuid() public static méthode

public static GetComponentAssemblyByGuid ( MgaProject project, string componentAssemblyGuid ) : ISIS.GME.Dsml.CyPhyML.Interfaces.ComponentAssembly
project MgaProject
componentAssemblyGuid string
Résultat ISIS.GME.Dsml.CyPhyML.Interfaces.ComponentAssembly
Exemple #1
0
 // Callback invoked if the executable startup has failed
 private void ExeStartupFailed(string stderr, string logfilePath)
 {
     // Unhighlight tree and remove item from synced components
     if (LastStartedInstance != null)
     {
         try
         {
             addon.Project.BeginTransactionInNewTerr();
             ISIS.GME.Common.Interfaces.Base model = CyphyMetaLinkUtils.GetComponentAssemblyByGuid(addon.Project, LastStartedInstance.Id);
             if (model == null)
             {
                 model = CyphyMetaLinkUtils.GetComponentByAvmId(addon.Project, LastStartedInstance.Id);
                 SendDisinterest(true, LastStartedInstance.InstanceId);
             }
             if (model != null)
             {
                 AssemblyID = null;
                 HighlightInTree(model, 0);
                 SendDisinterest(true, LastStartedInstance.InstanceId);
             }
             syncedComponents.Remove(LastStartedInstance.Id);
             // FIXME designIdToCadAssemblyXml.Remove(
         }
         finally
         {
             addon.Project.AbortTransaction();
         }
     }
     LastStartedInstance = null;
     ShowStartupDialog(false);
 }
Exemple #2
0
 private void ConnectionClosed(Exception e)
 {
     SyncControl.BeginInvoke((System.Action) delegate
     {
         if (addon != null)
         {
             GMEConsole console = GMEConsole.CreateFromProject(addon.Project);
             console.Error.WriteLine("Connection to MetaLink lost.");
             //componentEditMessages.Clear();
             interests.Clear();
             AssemblyID = null;
             CloseMetaLinkBridge();
             if (console.gme != null)
             {
                 // Marshal.FinalReleaseComObject(console.gme); is this needed?
             }
             Enable(false);
             if (syncedComponents.Count > 0)
             {
                 bool inTx = ((addon.Project.ProjectStatus & 8) != 0);
                 if (inTx == false)
                 {
                     addon.Project.BeginTransactionInNewTerr();
                 }
                 try
                 {
                     foreach (string id in syncedComponents.Keys)
                     {
                         ISIS.GME.Common.Interfaces.Base model = CyphyMetaLinkUtils.GetComponentAssemblyByGuid(addon.Project, id);
                         if (model == null)
                         {
                             model = CyphyMetaLinkUtils.GetComponentByAvmId(addon.Project, id);
                         }
                         if (model != null)
                         {
                             HighlightInTree(model, 0);
                         }
                     }
                 }
                 finally
                 {
                     if (inTx == false)
                     {
                         addon.Project.AbortTransaction();
                     }
                 }
                 syncedComponents.Clear();
                 designIdToCadAssemblyXml.Clear();
             }
         }
     });
 }