Jump to content

bugra

uniGUI Subscriber
  • Posts

    160
  • Joined

  • Last visited

  • Days Won

    6

Everything posted by bugra

  1. Hi Could you check your paths? You're doing right thing using ExtRoot and UniRoot, but probably write something wrong in paths.
  2. bugra

    js script

    I've wroted sample project. I hope it will help. Google Maps Geocoding.zip
  3. Kayıt olduğunuz e-mail adresinden support@fmsoft.net adresine şifremi unuttum diye mail atarsanız şifreniz resetlenecektir.
  4. merhabalar En son sürümü portalda bulabilirsiniz https://prime.fmsoft.net/userv/mportal.dll
  5. Hi, If we basiccaly write how to detect platform with code it's look like this type TUniPlatforms = set of TUniPlatform; type TMainmForm = class(TUnimForm) procedure UnimFormCreate(Sender: TObject); private { Private declarations } public { Public declarations } uPlat: TUniPlatforms; end; implementation {$R *.dfm} uses uniGUIVars, MainModule, uniGUIApplication; function MainmForm: TMainmForm; begin Result := TMainmForm(UniMainModule.GetFormInstance(TMainmForm)); end; procedure TMainmForm.UnimFormCreate(Sender: TObject); var platform:string; begin uPlat := UniApplication.UniPlatform; if (upPhone in uPlat) then platform:= 'Phone' else if (upTablet in uPlat) then platform:= 'Tablet' else if (upDesktop in uPlat) then platform:= 'PC'; else if (upiPad in uPlat) then platform:= 'iPad' else if (upiPod in uPlat) then platform:= 'iPod' else if (upiPhone in uPlat) then platform:= 'iPhone' else if (upAndroid in uPlat) then platform:= 'Android Mobile Device' else if (upDesktop in uPlat) then platform:= 'Desktop PC'; else if (upAndroid in uPlat) then platform:= 'Android' else if (upiOS in uPlat) then platform:= 'iOS' else if (upDesktop in uPlat) then platform:= 'Desktop OS'; else if (upDesktop in uPlat) then platform:= 'Desktop' else if (upMobile in uPlat) then platform:= 'Mobile'; end; initialization RegisterAppFormClass(TMainmForm); end. In here first set type of TuniPlatform. after then when uniform created you can control which one is working. (this is the same code from Demos/Touch/Detect Platform with little changes) But as @logisticasoft mentioned if you want mobile user's go to mobile login form, desktop user's go to desktop login form, you better make hybrid application. And you can use ActionList for desktop and mobile button which has same code. (action list not working in mobile menus yet but)
  6. Hi You can try adding action columns. Look here: http://forums.unigui.com/index.php?/topic/4130-add-action-columns-to-unidbgrid-at-runtime/?hl=action+column Note: It will be added in uniGUI's next versions. For now you have to added.
  7. Bu olay dosya boyutu sınırından ziyade server belleği yetersizliğinden meydana gelmekte. Bir dosya download edilirken server belleğinde dosya boyutu kadar bir alan kullanılıyor. Sizin dosyanız için 1 kişi download ederse 1.3 gb aynı anda iki kişi download ederse 2.6 gb bellek kullanımı olacak ve dosya boyutu büyük olduğundan indirme süresi uzayacağından bellekte sorunlar yaşanmaya başlayacak. Bunun yanı sıra IIS tarafında da bir dosya indirme sınırlaması zaten mevcut olduğundan büyük boyutlu dosyaları partlara ayırarak indirmek ya da dış kaynaktan indirmek daha uygun bir çözüm olacaktır. Download edilebilir dosya boyutu için tavsiyem ortalama 50mb, max 100mb boyutundaki dosyaları uniGUI aracılığı ile indirmenizdir.
  8. Merhabalar Maalesef uniGUI altyapısı bu boyutta bir dosyanın download edilmesine uygun değil. Çözüm olarak bir ftp web sitesiyle ile dosya transferi yapabilir ya da dosyaları dropbox, google drive gibi bulut depolama alanlarını kullanıp dosya indirmesi için kullanıcıyı buralara yönlendirebilirsiniz.
  9. Hi; You can do it with code in ServerModule Create event Add this procedure TUniServerModule.UniGUIServerModuleCreate(Sender: TObject); var IPThird,IPFourth: Integer; IPThirdString, IPFourthString,IP: string; begin for IPThird := 0 to 255 do begin IPThirdString := CheckStrLength(inttostr(IPThird)); for IPFourth := 0 to 255 do begin IPFourthString := CheckStrLength(inttostr(IPFourth)); IP := '111.222.'+IPThirdString+'.'+IPFourthString; BlockedIPList.Append(IP); end; end; end; and for CheckStrLength function create private function same name in serverModule private function CheckStrLength(Str:string):string; and write function function TUniServerModule.CheckStrLength(Str: string): string; begin if Length(Str)=2 then Result := '0'+Str else if Length(Str)=1 then Result := '00'+Str else Result := Str; end;
  10. bugra

    HTML5 Audio

    Hi; After put your sound file in files folder src of source just must be "files/tada.wav" also you can add src into a audio rather than adding source element in it if you only play one resource. <audio controls src="files/tada.wav" type="audio/wav">Your browser does not support the audio element.</audio>
  11. bugra

    Responsive

    Ancak bu şekilde yapılan değişimde sadece ufak değişiklikler yapabilirsiniz ve oldukça uğraştırıcı olur. Hatta çoğu componentin yapısı bu şekilde değişmeyecektir. Sizin için en iyi kullanım şekli layoutlar ve hibrit dizaynın birleşmesi olabilir. Diğer türlü çok fazla uğraşıp istediğiniz sonucu elde edemeyebilirsiniz.
  12. bugra

    Responsive

    Anladım. O zaman css ile değişiklik yapabilirsiniz. Örneğin butonların boyunu büyütmek için ServerModule'de CustomCSS'te bir CSS class'ı oluşturun. Sonra bunu Form'un OnCreate anında ilgili butona aşağıdaki şekilde ekleyin (UniButton1 as IUniJSInterface).JSConfig('cls', ['CSSClass']); bu kodun çalışabilmesi için uses kısmına uniGUIJSInterface unitini eklemeniz gerekiyor. İlla butona değil tüm uniGUI componentlerine bu şekilde css class'ı ekleyebilirsiniz.
  13. bugra

    Responsive

    Hibrit proje yapabilirsiniz. PC'de desktop kısmı mobil'de mobil kısmı çalışır. Örnek için Demos\Touch\Hybrid pathindeki demoyu inceleyebilirsiniz.
  14. Hi; You need to change UniButton's iconAlign properties.
  15. Hi. Did you mean assign procedure to run-time created uniedit's event? if you mean that try this. Create a procedure like public procedure myEvent(Sender: TObject); then assign which event you want when you create uniedit in runtime. uniEditCom.OnChange := myEvent;
  16. for UniEdit write this code inside JavaScript MainForm.UniEdit1.setValue("your new value"); in your case you can change "your new value" into "childo[j].value" without " . other uniComponent may use setValue or use setText. Both are same usage. for more information you can look Sencha's ExtJS document http://docs.sencha.com/extjs/4.2.3/#!/api For External variables you can use ajaxRequest. just add theese lines after your JS. ajaxRequest(MainForm.UniButton1, 'newParam', ['MyParam'=myParam]); (myParam is uniHTMLFrame response) After then call this param inside UniButton1's OnAjaxEvent like this procedure TMainForm.UniButton1AjaxEvent(Sender: TComponent; EventName: string; Params: TUniStrings); var someString:string; begin if EventName='newParam' then begin someString = Params.Values['MyParam']; end; end;
  17. bugra

    Setting images paths

    Hi You can create folderpath variable inside ServerModule. Define public global variables for every folder public LogFolder, ImagesFolder: string; then write this code inside ServerModule Create event procedure TUniServerModule.UniGUIServerModuleCreate(Sender: TObject); begin LogFolder := StartPath+'\log\' ; ImagesFolder := StartPath+'\image\' ; end; after then you can call thoose like this UniServerModule.LogFolder;
  18. Theese code also find object inside UniHTMLFrame, but if you wanna find specific object try this one procedure TMainForm.UniButton1Click(Sender: TObject); var sendParam: string; begin sendParam := 'myParam'; UniSession.AddJS( 'var c = document.getElementById("OA1");'+ 'var childo = c.children;'+ 'var j;'+ 'for (j = 0; j < childo.length; j++)' + '{' + 'if (childo[j].tagName == "PARAM" && childo[j].name=="Toolbars")' + '{'+ 'childo[j].value = "'+sendParam+'";' + '}' + '}') ; end;
  19. Hi You can use javascript like procedure TUniForm3.UniButton1Click(Sender: TObject); var sendParam: string; begin sendParam := 'myParam'; UniSession.AddJS('document.getElementsByName("Toolbars")[0].value ="'+sendParam+'";'); end;
  20. bugra

    JS Syntax

    also you can send a parameter in ajaxRequest like ajaxRequest(MainForm.UniButton1, 'SoneRequest', ['Time='+time]); and call it in delphi someString := Params.Values['Time'];
  21. bugra

    JS Syntax

    Hi You can create ajax request. For example in some component's click clientevents there is this code bellow function click(sender, e, eOpts) { var time = 0; for (i=0;i<=5000;i++) { time +=1; MainForm.UniButton1.setText(time); } if (time >= 5000) { ajaxRequest(MainForm.UniButton1, 'SomeRequestNamedByMe', []); } } and in onAjaxEvent there is this code procedure TMainForm.UniButton5AjaxEvent(Sender: TComponent; EventName: string; Params: TUniStrings); begin if EventName='SomeRequestNamedByMe' then begin myProcedure; end; end; First call ajaxRequest in JS when condition is true. Second one call procedure named myProcedure in delphi.
  22. Hi; An UniGUI application can be closed from only its events like onclick, not other threads events. That's the reason why you are getting access violation error.
  23. Merhabalar; Trial sürümünü kullandığınızdan dolayı TimeOut'u yükseltemiyorsunuz sanırım. Bu durumda Form'a timer koymakta bir işe yaramaz. Ancak Lisans alarak sorununuzu çözebilirsiniz.
  24. Merhabalar O dosyayı oluşturup bilgileri geri oradan okumak yerine aşağıdaki koda benzer bir biçimde yapabilirsiniz. for I := 0 to UniCalendarPanel1.Events.Count-1 do begin Database.Append; Database.FieldByName('CalendarId').AsString := UniCalendarPanel1.Events.Item[I].CalendarId; Database.FieldByName('Title').AsString := UniCalendarPanel1.Events.Item[I].Title; Database.FieldByName('Title').AsDateTime := UniCalendarPanel1.Events.Item[I].StartDate; Database.FieldByName('Title').AsDateTime := UniCalendarPanel1.Events.Item[I].EndDate; Database.FieldByName('Title').AsString := UniCalendarPanel1.Events.Item[I].Reminder; Database.FieldByName('Title').AsBool := UniCalendarPanel1.Events.Item[I].IsAllDay; Database.Post; end; ya da daha mantıklı bir yöntem olarak her eventi oluşturduğunuz anda database'e yazabilirsiniz.
  25. Merhabalar; Maalesef şimdilik birşey yapamıyoruz. Sorunu not aldık ileriki sürümlerde çözmeye çalışacağız.
×
×
  • Create New...