예제 #1
0
        private static void initializeControlPanel(EA.Repository Repository)
        {
            if (globalFunctions == null)
            {
                globalFunctions = Repository.AddWindow("eMoflon Global Functions", "EAEcoreAddin.ControlPanel.Global.GlobalFunctions") as GlobalFunctions;
            }
            globalFunctions.resetFunctions(Repository);

            if (sdmFunctions == null)
            {
                sdmFunctions = Repository.AddWindow("eMoflon SDM Functions", "EAEcoreAddin.ControlPanel.SDMFunctions") as SDMFunctions;
            }
            sdmFunctions.resetFunctions(Repository);

            if (tggFunctions == null)
            {
                tggFunctions = Repository.AddWindow("eMoflon TGG Functions", "EAEcoreAddin.ControlPanel.TGGFunctions") as TGGFunctions;
            }
            tggFunctions.resetFunctions(Repository);

            if (tcpServerFunctions == null)
            {
                tcpServerFunctions = Repository.AddWindow("eMoflon TCP Server Functions", "EAEcoreAddin.ControlPanel.TCPServerUserControl") as TCPServerUserControl;
            }
            tcpServerFunctions.resetFunctions(Repository);

            if (mainErrorOutput == null)
            {
                mainErrorOutput = Repository.AddWindow("eMoflon Validation Result", "EAEcoreAddin.Consistency.RuleHandling.NewErrorOutput") as NewErrorOutput;
                ConsistencyModule.RuleErrorOutputControls.Add(mainErrorOutput);
            }
            consistencyModule.resetConsistencyModule(Repository);
        }
예제 #2
0
 /// <summary>
 /// called when the selected item changes
 /// This operation will show the guid of the selected element in the eaControl
 /// </summary>
 /// <param name="Repository">the EA.Repository</param>
 /// <param name="GUID">the guid of the selected item</param>
 /// <param name="ot">the object type of the selected item</param>
 public override void EA_OnContextItemChanged(EA.Repository Repository, string GUID, EA.ObjectType ot)
 {
     if (this.eaControl == null)
     {
         this.eaControl = Repository.AddWindow("My Control", "MyAddin.MyEAControl") as MyEAControl;
     }
     if (this.eaControl != null)
     {
         this.eaControl.setNameLabel(GUID);
     }
 }
예제 #3
0
 /// <summary>
 /// called when the selected item changes
 /// This operation will show the guid of the selected element in the eaControl
 /// </summary>
 /// <param name="Repository">the EA.Repository</param>
 /// <param name="GUID">the guid of the selected item</param>
 /// <param name="ot">the object type of the selected item</param>
 public override void EA_OnContextItemChanged(EA.Repository Repository, string GUID, EA.ObjectType ot)
 {
     if (this.eaControl == null)
     {
         this.eaControl = Repository.AddWindow("Explorer", "EAExplorer.EAExplorerControl") as EAExplorerControl;
     }
     if (this.eaControl != null)
     {
         this.eaControl.showObjectProperties(Repository, GUID, ot);
     }
 }
