Jump to content

mhmda

uniGUI Subscriber
  • Posts

    1141
  • Joined

  • Last visited

  • Days Won

    157

Posts posted by mhmda

  1. Good idea

     

    السؤال هل المختبرات ممكن تدفع مقابل هذا البرنامج، أعتقد يجب عمل دراسة ميدانية وسؤال أصحاب المختبرات أنفسهم فإذان كانت الاجابة "نعم" يتبقى السؤال: ما  هو المبلغ الشهري أو السنوي الذي يمكنهم دفعه؟

     

    فكرة جميلة

  2. Hi,

     

    Here is a project that use grid inside grid, I use the 'rowexpanderhttp://docs.sencha.com/extjs/4.2.2/#!/api/Ext.grid.plugin.RowExpander to render another grid inside current row !

     

    Online here: http://5.189.151.122:8019/  (for limit time)

     

    Project: http://3msoft.net/mhmd/grdgrd.rar (port 8019)

     

    mysql sql: http://3msoft.net/mhmd/school.sql

     

    I used the DataSetConverter4Delphi to convert dataset to json: https://github.com/ezequieljuliano/DataSetConverter4Delphi

     

    I hope this will help you in some way....

     

    grdgrd.png

    • Upvote 3
  3. To send Email you can search google for that.

     

    For sms we already use a API Gateway and must purchase packages (1000 sms, 5000 sms...).

     

    Personally when using the mobile itself for sending a sms the mobile operator investigate the sms and check it's content  has a commercial content and if so: you will get a warning or something worst :-(

     

    Here every  subscriber has a stack of 5,000 sms but ONLY for personal use. 

  4. Here is the solution, works as expected  ;)

     

    1. In order to access frame in js you must assign a name:

    procedure TMainForm.UniFormShow(Sender: TObject);
    var
      s:string;
      FrC : TUniFrameClass;
      Fr : TUniFrame;
    begin
      s:=AnsiUpperCase(UniApplication.Parameters.Values['ViewType']);
      if s=AnsiUpperCase('Test') then
        begin
          FrC := TUniFrameClass(FindClass('TframTest'));
          Fr := FrC.Create(Self);
          Fr.Name:='frmCanvas';{<---------------}
          Fr.Parent := Self;
        end;
    end;
    
    

    2. Capture the 'resize' event of the Frame and send ajaxRequest to inform the server about the actual size by sending ajax to parent panel: 'UniPanel1':

    function resize(sender, width, height, oldWidth, oldHeight, eOpts)
    {
      console.log(frmCanvas.UniPanel1.getWidth());
      ajaxRequest(frmCanvas.UniPanel1, 'updateCanvasSize', ['w='+frmCanvas.UniPanel1.getWidth(),'h='+frmCanvas.UniPanel1.getHeight()]);
    }
    

    3. 'UniPanel1': 'AjaxEvent'

    procedure TframTest.UniPanel1AjaxEvent(Sender: TComponent; EventName: string;
      Params: TUniStrings);
     var
      w,h:integer;
      a:string;
    begin
     if EventName='updateCanvasSize' then
     begin
      a:=Params.Text;
      w:=StrToIntDef(Params.Values['w'],100);//the 100 is default in case of error
      h:=StrToIntDef(Params.Values['h'],100);//the 100 is default in case of error
      cnvCounter.Width:=w;
      cnvCounter.Height:=h;
     end;
    end;
    
    

    Take this in mind: you should remove the 'Div 2' in delphi code:

    X1:=Random(Width div 2);
    Y1:=Random(Height div 2);
    X2:=Random(Width div 2);
    Y2:=Random(Height div 2);
    

    If you leave the 'Div 2' the it will draw the shape only in half of actual size of the canvas.

    • Upvote 1
  5. Hi,

     

    The the width & Height are the same as server side, you may pass them from the client-side to server-side and after that do your drawing, you can use the Delphi debugger and the browser console to see the difference of the size.

     

    And don't use 'alClient' with layouts. 

×
×
  • Create New...