Jump to content

All Activity

This stream auto-updates

  1. Past hour
  2. That would be wonderful, if you find a solution
  3. Today
  4. Try this approach for now: procedure TMainForm.UniButton1Click(Sender: TObject); begin if Menu <> nil then JSInterface.JSCall('down("toolbar").hide', []) //show end;
  5. Ok. It's possible I think. Need to analyze.
  6. I need to hide the entire MainMenu. MainForm.Menu :=nil // not working.
  7. UnimImage, yes. Maybe delete the picture from the database or something like this!
  8. Hello, Do you want to show and hide as needed?
  9. this one fixed. i add 4 tag to my Style.Css .PdfToSignImg{ right : 0px !important; top : 0px !important; width: 100% !important; height: 100% !important; } .PdfToSignImgWidth img{ right : 0px !important; top : 0px !important; width: 100% !important; height: auto !important; } .PdfToSignImgHeight img{ right : 0px !important; top : 0px !important; width: auto !important; height: 100% !important; } .PdfToSignImgOriginal img{ right : 0px !important; top : 0px !important; width: auto !important; height: auto !important; } on design time i set A2 to PdfToSignImg css tag. on first load - i "click" on the SetWidthButton. i add procedure to remove all css tag from the IMG element. procedure TProjectsFrm.RemoveAllCssFromSignImg; begin PdfToSignImg.JSInterface.JSCall('removeCls', ['PdfToSignImgWidth']); PdfToSignImg.JSInterface.JSCall('removeCls', ['PdfToSignImgHeight']); PdfToSignImg.JSInterface.JSCall('removeCls', ['PdfToSignImgOriginal']); end; when the user click on one of the button i act as : procedure TProjectsFrm.sbImgOriginalClick(Sender: TObject); begin RemoveAllCssFromSignImg; PdfToSignImg.JSInterface.JSCall('addCls', ['PdfToSignImgOriginal']); end; procedure TProjectsFrm.sbImgPageHeightClick(Sender: TObject); begin RemoveAllCssFromSignImg; PdfToSignImg.JSInterface.JSCall('addCls', ['PdfToSignImgHeight']); end; procedure TProjectsFrm.sbImgPageWidthClick(Sender: TObject); begin RemoveAllCssFromSignImg; PdfToSignImg.JSInterface.JSCall('addCls', ['PdfToSignImgWidth']); end; that work fine.
  10. This version correctly identifies the version of Windows on the server side. But the client side shows wrongly for the Windows server version. For better test you can run this sample. I run this code in windows 11 (http://localhost:8077/) . and when I call it in windows 10 ( another client in address http://192.168.25.1:8077/) , it shows windows 11 again ! you can find 2 test movie in HELP folder Win_ver11_simple11_030324.zip
  11. Approx. I had a mess of packages. After cleaning, the installation started correctly.
  12. Thanks. I find a solutions, add below code: LrestRequest.SynchronizedEvents:= False;
  13. HI Masteritec, i use in UniGui: procedure TMainForm.UniFormCreate( Sender : TObject ); var cookie1, cookie2 : String; anwendung : String; farbe_from, farbe_to : String; // ----------- ergebnis : String; LJsonObj : TJSONObject; LJsonValue : TJSONValue; // ------- ini : TIniFile; FileName : String; state : string; CallBackFrom, AuthCode, token : string; http : TNetHTTPClient; IdHTTP : TIdHTTP; IdSSLIOHandlerSocketOpenSSL : TIdSSLIOHandlerSocketOpenSSL; Params : TStringList; Lresponse : IHTTPresponse; oauth_token, oauth_verifier, OAuth_secret, aMsg : string; function GetSimpleValue( Jstring, Key : string ) : string; var jv, fv : TJSONValue; begin Result := ''; jv := TJSONObject.ParseJSONValue( Jstring ); fv := jv.FindValue( Key ); if fv <> nil then Result := fv.ToString; end; begin UniPageControl1.ActivePage := UniTabSheet1; FormatSettings.CurrencyFormat := 3; FormatSettings.NegCurrFormat := 8; FormatSettings.ThousandSeparator := '.'; FormatSettings.DecimalSeparator := ','; FormatSettings.CurrencyDecimals := 2; FormatSettings.DateSeparator := '.'; FormatSettings.ShortDateFormat := 'dd.MM.yyyy'; FormatSettings.LongDateFormat := 'dddd, d. MMMM yyyy'; FormatSettings.TimeSeparator := ':'; FormatSettings.TimeAMString := ''; FormatSettings.TimePMString := ''; FormatSettings.ShortTimeFormat := 'hh:mm'; FormatSettings.LongTimeFormat := 'hh:mm:ss'; // zusatz Start UniMainModule.AUserName := ''; FileName := UniServerModule.StartPath + 'sso_oauth2.ini'; ini := TIniFile.Create( FileName ); try UniMainModule.C_client_id_Az := ini.ReadString( 'oauth2', 'C_client_id_Az', '' ); UniMainModule.C_redirect_uri_Az := ini.ReadString( 'oauth2', 'C_redirect_uri_Az', '' ); UniMainModule.C_tenant_Az := ini.ReadString( 'oauth2', 'C_tenant_Az', '' ); UniMainModule.C_State_Az := ini.ReadString( 'oauth2', 'C_State_Az', '' ); UniMainModule.C_scope_Az := ini.ReadString( 'oauth2', 'C_scope_Az', '' ); UniMainModule.C_client_secret_Az := ini.ReadString( 'oauth2', 'C_client_secret_Az', '' ); finally ini.Free; end; CallBackFrom := uniGUIApplication.UniApplication.parameters.Values[ 'oauth2callback' ]; if CallBackFrom = '' then Exit; UniMainModule.AzureState := '123456'; UniSession.Log( 'Mainmodule beforeLogin.Params:' + uniGUIApplication.UniApplication.parameters.text ); UniMainModule.AzureAuthCode := uniGUIApplication.UniApplication.parameters.Values[ 'code' ]; state := uniGUIApplication.UniApplication.parameters.Values[ 'state' ]; CallBackFrom := uniGUIApplication.UniApplication.parameters.Values[ 'oauth2callback' ]; UniSession.Log( 'Mainmodule beforeLogin.Params:' + UniMainModule.AzureState ); // ---------------- UniSession.Log( 'Parameter für https://login.microsoftonline.com/organizations/oauth2/v2.0/token...' ); UniSession.Log( 'code=' + UniMainModule.AzureAuthCode ); UniSession.Log( 'client_id=' + UniMainModule.C_client_id_Az ); UniSession.Log( 'client_secret=' + UniMainModule.C_client_secret_Az ); UniSession.Log( 'scope=' + UniMainModule.C_scope_Az ); UniSession.Log( 'redirect_uri=' + UniMainModule.C_redirect_uri_Az ); UniSession.Log( 'grant_type=authorization_code' ); // ---------------- // This is for Azure token := ''; if ( CallBackFrom = 'azure' ) then begin // yes call from azure, so get access token try try UniSession.Log( ' --> Got Code - see if we can get an token...' ); Params := TStringList.Create; Params.add( 'code=' + UniMainModule.AzureAuthCode ); Params.add( 'client_id=' + UniMainModule.C_client_id_Az ); Params.add( 'client_secret=' + UniMainModule.C_client_secret_Az ); Params.add( 'scope=' + UniMainModule.C_scope_Az ); Params.add( 'redirect_uri=' + UniMainModule.C_redirect_uri_Az ); Params.add( 'grant_type=authorization_code' ); http := TNetHTTPClient.Create( Self ); http.SecureProtocols := [ THTTPSecureProtocol.SSL3, THTTPSecureProtocol.TLS1, THTTPSecureProtocol.TLS11, THTTPSecureProtocol.TLS12, THTTPSecureProtocol.TLS13 ]; Lresponse := http.post( 'https://login.microsoftonline.com/organizations/oauth2/v2.0/token', Params ); if Lresponse.StatusText <> 'xOK' then begin login_label.Caption := '......Azure Sign in'; token := GetSimpleValue( Lresponse.ContentAsString, 'access_token' ); UniMainModule.GToken := stringreplace( token, '"', '', [ rfreplaceall ] );; UniSession.Log( Lresponse.ContentAsString ); aMsg := Lresponse.ContentAsString; Lresponse := http.get( 'https://graph.microsoft.com/v1.0/me', nil, [ TNetHeader.Create( 'Authorization', 'Bearer ' + UniMainModule.GToken ) ] ); if stringreplace( GetSimpleValue( Lresponse.ContentAsString, 'mail' ), '"', '', [ rfreplaceall ] ) <> '' then begin UniSession.Log( Lresponse.ContentAsString ); UniMainModule.AUserName := stringreplace( GetSimpleValue( Lresponse.ContentAsString, 'mail' ), '"', '', [ rfreplaceall ] ); UniMainModule.LoginType := 2; login_label.Caption := '......Azure Sign in for user' + #13 + UniMainModule.AUserName; end; end; if token <> '' then begin UniSession.Log( 'Habe Token erhalten: ' + token ); end; Except on E : exception do begin UniMainModule.LoginType := 0; UniSession.Log( 'LAST ERROR: ' + SysErrorMessage( GetLastError ) ); UniSession.Log( 'MESSAGE ERROR: ' + E.Message ); end; end; finally http.Free; Params.Free; end; end; // -------------------- end; Login procedure TMainForm.UniButton1Click( Sender : TObject ); var LURL : String; begin if ( UniMainModule.AUserName <> '' ) AND ( UniMainModule.AUserName <> 'null' ) then begin Azure_login; end else begin sleep(1000); LURL := 'https://login.microsoftonline.com/' + UniMainModule.C_tenant_Az + '/oauth2/v2.0/authorize'; LURL := LURL + '?response_type=' + URIEncode( 'code' ); LURL := LURL + '&client_id=' + URIEncode( UniMainModule.C_client_id_Az ); LURL := LURL + '&redirect_uri=' + URIEncode( UniMainModule.C_redirect_uri_Az ); LURL := LURL + '&response_mode=' + URIEncode( 'query' ); LURL := LURL + '&scope=' + UniMainModule.C_scope_Az; LURL := LURL + '&state=' + URIEncode( UniMainModule.C_State_Az ); UniSession.UrlRedirect( LURL ); end; end; Logout procedure TMainForm.UniButton3Click( Sender : TObject ); var url : String; begin url := 'https://login.microsoftonline.com/organization/oauth2/logout'; UniSession.UrlRedirect( url ); end;
  14. Thank you, the display problem has been solved to some extent. Now another problem has arisen. When I Browse the with the For to separate the ticked nodes, we don't notice that they are ticked.
  15. Hi Sherzod, Any news about this?
  16. Thanks for reporting. Fix applied.
  17. MasterWebAccountingV8.dll: 00000E64: 10:21:49 []:>--------------------------------------------------------------< MasterWebAccountingV8.dll: 00000E64: 10:21:49 []:Starting Server. Module Handle: 0000000000400000 MasterWebAccountingV8.dll: 00000E64: 10:21:49 []:Server Started. Module Handle: 0000000000400000 MasterWebAccountingV8.dll: 000014A8: 10:24:10 []:Terminating ISAPI Server. Module Handle: 0000000000400000 MasterWebAccountingV8.dll: 000014A8: 10:24:10 []:ISAPI Server Terminated. Module Handle: 0000000000400000 MasterWebAccountingV8.dll: 000014A8: 10:24:10 []:<--------------------------------------------------------------> attached file is from C:\inetpub\logs\LogFiles\W3SVC1 u_ex240613.log
  18. The following code in pas unit runs fine in windows service but not in IIS+ISAPI DLL, any solution: LrestClient:= TRESTClient.Create(LstrURL); try LrestRequest:= TRESTRequest.Create(nil); try LrestResponce:= TRESTResponse.Create(nil); try LrestRequest.Client:= LrestClient; LrestRequest.Response:= LrestResponce; LrestRequest.Method:= rmPOST; LrestRequest.AssignedValues:= [REST.Client.TRESTRequest.TAssignedValue.rvConnectTimeout, REST.Client.TRESTRequest.TAssignedValue.rvReadTimeout]; LrestRequest.ReadTimeout:= cstTimeOut; LrestRequest.Params.Clear; LrestRequest.AddParameter('Content-Type', 'application/x-www-form-urlencoded', pkGETorPOST); LrestRequest.AddParameter('client_id', LstrClientID, pkGETorPOST); LrestRequest.AddParameter('client_secret', LstrClientSecret1, pkGETorPOST); LrestRequest.AddParameter('grant_type', 'client_credentials', pkGETorPOST); LrestRequest.AddParameter('scope', 'InvoicingAPI', pkGETorPOST); LrestRequest.Execute; finally LrestResponce.Free; end; finally LrestRequest.Free end; finally LrestClient.Free; end;
  19. Yesterday
  20. Hi. I've never had any problems installing UniGui. Today I renewed my license. I have versions uniGUI_Complete_Professional_1.95.0.1583. Delphi 10.4 Proff and I get an error while building.
  21. Serg

    Read Clipboard

    Спасибо
  22. Sherzod

    Read Clipboard

    Добрый вечер! Ваш сайт должен быть доступен по HTTPS, также рекомендуется использовать промисы.
  1. Load more activity
×
×
  • Create New...