Jump to content

Semper

Members
  • Posts

    120
  • Joined

  • Last visited

  • Days Won

    9

Posts posted by Semper

  1. Try modify this code


    var i : Integer;

        ASessionList: TList;
        ASession : TUniGUISession;
        s: string;
        iActiveSession: Integer;
    begin
        lstSessions.Clear;
        ASessionList:=UniServerModule.SessionManager.Sessions.SessionList.LockList;
        try
           for i := 0 to ASessionList.Count-1 do begin
              ASession := TUniGUISession(ASessionList);
              if not ASession.IsTerminated then begin
                   s:=TUniGUISession(ASessionList).UniApplication.UniSession.SessionID+' ('+
                      TUniGUISession(ASessionList).UniApplication.RemoteAddress+
                      ', browser '+TUniGUISession(ASessionList).UniApplication.ClientInfoRec.BrowserType+
                      TUniGUISession(ASessionList).UniApplication.ClientInfoRec.BrowserVersion.ToString+')' ;
                   if Pos(UniSession.SessionID,s)<>0 then begin
                      s:='<b>'+s+' - Current session!</b>';
                      iActiveSession:=i;
                   end;
                   s:='<img src="images/domain_template.png" align="left"/> <p style="font-size:11px"/>'+s;
                   lstSessions.Items.Add(s);
              end;
           end;
           lstSessions.ItemIndex:=iActiveSession;
           btnSessionClose.Enabled:=False;
           if lstSessions.Items.Count=1 then btnCloseAllSessions.Enabled:=False
           else btnCloseAllSessions.Enabled:=True;
        finally
           UniServerModule.SessionManager.Sessions.SessionList.UnlockList;
        end;

     

    This code from my project, untreated. So my apologies

     

    • Upvote 1
  2. Delphi xe2

    Build 0.96.1065

    Win 8

     

    Криво работает, пробовали на последнем билде??

    Первый раз кликаю на иконку в UniFormAjaxEvent падаю внутрь события, все нормально.

    При повторном клике уже не проваливаюсь!!! и через некоторое время отвал сессии.

    Не, на последнем билде еще не пробовал.

    Спс за информацию

  3. Hi!

     

    I use

    Delphi XE4 

    Ext 4.2

    last UniGui comps

     

     

    and I have problem with compiling project in part:

     

     Name := StringReplace(Form.WebForm.JSWindow.Id,'_id','',[rfReplaceAll] +[rfIgnoreCase]);
         Form.Script.Add(Name +'.on('+#39+'minimize'+#39+',function(w){w.toggleCollapse();w.setVisible(!w.isVisible());});');
     

    I got error

     

    'TUniJSForm' doest not contain a member named 'ExtWindow'

     

    How I can fix it to compile project?

    Hi

    Try code from http://forums.unigui.com/index.php?/topic/2909-simple-desktop/?p=16894

     

    Regards

  4. Hi,

    How change form border color dynamically? 

     

    I tried following, but not works  :( 

    UniSession.AddJS('myformname.addCls('borderred');');

    ...

    UniSession.AddJS('myformname.removeCls('borderred';);

     

    Regards

     

    This code works:

    UniSession.AddJS(WebForm.JSName + '.addCls(''borderred'');');
    ...
    UniSession.AddJS(WebForm.JSName + '.removeCls(''borderred'');');
    
    • Upvote 1
  5. Hi,

    How change form border color dynamically? 

     

    I tried following, but not works  :( 

    UniSession.AddJS('myformname.addCls('borderred');');

    ...
    UniSession.AddJS('myformname.removeCls('borderred';');

     

    Regards

×
×
  • Create New...