Jump to content

stiaan

uniGUI Subscriber
  • Posts

    120
  • Joined

  • Last visited

  • Days Won

    9

Everything posted by stiaan

  1. Hi I have developed an explorer like file explorer for UniGUI. See http://forums.unigui.com/index.php?/topic/4289-unigui-file-explorer/ Stiaan
  2. Description: A simple file explorer that is able to upload and download files. The folders are loaded dynamically as the user browse the folder structure, hence saving resources and it is very quick. It also has a search functionality to search within a current folder. Features: Explorer like interface Quick and lite on resources - dynamic loading of folder structure and file data Uploading and downloading files Searching 3rd party components requirements: DevArt's TVirtualTable (http://www.devart.com/vtable/download.html) Binary version is free! Environment: Windows 7 64bit 8GB RAM Delphi XE5 Update 2 DevArt TVirtual Table UNIGui 0.95.0.1046 How to run: EXE included in the RELEASE folder, otherwise install TVirtualTable and then recompile. Connect to http://127.0.0.1:8077 Default folder that is shown in the browser is C:\. FileExplorer.zip
  3. HI I'm busy writing a NT service wrapper for UniGui. It is working as expected, Running 100% in the background as a NT service. The issue is shutting down. My question is this: How can I programmatically shut UniGUI Standalone server down? What is the command sequence? Regards Stiaan
  4. Hi Please try this code as it has worked for me successfully: icount := InterlockedIncrement( iNamesCounter ); HorizBarSeries := TUniHorizBarSeries.Create( Chart ); HorizBarSeries.Parent := Chart; HorizBarSeries.Name := 'Horizbar' + IntToStr(icount); This can be in a loop, but notice that the PARENT and NAME properties are critical to the objects being freed. NOTE: DO NOT alter the CHART.SERIESLIST list, as the PARENT property will do that for you. Stiaan
  5. A simple unit using TMS Flexcel to export to XLSX (Excel 2007/2010). VERY fast and very simple. It formats the DATETIME columns as well for easier readability. Example on how to call: procedure TbbbbReports.btnExportToExcelClick(Sender: TObject); var XLSX : TExcelFile; Mem : TMemoryStream; begin UniDBGrid1.DataSource := Nil; //<- Stop DBGrid from updating XLSX := TXLSFile.Create; DataSetToXLS( XLSX, SDQueryReport ); //<- Your dataset goes here. I use SQLDirect Mem := TMemoryStream.Create; XLSX.Save( Mem, TFileFormats(4) ); Mem.Position := 0; UniSession.SendStream( Mem, TrimSpecialStr(sReportname) + '.xlsx' ); //<- Push to browser Mem.Free; XLSX.Free; UniDBGrid1.DataSource := DataSource1; end; The unit source code: unit DataSetExports; interface Uses Windows, System.SysUtils, VCL.FlexCel.Core, FlexCel.XlsAdapter, Data.DB; procedure DataSetToXLS( XLSX : TExcelFile; DataSet : TDataSet; WorkSheetCount : Integer = 1; ActiveSheet : Integer = 1 ); implementation procedure DataSetToXLS( XLSX : TExcelFile; DataSet : TDataSet; WorkSheetCount : Integer = 1; ActiveSheet : Integer = 1 ); var ioldrecno, icol, irow : integer; fmt: TFlxFormat; fmtDateTime : Integer; begin //make sure it is XLSX format ioldrecno := DataSet.RecNo; XLSX.SupportsXlsx := True; XLSX.NewFile(WorkSheetCount, TExcelFileFormat(2) ); //2 = v2010, 1 = v2007, 0 = v2003 XLSX.ActiveSheet := ActiveSheet; fmt := XLSX.GetDefaultFormat; fmt.Format := 'yyyy-mm-dd HH:MM:SS AM/PM'; fmtDateTime := XLSX.AddFormat(fmt); //Write the headers irow := 1; for icol := 0 to DataSet.FieldCount - 1 do begin XLSX.SetCellValue( irow, icol + 1, DataSet.Fields[icol].DisplayName ); end; inc(irow); DataSet.First; while Not DataSet.EOF do begin for icol := 0 to DataSet.FieldCount - 1 do begin case Dataset.Fields[icol].DataType of ftUnknown, ftString, ftBoolean, ftFloat, ftCurrency, ftBCD, ftBytes, ftVarBytes, ftAutoInc, ftBlob, ftMemo, ftGraphic, ftFmtMemo, ftParadoxOle, ftDBaseOle, ftTypedBinary, ftCursor, ftFixedChar, ftWideString, ftADT, ftArray, ftReference, ftDataSet, ftOraBlob, ftOraClob, ftVariant, ftInterface, ftIDispatch, ftGuid, ftFMTBcd, ftFixedWideChar, ftWideMemo, ftOraInterval, ftConnection, ftParams, ftStream, ftTimeStampOffset, ftObject: begin XLSX.SetCellValue( irow, icol + 1, Dataset.Fields[icol].AsString ); end; ftSmallint, ftInteger, ftWord, ftLargeint, ftLongWord, ftShortint, ftByte, ftSingle: begin XLSX.SetCellValue( irow, icol + 1, Dataset.Fields[icol].AsInteger ); end; ftDate, ftTime, ftDateTime, ftOraTimeStamp, ftTimeStamp: begin XLSX.SetCellValue( irow, icol + 1, Dataset.Fields[icol].AsDateTime ); XLSX.SetCellFormat( irow, icol + 1, fmtDateTime ); end; ftExtended: begin XLSX.SetCellValue( irow, icol + 1, Dataset.Fields[icol].AsFloat ); end; end; end; inc(irow); DataSet.Next; end; DataSet.RecNo := ioldrecno; end; end.
  6. You need to make sure that your cleanup code is running properly and that the objects are freed in the order that they are created. With all my tests I have not found an issue with the latest UniGUI build, but found a similar issue when I released objects that was still needed by some other cleanup code. Can you provide your cleanup code?
  7. Hi It is very simple to know what entries are being viewed on the DBGrid by various users. I do it by saving a file with the SESSIONID=<DataSet Index>. So everytime a user clicks on a new line on the DBgrid, it reads the file, see what other sessions are viewing the same entry and then display accordingly. If the clicked entry is not being viewed by another user, I then update the file. (The trick comes in to clean out old sessions.) Stiaan
  8. No, it is very responsive with MegaDemo. I will do further checking...
  9. Attached as requested. I just need to mention that the TClientDataSet used to populate the DBGrid is about 2.7MB worth of XML data. That is 1900 rows. Total HTML source: 27818 bytes. Other two tabs contain a Unimemo and a UniChart.
  10. Not big at all.... Panels x4 DBGrid UniScrollBox UniSplitter See screenshot:
  11. No problem. That's what I thought.
  12. Thanks. I will prototype it and give some feedback.
  13. Hi is it possible to change the DBGrid row colors (or highlight the row) on the fly. What I'm trying to do is to show what entries are viewed by others users on the DBGrid by highlighting the row. For example: If the entry is viewed by another user, then i want to "highlight" that specific DBGrid row on all connecting clients. regards Stiaan
  14. Hi I was wondering if it would be possible to embed UniGui forms in DLLs. My requirement is that I want to build multiple DLLs that has the forms embedded and only gets loaded when needed. This is a plugin system approach. Your help and comments will be appreciated! regards Stiaan
  15. Hi I was just wondering if anyone is getting the same testing result that IE10 is very slow. Firefox v29 is performing like a desktop app, but IE10 is very slow. For example, the ScreenMasks doesn't even turn when showing. Regards Stiaan
  16. Much appreciated! Just a comment, please add this to a demo somewhere for reference
  17. Just a note: I have tried see UniZPopupMenu and UniZDBGrid and I cannot see where to change the column type to button column??? Am I missing something?
  18. Hi I have added this code to the reconfigure EXTJS Event. I get the button but the callback seems to be the issue when the button is pressed: function reconfigure(sender, store, columns, oldStore, the, eOpts) { //Add progress bar columns[2].width = 110; columns[2].renderer = function (v, m, r) { var id = Ext.id();Ext.defer(function () {Ext.widget('progressbar', { renderTo: id, value: v / 100, width: 100 });}, 50);return Ext.String.format('<div id="{0}"></div>', id);}; //Add button columns[3].width = 110; columns[3].renderer = function (v, m, r) { var id = Ext.id(); Ext.defer(function () { Ext.widget('button', { xtype: 'actioncolumn', renderTo: id, text: 'Check', width: 100, handler: function (grid, rowIndex, colIndex) { //Ext.Msg.alert("hallo there!" + grid); //var rec = grid.getStore(); //.getAt(rowIndex); Ext.Msg.alert("hallo there2!" , "hallo"); return; } }); }, 50); return Ext.String.format('<div id="{0}"></div>', id); }; }
  19. Hi I was hoping that someone can help: I want to be able to detect if a user has checked the check box in UniDBGrid. I want to be able to follow a separate workflow before I allow the actual check to take place. I have played around with the ExtJS Events with little success. Much appreciated! Regards Stiaan
  20. Hi Is it possible to have a button column in the UniDBGrid? (I have searched the forums with no success.) My requirement is simple: I want to popup another form after the button has been pushed on the DBGrid, obviously using the data from the DBGrid in the popup form. Your help is much appreciated! Regards Stiaan
  21. No, you can run as a standalone EXE. Just make sure that when you run the EXE is runs under the context of a domain account. Can I assume that is the case?
×
×
  • Create New...