You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Following you example I was able to show a WinForm as popup in an add-in built with xCAD 0.7.12.
Now I would like to show the form as popup from a class different from the main add-in class library. Is it possibile?
I have the main class library AddInClass:
usingAddInLibrary.UI;usingSystem.ComponentModel;usingSystem.Runtime.InteropServices;usingXarial.XCad.Base.Attributes;usingXarial.XCad.SolidWorks;usingXarial.XCad.UI.Commands;namespaceAddInLibrary{[ComVisible(true)][Title("Test Add-In")][Description("An Add-In for test purpose")]publicclassAddInClass:SwAddInEx{[Title("Test Add-In")][Description("Test commands")]publicenumCommands_e{[Title("Show form")][Description("Show a windows form")]FormCommand,[Title("Show form2")][Description("Show form from class")]FormCommandExt}publicoverridevoidOnConnect(){CommandManager.AddCommandGroup<Commands_e>().CommandClick+=OnCommandClick;}privatevoidOnCommandClick(Commands_ecommand){switch(command){caseCommands_e.FormCommand:varwinFormPopUpWnd=this.CreatePopupWindow<TestWinForm>();winFormPopUpWnd.ShowDialog();break;caseCommands_e.FormCommandExt:ShowFormClass.ShowWinForm();break;}}}}
Hi! I was able to show the winform using the ShowDialog method and seems to work fine for my purposes. Are there any particular benefit to use CreatePopupWindow instead?
Following you example I was able to show a WinForm as popup in an add-in built with xCAD 0.7.12.
Now I would like to show the form as popup from a class different from the main add-in class library. Is it possibile?
I have the main class library
AddInClass
:The another class
ShowFormClass
:I would like the
ShowWinForm
method to openTestWinForm
as a popup.A link to a test repo.
Thanks in advance.
The text was updated successfully, but these errors were encountered: