Jump to content

zhyhero

uniGUI Subscriber
  • Posts

    131
  • Joined

  • Last visited

  • Days Won

    5

Posts posted by zhyhero

  1. Server side:

    You can put your create code in ServerModule's OnBeforeInit,OnCreate or OnServerStartup event section ,and destroy code in OnDestroy event section.

    Client side:

    Set  your UniWebSocket.Url property ='ws://localhost:port/whatever'.

    btw:

    mORMot1  example 31 include a 'Project31SimpleEchoServer.html' file , try to read Project31WinHTTPEchoServer.dpr to understand how to use this file. 

  2. unimap_websocket.thumb.gif.2324f087bbadaf5b0924737607729a2e.gifTUniMap.png.fcb58eff0a92c46140cc27aa581673cb.png

    I think you can setup a custom MapLayer , and use custom img as base background map;

    procedure TMainForm.UniMapMapLayers0CustomLayerUrl(Sender: TObject; var TileLayerUrl: string);
    begin
      TileLayerUrl := '/files/clear.png'; //custom  image
    end;

    Then darw you vectors and markers by code.

     

    About compass and direction ? I dont know now.

     

  3. For now ,I  add code to unimap.pas

    640  JSCallGlobal('L.map', [FMapJSName,
    641                           JSObject([
                                  'crs',JSStatement('L.CRS.Simple'), // config crs to simple for x,y mode
    642                              'center', JSArray([DefaultLat, DefaultLong]),
    643                             'zoom', DefaultZoom,
    644                              'id', -1,
    645                              'InternalId', NextInternalID,
    646                             'layers', JSArray([JSStatement(JSName+'uniLayer0')])
    647                            ])
    648                        ], FMapJSName);

     

    Any other way ?

  4. I Create a Service Project , find a strange thing.

    I set Displayname="UniGuiServiceDemo".

    UniGuiService@Delphi_ObjectInspector.png.e20740afd34522aacd00e8ea0bffe23d.png

    then i run cmd "myservice.exe -install "

    I check this service in Control Panel,Services 

    UniGuiService@ControlPanel_Service@Win10.thumb.png.03fe9c137e49a94d78fdc2e55c1bdc5b.png

    Service Name is "UniGuiServiceDemo"

    I Check this service at TaskManager,Services

    UniGuiService@TaskManager@Win10.png.d7aaae6b2c11b2750332b529fef7b4d0.png

    Service Name is "UniServiceModule",and Service Discription is "UniGuiServiceDemo".

    OS is Windows 10 64bit.

    so, how to fix this .....

  5. Update.

    After a lot of testing, I found   property "Column.Flex"   looks  like  the key point.

    In my case ,when set  Column.Flex:=1 ,dbgrid loading time extended to 5xxx ms , when leave Column.Flex:=0 ,it is 5xx ms.

     

    btw: In my case. there are 9 dbgrids and 10+ datasources and datasets.

    9 grids have 50+ columns. 10+ datasets have 70+ fields.   

     

  6. My application were use some free  datamodules as public data and method store.

    And these modules are belong to MainModule as a public member.

    For example ,the PublicLogin used to do login things,like check username and password,record current login user info.

    So,   LoginForm->MainForm->SomeBusinessFrame  is the workingflow.

    But,  loading time of the BusinessFrame's DBGrid had some problem.

    Use LoginForm or not ,it had diffrent DBGrid loading time.

    Here is CodeSiteLogging 's Log.

    LoadingTime.thumb.png.a4e3ea8e2e3266a94c1b4ececbe5eefd.png

    The left logs  use a LoginForm (unit) , call "PublicLogin.Login()" and "ModalResult:=mrOk"  to  MainForm.   DBGrid's Loading Time are 5xxx ms.

    The right logs  remove LoginForm (unit) and call "PublicLogin.Login()" method in MainForm.FormShow event.  DBGrid's Loading Time are 5xx ms.

    This is so strange .

    Please give some advice to me.

      

×
×
  • Create New...