Jump to content


uniGUI Subscriber
  • Posts

  • Joined

  • Last visited

  • Days Won


Everything posted by irigsoft

  1. irigsoft

    Using TLS 1.3

    If you succeed, please write here the result:
  2. irigsoft

    Using TLS 1.3

    Hello, is this can help to You ? https://itecnote.com/tecnote/delphi-upgrade-indy-library-to-use-latest-openssl-library/ "So don't worry about it. If you use Indy with a proper Cypher Names list and latest Fulgan DLLs, you are pretty up-to-date and safe. Sometimes safer than some old Linux distribution, which may lag behind with the revision shipped with the system. Even TLS 1.3 is still far from being mandatory, since it is not yet enabled on client sides. I am sure Indy team will support 1.1 when some of its features becomes mandatory (or switch to Windows SChannel API)." and how to use cypher name list in unigui:
  3. Hello, try to search to forum:
  4. Something strange. If I use two phones with Android 10 then all problems exist. when I use my Tablet with Android 5, and other tablet with Android 6, in local network (or internet) then all is OK. when I use Tablet with Android 9 then TerminateOnBrowserClose is not OK, but ServerLimits = srOnePerIP is OK
  5. Hello, I use unigui Professional and configure: 1. servermodule.serverlimits.SessionRestrict = srOnePerIP ;. I set this in UniGUIServerModuleBeforeInit 2. uniMainModule.TerminateOnBrowserClose = True; 3. In MainForm I have uniTimer.Enable: = True, ChainMode: = True; When I use a desktop browser (Chrome) and close the browser tab, the session is closed - OK, but my problem is: problems with TerminateonBrowserClose; 1. when using the mobile browser chrome and closing the tab the session is not stopped (no matter how long I wait) 2. when you use mobile web view (with android app) and close the app, the session does not stop problems with server limitations 1. when I open a session through a mobile browser, close it and open it again (without changing the IP) - the previous session does not stop 2. when I open a session via web view (android application), close the application and open it again (without changing the IP) - the previous session is not stopped Is this a bug in the version (1526 - 1537) or did I not set something up correctly? This is important to me because I release a lot of components when closing a session, and if the session doesn't close my standalone application crashes after a few days On user login I have procedure that execute this, but is not work too : var I : Integer; U : TUniGUISession; begin Try UniServerModule.SessionManager.Sessions.Lock; for I :=UniServerModule.SessionManager.Sessions.SessionList.Count - 1 downto 0 do begin TRy U := UniServerModule.SessionManager.Sessions.SessionList[I]; // Check mainModule availability. Some sessions may not have a MainModule instance if U.UniMainModule <> nil then begin // Do not close my OWN Session if (UniApplication.UniSession.SessionID <> U.SessionId) AND ((U.UniMainModule as TUniMainModule).sUserName = sesionUser) then begin TRY //U.LockSession; //U.ReleaseSession; U.Terminate (uniServerModule.urlMessage); FINALLY //U.UnBusy; END; end; //close all session with this IP if ServerLimits.SessionRestrict = srOnePerIP then begin if (UniApplication.UniSession.SessionID <> U.SessionId) AND ((U.UniMainModule as TUniMainModule).RemoteAddress = uniMainModule.sessionIP) then begin TRY //U.LockSession; //U.ReleaseSession; U.Terminate (uniServerModule.urlMessage); FINALLY //U.UnBusy; END; end; end;//srOnePerIP end;//If U Except on E:Exception do begin UniServerModule.SaveHTMLLog ('Close session ERR: ' + e.message); end; End; end;//for I Finally UniServerModule.SessionManager.Sessions.Unlock; End;
  6. Hello, did You use unigui hyperserver ? http://www.unigui.com/doc/online_help/hyperserver.htm
  7. Hello, try to set response header in TUniServerModule.UniGUIServerModuleHTTPCommand AResponseInfo.CustomHeaders.AddValue('content-type', 'application/msword'); or AResponseInfo.ContentType := 'application/msword';
  8. Hello again. I have a new question. Does it matter that in the form I have 20-30 invisible components, for the refresh rate of the grid, let's keep in mind that only the grid is visible? Components are uniPanels with controls.
  9. Or can we, and how to apply this:
  10. Hello, I have new information: I added log into file to my functions to see how time each function is consumed. Result: This result shows me that the function (execute query, and recreate columns) takes 500 ms to perform, the whole time from the beginning to the end of BtnClick takes 594 ms, but the whole time from clicking to hiding the mask takes 3 seconds, this time (from 3 seconds) is different if I have 5 or 15 lines in the grid (on DBGrid.PageSize= 25), but the time is between 2.5 - 3 seconds this is the data that is displayed by the DBGrid when the rendering ends (the first column is an action column): it makes me think that something in rendering slows everything down.
  11. Hello, I am sorry I can't create test example, but I will explain my configuration: 1. I use MS SQL 2008 as Database 2. use TAdoQuery, and uniDBGrid 3. before execute Query (To ignore refreshing i set DBGrid.Visible := False) I clear sql.Text, clear Columns, create new colums (from Stringlist with settings), 4. create action columns with Columns.Insert (0); here is code for point 3: 1. Clear Close AdoQuery if TuniDBGrid (SelDBGrid).DataSource.DataSet <> nil then begin TuniDBGrid (SelDBGrid).DataSource.DataSet.Close; //TuniDBGrid (SelDBGrid). // UniSession.JSCode(SelDBGrid.JSName + '.view.refresh();'); end; 2. Close SQl and Clear columns TAdoQuery (SelDBGrid.DataSource.DataSet).Close; TuniDBGrid (SelDBGrid).SuspendColumnsChanged := True; UniSession.JSCode(SelDBGrid.JSName + '.store.suspendEvents();'); TuniDBGrid (SelDBGrid).Columns.Clear; IF TuniDBGrid (SelDBGrid).Columns <> nil then begin TuniDBGrid (SelDBGrid).Columns.BeginUpdate; TuniDBGrid (SelDBGrid).SuspendColumnsChanged := True; if TuniDBGrid (SelDBGrid).DataSource.DataSet <> nil then begin TRY //TuniDBGrid (SelDBGrid).DataSource.DataSet.Close; //TuniDBGrid (SelDBGrid).DataSource.DataSet.DisableControls; //if CreateGrid then begin TempQuery := TAdoQuery (TuniDBGrid (SelDBGrid).DataSource.DataSet); TempQuery.Close; TempQuery.SQL.Clear; TuniDBGrid (SelDBGrid).DataSource.DataSet := nil; for I := TuniDBGrid (SelDBGrid).Columns.Count - 1 downto 0 do begin TuniDBGrid (SelDBGrid).Columns.Items[I].Destroy; end; TuniDBGrid (SelDBGrid).Columns.Clear; EXCEPT END; //UniSession.JSCode(SelDBGrid.JSName + '.view.refresh();'); TuniDBGrid (SelDBGrid).DataSource.DataSet := TempQuery; TempQuery := nil; //TuniDBGrid (SelDBGrid).DataSource.DataSet.EnableControls; end; TuniDBGrid (SelDBGrid).SuspendColumnsChanged := False; TuniDBGrid (SelDBGrid).Columns.EndUpdate; end; 3. create new columns //TuniDBGrid (SelDBGrid).SuspendColumnsChanged := True; TuniDBGrid (SelDBGrid).Columns.BeginUpdate; for I := 0 to FieldsList.Count - 1 do begin TRY FieldsData.DelimitedText := FieldsList.ValueFromIndex [I]; //SelDBGrid.Columns.Add; MyColumn := TuniDBGrid (SelDBGrid).Columns.Add; MyColumn.Font.Size := uniMainModule.ControlsFontSize; MyColumn.Title.Font.Size := uniMainModule.ControlsFontSize; MyColumn.Title.Alignment := taCenter; MyColumn.Title.Caption := FieldsData [0]; MyColumn.Sortable := True; MyColumn.ReadOnly := True; MyColumn.ShowSummary := True; MyColumn.Width := 0; MyColumn.Flex := 0; MyColumn.ShowToolTipAlways := False; //MyColumn.CheckBoxField.Enabled := False; //MyColumn.Locked := True; //MyColumn.DisplayMemo IF FieldsData.Count > 1 then begin if StrToInt (FieldsData [1]) > -1 then begin MyColumn.Width := StrToInt (FieldsData [1]); end else begin MyColumn.Visible := False; //SelDBGrid.JSInterface.JSCall('hide', [SelDBGrid.Columns[MyColumn.Index].Visible], SelDBGrid.Columns[MyColumn.Index].JSColumn); SelDBGrid.JSInterface.JSCall('show', [MyColumn.Visible], SelDBGrid.Columns[MyColumn.Index].JSColumn); //MyColumn.Menu.MenuEnabled := False; MyColumn.Menu.ColumnHideable := False; MyColumn.Width := StrToInt (FieldsData [1]); //SelDBGrid.JSInterface.JSCall ('setVisible', [false], SelDBGrid.Columns [MyColumn.Index].JSColumn); end; end; MyColumn.FieldName := TRIM (FieldsList.Names [I]); //MyColumn.Hint := FieldsData [2]; //MyColumn.Wrap := True; //SelDBGrid.Columns.Items [SelDBGrid.Columns.Count - 1].Assign (MyColumn); EXCEPT on e:exception do begin end; END; TuniDBGrid (SelDBGrid).Columns.EndUpdate; TuniDBGrid (SelDBGrid).SuspendColumnsChanged := False; end;//for I 4. Add ActionColumn ActionColumnList := TStringList.Create; ActionColumnList.StrictDelimiter := True; ActionColumnList.Delimiter := ','; ActionColumnList.DelimitedText := TRIM (sActionColumnLeft); if ActionColumnList.Count > 0 then begin ImagesExist := False; if SelDBGrid.Images <> nil then begin ImagesExist := True; If FindComponentEx (SelDBGrid.Images.Name) <> nil then begin GridImageList := TuniImageLIst (SelDBGrid.Images); TuniImageLIst (SelDBGrid.Images).Clear; TuniImageLIst (SelDBGrid.Images).Height := 32; TuniImageLIst (SelDBGrid.Images).Width := 32; end; end else begin TRY GridImageList := TuniImageList (FindComponentEx ('ImageList_'+ SelDBGrid.Name)); if (not Assigned (GridImageList)) Or (GridImageList = nil) then begin GridImageList := TuniImageList.Create (UniSession.FormsList [UniSession.FormsList.Count -1]);//uniMainModule); GridImageList.Name := 'ImageList_'+ SelDBGrid.Name; GridImageList.UseGlobalCache := True; end; GridImageList.Clear; GridImageList.Height := 32; GridImageList.Width := 32; SelDBGrid.Images := GridImageList; EXCEPT on E:Exception do begin end; END; end;//else //MyColumn := SelDBGrid.Columns.Add;//TColumn.Create(SelDBGrid.Columns); TuniDBGrid (SelDBGrid).Columns.BeginUpdate; for I := ActionColumnList.Count - 1 downto 0 do begin sBtn := TuniBitBtn (FindComponentEx (ActionColumnList [I])); if Assigned (sBtn) then begin SelDBGrid.Columns.Insert (0);//TColumn.Create(SelDBGrid.Columns); SelDBGrid.Columns [0].Title.Alignment := taCenter; SelDBGrid.Columns [0].Title.Caption := ''; //SelDBGrid.Columns [0].Width := GridImageList.Width; //If iActionColumnWidth > 0 then SelDBGrid.Columns [0].Width := iActionColumnWidth; //SelDBGrid.Columns [0].Width := ActionColumnList.Count * SelDBGrid.Columns [0].Width; SelDBGrid.Columns [0].Alignment := taCenter; SelDBGrid.Columns [0].ActionColumn.Create; SelDBGrid.Columns [0].ActionColumn.Enabled := True; Try BtnCol := TuniCustomButtonItem (SelDBGrid.Columns [0].ActionColumn.Buttons.Add); //BtnCol.ScreenMask.Enabled := True; //BtnCol.Width := ROUND (SelDBGrid.Columns [0].Width div ActionColumnList.Count); //BtnCol.ScreenMask.Enabled := True; //sBtn := TuniBitBtn (FindComponentEx (ActionColumnList [I])); //if Assigned (sBtn) then begin //BtnCol.ImageIndex := SelDBGrid.Columns [0].Title.Caption := TuniControl (sBtn).Caption; //BtnCol.DisplayName := ActionColumnList [I]; BtnCol.UI := 'ActionBtn_' + ActionColumnList [I]; BtnCol.Hint := sBtn.Hint; BtnCol.Caption := sBtn.Caption; SelDBGrid.Columns [0].ActionColumn.Buttons[BtnCol.ButtonId].Width := iActionColumnWidth; if Assigned (TuniBitBtn (sBtn).Glyph) then begin try msBinImgStream := TMemoryStream.Create; Bmp := TBitMap.Create; TuniBitBtn (sBtn).Glyph.SaveToStream (msBinImgStream); Bmp.Canvas.Lock; msBinImgStream.Position := 0; if msBinImgStream.Size > 0 then begin Bmp.LoadFromStream(msBinImgStream); if (msBinImgStream.Size > 0) AND (msBinImgStream.Size <= TRUNC (20*1024*1024)) then Bmp := ResizeBmp(Bmp,GridImageList.Height,GridImageList.Width); //if not ImagesExist then //GridImageList.Add (Bmp,nil); BtnCol.ImageIndex := GridImageList.Add (Bmp,nil); //BtnCol.IconAlign := TuniBitBtn (sBtn).IconAlign; end; Bmp.Canvas.UnLock; msBinImgStream.Size := 0; msBinImgStream.Free; Bmp.Free; except on E:Exception do begin end; end; //BtnCol.ScreenMask.Enabled := True; //SelDBGrid.OnColumnActionClick //Columns [0].ActionColumn.Buttons.ButtonClick := ActionBtnClick; //SelDBGrid.Columns [0].ActionColumn.Buttons.ButtonClick := ActionColumnButtonClick; BtnCol := nil; end;//IF Assigend //end; except //on E:Exception do Showmessage (e.Message); End; end;//If end;//for TuniDBGrid (SelDBGrid).Columns.EndUpdate; //SelDBGrid.Images := GridImageList; end;//if (ActionColumnList.Count > 0) ActionColumnList.Clear; ActionColumnList.Free; TuniDBGrid (SelDBGrid).SuspendColumnsChanged := False;
  12. I make this steps, and found something strange: 1. I execute some request in dbgrid 2. close the request, clear sql.text 3. change sql.text and run again , after point 3 dbgrid first shows the old result and then shows the new result. The problem I see is that after point 2 dbgrid does not refresh the result, it just shows the old result. it may take time to refresh ?
  13. @Hayri ASLAN, I use uniDbgrid.Align: = alClient does this matter for rendering?
  14. no, but I have my own OnDrawColumnCell, and OnCellClick If I "comment" on everything in OnDrawColumnCell, nothing changes I use DBGrid.ScreenMask.Enabled := True !
  15. Hello, I don't use mobile components, but I work on mobile devices. I use unigui Professional 1537, (but this problem also exists in version 1526). my problem is: 1. I create the columns in DBgrid at runtime, each reload of the query to DBGrid recreates the columns. 2. On a mobile device, to show the result (running AdoQuery + creating all columns (visible and invisible) + creating a summary), I use a device with 2 GB of RAM, Android and mobile Chrome 3. To optimize rendering, I use DisableControls, SuspendLayouts, SuspendColumnsChanged when creating columns and running Query, 4. I limited the page size to 25, DBGrid is Paged and the result in Query is limited to the page size in the results. 5. In grid I have column with image, and other column with action button. Image size is 32 from ImageList. When image is missing work better, maybe image optimization I need ? 5. The server has 3GHz, 4GB RAM, Win10, SSD, Windows Defender is Active 6. My application in production is protected by Virtualization and Mutation. When I use it none protected speed is with 1 second faster. 7. Unigui Application is StandAlone 8. I can't use javascript XTemplates The time to display all lines is 2-3 seconds, I will ask for assistance in speeding up this visualization with some javascript commands. Thanks in advance !
  16. So, here another link : https://groups.google.com/g/zxing/c/gs7rTsrFIyI i think on forum have topics how to use zxing with unigui: http://forums.unigui.com/index.php?/search/&q=zxing&quick=1 or this: https://github.com/gs1/interpretGS1scan
  17. You need to use a barcode scanner that can read gs1 barcodes, when you read the barcode in the hexadecimal text tool, you should see what symbol is used to divide between sections and then build your logic. All the documentation I found says that the sections must be separated by a special symbol, this symbol being determined by the barcode generator. It is explained that "GS" is most often used, but it cannot be used when printing "QR code". I have not found out which symbol can be used by default, but it became clear that when printing in "QR code" is used different from the standard symbol. Maybe it's a good idea to ask the country that generates the barcode
  18. @bahry, can You try to read data from barcode reader in this online tool : https://www.online-toolz.com/tools/text-hex-convertor.php this will convert read ASCII to hex, check if there some extra symbols.
  19. @bahry, is this will help ? https://www.barcodefaq.com/2d/qr-code/aim-gs1-fnc1/ or: http://www.java4less.com/gs1_barcodes/gs1barcodes.php?info=gs1_datamatrix or: https://stackoverflow.com/questions/58232914/how-to-parse-gs1-barcode-with-group-separator maybe this will help: https://stackoverflow.com/questions/48296955/ascii-control-character-html-input-text
  20. Hello, logic is usage of GS separator between data. and this is simple Code128 with specific data separator. Can You post some image of real GS1 barcode I want to scan and check what char use Your vendor as separator .
  21. Do You have some real gs1 barcode from third party? Can You send me here some readed data like text and like image (picture)? The GS1 barcode must transmit an invisible separator (FNC1 / FNC2 / FNC3), here it is explained which separator is used by default (GS - Group Separator) - https://diarium.usal.es/pmgallardo/2019/09/13/difference-between-fnc1-and-gs-field-delimiters/ or here with examples for separators: https://support.honeywellaidc.com/servlet/fileField?entityId=ka02K000000ceKRQAY&field=File_3__Body__s ANSII table: https://theasciicode.com.ar/ascii-control-characters/group-separator-ascii-code-29.html
  • Create New...