Tokay Posted March 2, 2021 Share Posted March 2, 2021 TabSessions and ManageServer? I'm use 1545 version now. Quote Link to comment Share on other sites More sharing options...
Sherzod Posted March 2, 2021 Share Posted March 2, 2021 20 minutes ago, Tokay said: TabSessions and ManageServer? I'm use 1545 version now. \FMSoft\Framework\uniGUI\Demos\Desktop\ControlPanelSessions ? Quote Link to comment Share on other sites More sharing options...
Tokay Posted March 2, 2021 Author Share Posted March 2, 2021 Ok, great! The TabSessions works great. But how about the ManageServer? It's disabled. I think I found it. The soEnableSessionMonitorAdmin option is needed to enabled on the server module. Quote Link to comment Share on other sites More sharing options...
Tokay Posted March 2, 2021 Author Share Posted March 2, 2021 I've try to open descendant of the TServerControlPanelForm directly from my code (ServerControlPanelForm37.Show), not from the /server link. I also enabled soEnableSessionMonitor and soEnableSessionMonitorAdmin and added code on the descendant OnCreate: UniSession.AllowSessionAdmin := True; SessionsMenu.Enabled := True; ShowSessions1.Enabled := True; TermToolButton.Enabled := True; ShutdownServer.Enabled := True; The form shows and all needed menus and contorl is visible and enabled, but when I push the ShowSessions1 menu item, the form and the app is hangs. I used debugger and found that the CP form hangs here: U[I].LockSession (331 line of uniGUIServerCP mofule). Quote Link to comment Share on other sites More sharing options...
Tokay Posted May 16, 2021 Author Share Posted May 16, 2021 UP Quote Link to comment Share on other sites More sharing options...
Tokay Posted September 20, 2021 Author Share Posted September 20, 2021 Up Quote Link to comment Share on other sites More sharing options...
Tokay Posted June 22, 2022 Author Share Posted June 22, 2022 Finally I've found solution. There is no needed to lock main session. It's already locked. I've added such condition and all's works fine: if U[I] <> UniSession then U[I].LockSession; And same for unlocking. Also I've found better code for the server stopping: procedure TServerControlPanelForm.ShutdownServerClick(Sender: TObject); var U : TUniGUIServerModule; begin Close; U := UniServerInstance; if Assigned(U) then U.Terminated := True; end; I've found it in the opened sources. Thank you! Source code is very useful. 1 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.