Jump to content

MVakili

uniGUI Subscriber
  • Posts

    171
  • Joined

  • Last visited

  • Days Won

    9

Everything posted by MVakili

  1. I think it works because 1- It downloads all required Java programs and puts them in a pack at the discretion of the programmer 2- Creates a Jason for settings and charts What I don't understand is how to connect this Jason to the SQL tables
  2. Thank you for sharing. Can these charts be used offline as well?
  3. Convert image to HTML CSS (free) https://fronty.com/ AI-Powered tool to create a website in few minutes.
  4. Yes, I have read this text that it is not possible to work offline due to Google rules But nowhere in the source, I found no reference to any site or CDN
  5. one question Can these components be used offline or does it require an internet connection?
  6. @Marlon Nardi Thank you for your explanation For security reasons, we have to use servers that are completely isolated and do not have any access to the Internet, and all files must be located on the server itself. When we talk here: 1- Other friends who may have the same problem will also find the solution 2- They also notice how responsive you are
  7. I cant Change CDN and my program stop with error try{eval("uniSyncObj.xEncode(0x06377E28);")}catch(e){alert(e.message)};O132.originalValue=undefined;_sfv_(O132,0,"94"); const {$IFDEF CDN_FALCON} CDN = 'files/falcon/'; // CDN = 'https://cdn.falconsistemas.com.br/'; CDNENABLED = True; {$ELSE} CDN = ''; CDNENABLED = False; {$ENDIF} implementation initialization if StrToFloat(Copy(StringReplace(UNI_CURRENT_EXTJS_VERSION,'.','',[rfReplaceAll]),0,3)) < 700 then UniAddCSSLibrary('https://use.fontawesome.com/releases/v5.15.4/css/all.css', True, [upoFolderUni, upoPlatformBoth]); end.
  8. MVakili

    Thread

    And as an explanation, I have to say, we used the virtual table as a powerful and highly flexible memory table in the software. I will put an example of the used functions for your review. 1- These sub-programs are used to save and retrieve virtual tables in SQL Server tables, so you can define any field of the table as a NVarChar(max) and store a virtual table in it. //--------- Wide string to TStringStream procedure TDMT.WS2Mem(S: string; Var K : TMemoryStream); var StringStream: TStringStream; begin StringStream:=TStringStream.Create(S); K:=TMemoryStream.Create; K.Position := 0; K.CopyFrom(StringStream,StringStream.Size); end; //--------- TStringStream to WideString function TDMT.Mem2WS(MemoryStream : TMemoryStream): string; var StringStream: TStringStream; begin Result:=''; StringStream:= TStringStream.Create(''); try MemoryStream.Position := 0; StringStream.CopyFrom(MemoryStream, MemoryStream.Size); Result:= StringStream.DataString; Result := Result; finally FreeAndNil(StringStream); end; end; 2- Example of using VarTable:=TVirtualTable.Create(Self); with VarTable Do Begin Close; if DMT.Mem2WS(InVarStr)<>'' then LoadFromStream(InVarStr); Else Begin AddField('Fname',ftString,20); AddField('FVal',ftWideString,20); End; Var VarStr : TMemoryStream; begin VarStr:=TMemoryStream.Create; DMT.WS2Mem(DMT.QAskAnswers.FieldByName('SavedValues').AsString,VarStr ); Try MemParams.Close; MS:=TMemoryStream.Create; WS2Mem(DMT.QAskAnswers.FieldByName('RepParameters').AsString,MS); if Mem2WS(MS) <> '' then MemParams.LoadFromStream(MS); Finally FreeAndNil(MS); MemParams.open; End;
  9. MVakili

    Thread

    Thank you for your explanation The purpose of sharing was that, in addition to novice friends having an easy start, professional friends could also check its flaws.
  10. MVakili

    Thread

    Sometimes, we want to run a store procedure in the server, which takes a lot of time, and in this case, the page even gets disconnected. To solve this problem, it is enough to create a Thread in the program and only monitor its execution Here I present the solution I created for myself and I will be happy if you help to improve it 1- create a temp table for list of process DMt.ProccessTable:='_X_'+DMt.CurrentPreName; DMt.Exec_SQLClient('If Not Object_Id('+QuotedStr(DMt.ProccessTable)+') is Null Drop Table '+DMt.ProccessTable); DMt.Exec_SQLClient(' Create Table '+DMt.ProccessTable+' ([StartDT] datetime DEFAULT (getdate()),[PName] NChar(50) ,[PID] int )'); 2- define type Type TSQLQueryThread = class(TThread) private FID: Integer; FQuery: string; FTempTable : String; FConnection: TMSConnection; protected procedure Execute; override; public constructor Create(const AID: Integer; const AQuery: string; AConnection: TMSConnection;ATempTable:String); property ID: Integer read FID; end; 2- functions for Thread procedure TSQLQueryThread.Execute; var Query: TMSQuery; begin Query := TMSQuery.Create(nil); try Query.Connection := FConnection; Query.SQL.Text := FQuery; Query.Execute; finally Query.Free; end; end; constructor TSQLQueryThread.Create(const AID: Integer; const AQuery: string; AConnection: TMSConnection;ATempTable:String); begin inherited Create(False); FID := AID; FQuery := AQuery; FConnection := AConnection; FTempTable:=ATempTable; end; procedure TDMT.TH_QueryThreadTerminated(Sender: TObject); Var FinalQ : TMSQuery; begin FinalQ := TMSQuery.Create(nil); try FinalQ.Connection := TSQLQueryThread(Sender).FConnection; FinalQ.SQL.Text := 'Delete From '+TSQLQueryThread(Sender).FTempTable+' Where PID='+TSQLQueryThread(Sender).FID.ToString; FinalQ.Execute; finally FinalQ.Free; end; end; 4-main procedure for call Procedure TDMT.TH_Execute(Titr,SQLCMD:String); var SQLQueryThread: TSQLQueryThread; begin Inc(FQueryCounter); DMt.Exec_SQLClient('Insert Into '+Dmt.ProccessTable+'(PName,PId) Values ('+QuotedStr(Titr)+','+FQueryCounter.ToString+')'); SQLQueryThread := TSQLQueryThread.Create(FQueryCounter, SQLCMD, ClientConnection,DMt.ProccessTable); SQLQueryThread.OnTerminate := TH_QueryThreadTerminated; SQLQueryThread.FreeOnTerminate := True; end; 5- Now We are ready to call it DMT.TH_Execute(' any title ','Exec ..........'); 6- You can use the following command to display the list of running processes and their duration SQL.Text:='SELECT PID,Pname, Trim(CONVERT(CHAR,DATEDIFF(mi, StartDT, GETDATE())))+'':''+CONVERT(CHAR,DATEDIFF(ss, StartDT, GETDATE())% 60) Dis FROM '+DMt.ProccessTable; and finally we have controller for our program
  11. A simple example of a Hichart. You can add powerful charts to your software with a little creativity and with the help of HTML Remember 1- To get the libraries, you need to be connected to the Internet 2- If you cannot access the Internet, it is better to buy its libraries Highcharts Example
  12. Someone asked about lable .tunilable { font-family: Arial, sans-serif; font-size: 16px; color: black; background-color: #fdfaf5; padding: 10px; border-radius: 5px; border: 1px solid #cccccc; box-shadow: 0px 0px 1px rgba(0, 0, 0, 0.7); } And Delphi code UniLabel1.Cls := 'tunilable'; UniLabel1.Caption := 'TuniLable component '; Here if you want to check another colors TUniLable In codepen
  13. Using this site was a good experience for me If you are interested, you can see CSS of this photo and other CSS code for buttons in this link https://codepen.io/modiranco/pen/vYzqVEV
  14. On this site, you can see what colors each brand uses for the theme. https://brandcolors.net/ don't forget big companies pay a lot of attention to psychology, work environment and audience's taste when choosing colors, and they spend a lot of money to choose these colors.
  15. If you want to run the program again with a more beautiful page when an error occurs, use this code <style> body { font-family: "Tahoma", Arial, sans-serif; background-color: #f0f0f0; display: flex; flex-direction: column; justify-content: center; align-items: center; min-height: 100vh; margin: 0; } .message { font-size: 1.5rem; color: #0000A0; text-align: center; margin-bottom: 1rem; } .retry-link { font-size: 1.25rem; color: #A05050; text-align: center; text-decoration: none; border: 2px solid #A05050; border-radius: 5px; padding: 10px 20px; transition: all 0.3s; } .retry-link:hover { background-color: #A05050; color: #fff; } </style> </head> <body> <p class="message">[###message###]</p> <p><a class="retry-link" href="[###url###]">Restart Program</a></p> </body>
  16. The first step in creating CSS is to use its common formats. But if you don't feel like formatting CSS or you have a messed up CSS, use this site and see the miracle. https://www.cleancss.com/css-beautify/ for example body{font-family:Georgia, Times, serif;color:purple;background-color:#d8da3d}h1{font-family:Helvetica, Arial} to body { font-family: Georgia, Times, serif; color: purple; background-color: #d8da3d } h1 { font-family: Helvetica, Arial }
  17. سلام راستشو بخواهید من کلا متوجه نشدم چی نیاز دارید ولی موضوع بنظرم جالب رسید می توانید ی کمی در موردش بیشتر توضیح بدهید و بجای کد ، خود ایده را بیان کنید؟
  18. Even though I installed the latest version, after 3 days of wasted time, I found that the problem still exists in the exporter and all my Excel outputs are affected. In picture, you can see 2 Bigint from the table, which are different, but in Excel, the output of these two series is the same. I try to replace exporter with this code but problem still exist and I think unidbgrid have problem with bigint yet.
  19. Another powerful site to detect colors is https://color.adobe.com/ In this site in Accessibility Tools you can choice an image to extract colors
  20. A useful site for testing CSS https://codepen.io/ In this site , start a new pen and put the CSS code in the CSS section .tunibutton { display: inline-block; border-radius: 4px; background-color: #2196F3; color: #fff; font-size: 14px; font-weight: 500; padding: 8px 16px; text-align: center; text-decoration: none; text-transform: uppercase; transition: background-color 0.3s; } .tunibutton:hover { background-color: #1976D2; } .tunibutton:active { background-color: #0D47A1; } and enter a simple code in the HTML section to generate, for example, a Button <button class="tunibutton">Click me!</button>
  21. One of the best sites for producing beautiful CSS. You can give it a photo and download its color combination code /* CSS HEX */ --blue-ncs: #2589bdff; --cerulean: #187795ff; --caribbean-current: #38686aff; --ash-gray: #a3b4a2ff; --dun: #cdc6aeff; /* CSS HSL */ --blue-ncs: hsla(201, 67%, 44%, 1); --cerulean: hsla(194, 72%, 34%, 1); --caribbean-current: hsla(182, 31%, 32%, 1); --ash-gray: hsla(117, 11%, 67%, 1); --dun: hsla(46, 24%, 74%, 1); /* SCSS HEX */ $blue-ncs: #2589bdff; $cerulean: #187795ff; $caribbean-current: #38686aff; $ash-gray: #a3b4a2ff; $dun: #cdc6aeff; /* SCSS HSL */ $blue-ncs: hsla(201, 67%, 44%, 1); $cerulean: hsla(194, 72%, 34%, 1); $caribbean-current: hsla(182, 31%, 32%, 1); $ash-gray: hsla(117, 11%, 67%, 1); $dun: hsla(46, 24%, 74%, 1); /* SCSS RGB */ $blue-ncs: rgba(37, 137, 189, 1); $cerulean: rgba(24, 119, 149, 1); $caribbean-current: rgba(56, 104, 106, 1); $ash-gray: rgba(163, 180, 162, 1); $dun: rgba(205, 198, 174, 1); /* SCSS Gradient */ $gradient-top: linear-gradient(0deg, #2589bdff, #187795ff, #38686aff, #a3b4a2ff, #cdc6aeff); $gradient-right: linear-gradient(90deg, #2589bdff, #187795ff, #38686aff, #a3b4a2ff, #cdc6aeff); $gradient-bottom: linear-gradient(180deg, #2589bdff, #187795ff, #38686aff, #a3b4a2ff, #cdc6aeff); $gradient-left: linear-gradient(270deg, #2589bdff, #187795ff, #38686aff, #a3b4a2ff, #cdc6aeff); $gradient-top-right: linear-gradient(45deg, #2589bdff, #187795ff, #38686aff, #a3b4a2ff, #cdc6aeff); $gradient-bottom-right: linear-gradient(135deg, #2589bdff, #187795ff, #38686aff, #a3b4a2ff, #cdc6aeff); $gradient-top-left: linear-gradient(225deg, #2589bdff, #187795ff, #38686aff, #a3b4a2ff, #cdc6aeff); $gradient-bottom-left: linear-gradient(315deg, #2589bdff, #187795ff, #38686aff, #a3b4a2ff, #cdc6aeff); $gradient-radial: radial-gradient(#2589bdff, #187795ff, #38686aff, #a3b4a2ff, #cdc6aeff);
×
×
  • Create New...