protected override void OnExecute(Command command, SpaceClaim.Api.V19.ExecutionContext context, Rectangle buttonRect) { Thread _thread = new Thread(() => { System.Windows.Forms.Application.Run(new DevelopGLPSOLForm()); }); _thread.SetApartmentState(ApartmentState.STA); _thread.Start(); }
protected override void OnExecute(Command command, SpaceClaim.Api.V19.ExecutionContext context, Rectangle buttonRect) { if (!Settings.Default.NewStudyFormOpened) { Settings.Default.NewStudyFormOpened = true; Settings.Default.Save(); Thread _thread = new Thread(() => { System.Windows.Forms.Application.Run(new NewStudyForm()); }); _thread.SetApartmentState(ApartmentState.STA); _thread.Start(); } }
protected override void OnExecute(Command command, SpaceClaim.Api.V19.ExecutionContext context, Rectangle buttonRect) { //SolImportForm i = new SolImportForm(); //i.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen; //// Show() opens the Windows.Form //i.Show(); Thread _thread = new Thread(() => { System.Windows.Forms.Application.Run(new DevelopSolImportForm()); }); _thread.SetApartmentState(ApartmentState.STA); _thread.Start(); }