예제 #4
0
        /// <summary>
        /// EAコネクトイベント
        /// </summary>
        /// <param name="Repository">EAリポジトリ</param>
        /// <returns>アドインの種類</returns>
        public string EA_OnPostInitialized(EA.Repository Repository)
        {
            if (Repository.LibraryVersion < 1300)
            {
                MessageBox.Show("このアドインの動作には、ビルド1300以降が必要です。");
            }
            else
            {
                behaverControl = Repository.AddWindow(AddinName, typeof(BehaverControl).FullName);
            }

            if (behaverControl != null)
            {
                // 振舞い編集画面の初期化
                behaverControl.repository = Repository;
            }

            return(string.Empty);
        }
        /// <summary>
        /// called when the selected item changes
        /// This operation will show the guid of the selected element in the eaControl
        /// </summary>
        /// <param name="Repository">the EA.Repository</param>
        /// <param name="GUID">the guid of the selected item</param>
        /// <param name="ot">the object type of the selected item</param>
        public override void EA_OnContextItemChanged(EA.Repository Repository, string GUID, EA.ObjectType ot)
        {
            if (this.eaControl == null)
            {
                this.eaControl = Repository.AddWindow("My Control", "MyAddin.MyEAControl") as MyEAControl;
            }
            if (this.eaControl != null)
            {
                var    model  = new TSF_EA.Model(Repository);
                var    action = model.getItemFromGUID(GUID) as TSF_EA.Action;
                string name   = GUID;
//				if( action != null)
//				{
//					action.kind = TSF_EA.ActionKind.BroadcastSignal;
//					action.save();
//
//					name = action.name +" "+ Enum.GetName(typeof(TSF_EA.ActionKind), action.kind);
//				}
                this.eaControl.setNameLabel(name);
            }
        }
 private void RegisterAddInAsTab()
 {
     if (_gui == null)
     {
         try
         {
             _gui = _rep.AddWindow(hoAddinTemplateGui.Gui.TabName, hoAddinTemplateGui.Gui.ProgId);
             if (_gui == null)
             {
                 MessageBox.Show($"TabName:'{hoAddinTemplateGui.Gui.TabName}'\r\nProgId:'{hoAddinTemplateGui.Gui.ProgId}'",
                                 "Can't install Add-In 'hoAddinTemplate' as Tab");
             }
             _gui.Settings = _settings;
         }
         catch (Exception e)
         {
             MessageBox.Show($"TabName:'{hoAddinTemplateGui.Gui.TabName}'\r\nProgId:'{hoAddinTemplateGui.Gui.ProgId}'\r\n\r\n{e}",
                             "Can't install Add-In 'hoAddinTemplate'");
             throw;
         }
     }
 }
 /// <summary>
 /// EA_Connect events enable Add-Ins to identify their type and to respond to Enterprise Architect start up.
 /// This event occurs when Enterprise Architect first loads your Add-In. Enterprise Architect itself is loading at this time so that while a Repository object is supplied, there is limited information that you can extract from it.
 /// The chief uses for EA_Connect are in initializing global Add-In data and for identifying the Add-In as an MDG Add-In.
 /// Also look at EA_Disconnect.
 /// </summary>
 /// <param name="Repository">An EA.Repository object representing the currently open Enterprise Architect model.
 /// Poll its members to retrieve model data and user interface status information.</param>
 /// <returns>String identifying a specialized type of Add-In:
 /// - "MDG" : MDG Add-Ins receive MDG Events and extra menu options.
 /// - "" : None-specialized Add-In.</returns>
 public override string EA_Connect(EA.Repository Repository)
 {
     this.eaControl = Repository.AddWindow("My Control", "MyAddin.MyEAControl") as MyEAControl;
     return(base.EA_Connect(Repository));
 }
예제 #8
0
 public object AddWindow(string TabName, string ControlID)
 {
     return(eaRepository.AddWindow(TabName, ControlID));
 }
예제 #9
0
 /// <summary>
 /// EA_Connect events enable Add-Ins to identify their type and to respond to Enterprise Architect start up.
 /// This event occurs when Enterprise Architect first loads your Add-In. Enterprise Architect itself is loading at this time so that while a Repository object is supplied, there is limited information that you can extract from it.
 /// The chief uses for EA_Connect are in initializing global Add-In data and for identifying the Add-In as an MDG Add-In.
 /// Also look at EA_Disconnect.
 /// </summary>
 /// <param name="Repository">An EA.Repository object representing the currently open Enterprise Architect model.
 /// Poll its members to retrieve model data and user interface status information.</param>
 /// <returns>String identifying a specialized type of Add-In:
 /// - "MDG" : MDG Add-Ins receive MDG Events and extra menu options.
 /// - "" : None-specialized Add-In.</returns>
 public override string EA_Connect(EA.Repository Repository)
 {
     this.eaControl = Repository.AddWindow("Explorer", "EAExplorer.EAExplorerControl") as EAExplorerControl;
     return(base.EA_Connect(Repository));
 }