Jump to content

MVakili

uniGUI Subscriber
  • Posts

    171
  • Joined

  • Last visited

  • Days Won

    9

Posts posted by MVakili

  1. On 7/3/2023 at 12:44 PM, MVakili said:

    Thank you for sharing.
    Can these charts be used offline as well?

    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. 1 hour ago, Marlon Nardi said:

    Inside the UniFalcon folder is a folder named falcon.

    You will copy the falcon folder into the directory where uniGUI was installed, both on your machine and on the server.

    Sample:
    ..\UniFalcon\falcon
    to
    C:\Program Files (x86)\FMSoft\Framework\uniGUI\uni-1.90.0.1567

    The process is quite simple.

    If you still have questions, you can send me an email to suporte@falconsistemas.com.br and I'll connect it to your machine and help you.

    @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

    • Like 1
  3. 13 hours ago, Marlon Nardi said:

    Hi @MVakili

    To work without CDN, you must disable the {$IFDEF CDN_FALCON} directive in Line 12 and add the falcon folder in the directory where uniGUI is installed, on your machine or on the server.

    Example:

    image.thumb.png.0d7e64ebb6b77ed1267997717f2fbdce.png

     

    image.png.d5253f433b7b324d5d008dbf5c735a8c.png

    The falcon folder, located inside the UniFalcon package.

    Thank you for your explanation
    But what if I want to run the software another computer ?
    Do I have to install falcon there ?

    Or should I copy the files (js/css/..) and specify their path?

     

  4. On 5/22/2019 at 8:36 PM, Marlon Nardi said:

    Hi Donald

    Thank you, for questions and support you can send email to suporte@falconsistemas.com.br

    If I understood your question, all my systems use secure connection.
    If you are referring to my CDN TLS you can change it, it is not mandatory.

    UniFSCommon.pas -> comment out the directive {$ DEFINE CDN_FALCON}

    --

    When you comment on the {$ DEFINE CDN_FALCON} directive, the components stop fetching the JS and CSS files from the CDN  and seek in fetch the JS and CSS files from the local uniGui installation folder, ie the falcon folder should be located of the uniGUI installation folder, both on the server and on your local machine.

    the falcon folder is inside the UniFalcon folder.

    -

    Quando você comenta sobre a diretiva {$ DEFINE CDN_FALCON}, os componentes param de buscar os arquivos JS e CSS do CDN e buscam os arquivos JS e CSS da pasta local uniGui, ou seja, a pasta falcon deve estar localizada na pasta de instalação uniGUI. , tanto no servidor como na sua máquina local.

    a pasta falcon está dentro da pasta UniFalcon.


    Sample:
    ImageSignature.png

    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.

     

  5. On 11/13/2022 at 8:51 PM, Moegamat Alexander said:

    Hi

    Where do I find documentation about css and what you can do. I need to adjust my tab heights ... its inherited from the emerald theme and I need to overide the tab heights overall ... it looks a bit bulky

    css.PNG

    please share you solution 

  6. 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;

     

  7. 9 hours ago, Oliver Morsch said:

    see https://docs.devart.com/sdac/faq.htm:

    Are the SDAC connection components thread-safe?

    Yes, SDAC is thread-safe but there is a restriction. But the same TCustomMSConnection object descendant cannot be used in several threads. So if you have a multithreaded application, you should have a TCustomMSConnection object descendant for each thread that uses SDAC

    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.

  8. 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

    image.png.f7a283c5b24916167321482c03463824.png

    • Like 2
  9. 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

  10. On 4/3/2023 at 4:52 PM, MVakili said:

    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.

    Using this site was a good experience for me

    image.png.7c6fdf2c077abad3f1433653b3f37bcb.png

    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

  11. If you want to run the program again with a more beautiful page when an error occurs, use this code

     

    image.png.a87cc5e0991fe4a2a292023f65c844b0.png

     

    <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>
  12. 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
    }

     

    • Thanks 1
  13. 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.

    Untitled.png

    I try to replace exporter with this code

     

    but problem still exist and I think unidbgrid have problem with bigint yet.

     

  14. 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>

     

    • Thanks 1
  15. 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);

     

    6-office-211103-0317w-1672342479.jpg

    • Thanks 1
×
×
  • Create New...