Jump to content

AlexM123

uniGUI Subscriber
  • Posts

    45
  • Joined

  • Last visited

Posts posted by AlexM123

  1. in the lib

     

    type
      TConnectionDefDriverParams = record
        DriverDefName: string;
        VendorLib: string;
      end;

      TConnectionDefParams = record
        ConnectionDefName: string;
        Server: string;
        Database: string;
        UserName: string;
        Password: string;
        LocalConnection: Boolean;
        CharacterSet: string;
      end;

      TConnectionDefPoolParams = record
        Pooled: Boolean;
        PoolMaximumItems: Integer;
        PoolCleanupTimeout: Integer;
        PoolExpireTimeout: Integer;
      end;

     

     

    procedure ConfigFDManagerConnectionFirebird(
      const pConnectionDefDriverParams: TConnectionDefDriverParams;
      const pConnectionDefParams: TConnectionDefParams;
      const pConnectionDefPoolParams: TConnectionDefPoolParams);
    var
      lConnection: TFDCustomConnection;
      lFBConnectionDefParams: TFDPhysFBConnectionDefParams; // FIREBIRD CONNECTION PARAMS
      lFDStanConnectionDef: IFDStanConnectionDef;
      lFDStanDefinition: IFDStanDefinition;
    begin
      //PARA CRIAR OU ALTERAR Й NECESSБRIO FECHAR A O FDMANGER REFERENTE A ConnectionDefName
      FDManager.CloseConnectionDef(pConnectionDefParams.ConnectionDefName);

      FDManager.ActiveStoredUsage := [auRunTime];
      FDManager.ConnectionDefFileAutoLoad := False;
      FDManager.DriverDefFileAutoLoad := False;
      FDManager.SilentMode := True; //DESATIVA O CICLO DE MENSAGEM COM O WINDOWS PARA APRESENTAR A AMPULHETA DE PROCESSANDO.
    //  FDManager.Open;

      //DRIVER
      lFDStanDefinition := FDManager.DriverDefs.FindDefinition(pConnectionDefDriverParams.DriverDefName);
      if not Assigned(FDManager.DriverDefs.FindDefinition(pConnectionDefDriverParams.DriverDefName)) then
      begin
        lFDStanDefinition := FDManager.DriverDefs.Add;
        lFDStanDefinition.Name := pConnectionDefDriverParams.DriverDefName;
      end;
      lFDStanDefinition.AsString['BaseDriverID'] := 'FB'; //DRIVER BASE
      if not pConnectionDefDriverParams.VendorLib.Trim.IsEmpty then
        lFDStanDefinition.AsString['VendorLib'] := pConnectionDefDriverParams.VendorLib; //DEFINE O CAMINHO DA DLL CLIENT DO FIREBIRD.

      //CONNECTION
      lFDStanConnectionDef := FDManager.ConnectionDefs.FindConnectionDef(pConnectionDefParams.ConnectionDefName);
      if not Assigned(FDManager.ConnectionDefs.FindConnectionDef(pConnectionDefParams.ConnectionDefName)) then
      begin
        lFDStanConnectionDef := FDManager.ConnectionDefs.AddConnectionDef;
        lFDStanConnectionDef.Name := pConnectionDefParams.ConnectionDefName;
      end;

      //DEFINIЗГO DE CONEXГO: PRIVADO :: https://docwiki.embarcadero.com/RADStudio/Sydney/en/Defining_Connection_(FireDAC)
      lFBConnectionDefParams := TFDPhysFBConnectionDefParams(lFDStanConnectionDef.Params);
      lFBConnectionDefParams.DriverID := pConnectionDefDriverParams.DriverDefName;
      lFBConnectionDefParams.Database := pConnectionDefParams.Database;
      lFBConnectionDefParams.CharacterSet := csUTF8; // <<<---------------- NEGLECTED
      lFBConnectionDefParams.UserName := pConnectionDefParams.UserName;
      lFBConnectionDefParams.Password := pConnectionDefParams.Password;
      lFBConnectionDefParams.Server := pConnectionDefParams.Server;
      lFBConnectionDefParams.Protocol := TIBProtocol.ipLocal;
      if not pConnectionDefParams.LocalConnection then
        lFBConnectionDefParams.Protocol := TIBProtocol.ipTCPIP;

      lFBConnectionDefParams.Pooled := pConnectionDefPoolParams.Pooled;
      lFBConnectionDefParams.PoolMaximumItems := pConnectionDefPoolParams.PoolMaximumItems;
      lFBConnectionDefParams.PoolCleanupTimeout := pConnectionDefPoolParams.PoolCleanupTimeout;
      lFBConnectionDefParams.PoolExpireTimeout := pConnectionDefPoolParams.PoolExpireTimeout;

      //WriteOptions
      lConnection := TFDCustomConnection.Create(nil);
      try
        lConnection.FetchOptions.Mode := TFDFetchMode.fmAll; //fmAll
        lConnection.ResourceOptions.AutoConnect := False;
    //    lConnection.ResourceOptions.AutoReconnect := True;  //PERDA DE PERFORMANCE COM THREAD

        with lConnection.FormatOptions.MapRules.Add do
        begin
          SourceDataType := dtDateTime; { TFDParam.DataType }
          TargetDataType := dtDateTimeStamp; { Firebird TIMESTAMP }
        end;

        lFDStanConnectionDef.WriteOptions(lConnection.FormatOptions,
                                          lConnection.UpdateOptions,
                                          lConnection.FetchOptions,
                                          lConnection.ResourceOptions);
      finally
        lConnection.Free;
      end;

      if (FDManager.State <> TFDPhysManagerState.dmsActive) then
        FDManager.Open;
    end;

     

  2. Если по поводу кейсов - то есть русскоязычный телеграм канал.

    Не очень активный, но движуха есть и реальные разрабы.

    Мои 2 копейки по поводу прогресса :

    вызывает опасения тот факт что sencha приобретен Idera. Как правило это ничем хорошим не заканчивается.

    Но с другой стороны, на другие фреймворки например TMS WebCore перелезать не хочется, имеющейся код большой, принцип работы другой и прочее.

    Буду до последнего держаться

  3. Добрый день.

    Интересует вопрос : как сделать страницу с бесконечной прокруткой вниз (infinite).

    Видел решения с использованием unihtmlframe и обработкой JS, но хотелось бы использовать стандартные unigui controls.

    Есть ли такая возможность? И как такую форму/фрейм редактировать в design-time?

  4. Hello

    In this example I do not use any database connection. It is just unicode string.

    In general I use Firebird 3 : SET NAMES UTF8; DEFAULT CHARACTER SET UTF8 COLLATION UTF8;

    All grids show Unicode characters as expected

    users.jpg

  5. Dear Team

    I have found strange issue

    In TUniMainModule I fill UniSession.UserString := 'АБВГДЕЁЖЗИЙКЛМНОПРСТУФХЦЧШЩЫЬЪЭЮЯ_абвгдеёжзийклмнопрстуфхцчшщыьъэюя'

    This string is OK in Session list without HyperServer but wrong one with HyperServer as shown on the pictures.

    Unigui ver is 1.90.0.1563 , Ext JS 7.5.1 . Last Version FireFox x64

     

    Sesions with HyperServer.jpg

    Sessions without HyperServer.jpg

  6. Hello Sherzod

    I use an approach as the GridFiltering-2 example: methods UniDBGridColumenFilter + UniDBGridClearFilters in a Frame.

    In a DataModule I use a procedure

      fds___.DisableControls;
      try
        fds___.Filter := trim(AFilter);
        if not fds___.Filtered then
          fds___.filtered := true;
      finally
        fds___.EnableControls;
      end;

    Maybe after filtering

    I use FireBird server so it is difficult to make a test project.

    Maybe is there a JS event which should be fired?

     

  7. Добрый день.

    Использую Delphi XE8 32, UniGUI 1.90.0.1511 Pro,

    Создаю динамически TuniFrame, которые размещаются на TabSheet в Main TUNiPageControl.

    На каждом фрейме есть TUniHTMLFrame, на которых отображаются графики, генерируемые вручную с использованием Google API.

    Проблема в том, что все изменения отражаются только на первый TUniHTMLFrame .

  8. Thank you mos.

    I have used Google Charts, it is fee as contrasted to HighCharts.

    Google charts is on-line service and depends on its free will.

    Maybe somebody could suggets any open source JS Charts which can be stored locally ?

×
×
  • Create New...