From Clomosy Docs

Line 131: Line 131:
|Procedure ProcessMessages;||Clomosy.ProcessMessages;||This function executes one cycle of an event processing loop and processes pending events.
|Procedure ProcessMessages;||Clomosy.ProcessMessages;||This function executes one cycle of an event processing loop and processes pending events.
|-
|-
|Procedure SetClipBoard(AValue:Variant);||Clomosy.setClipBoard('Hello World'); ||It is used to copy text or data to the clipboard.
|Procedure SetClipBoard(AValue:Variant);||Clomosy.setClipBoard('Hello World'); ||It is used to copy text or data to the clipboard. See [[Clipboard | page]] for clipboard feature usage.
|-
|-
|Function GetClipBoard:Variant; ||testBtnn.Caption := Clomosy.GetClipBoard;||It is used to retrieve text or data from the clipboard.
|Function GetClipBoard:Variant; ||testBtnn.Caption := Clomosy.GetClipBoard;||It is used to retrieve text or data from the clipboard. See [[Clipboard | page]] for clipboard feature usage.
|-
|-
|HoldScreen || Clomosy.HoldScreen = False; || The HoldScreen property determines whether the screen lock is on or off. When set to True, it prevents the screen from locking. Setting it to False enables screen locking. By default, it is set to False.
|HoldScreen || Clomosy.HoldScreen = False; || The HoldScreen property determines whether the screen lock is on or off. When set to True, it prevents the screen from locking. Setting it to False enables screen locking. By default, it is set to False.
|}
|}
See [[Clipboard | page]] for clipboard feature usage.


= StringList Functions Feature =
= StringList Functions Feature =

Revision as of 11:57, 31 May 2024

In Clomosy programming, classes are the fundamental building blocks of object-oriented programming. A class is a structure that encompasses data and behaviors, forming the basis for creating objects. Clomosy's class-based structure enhances the organization, clarity, and manageability of code.

The properties of the Clomosy class gather data and behaviors together, enabling the design of complex projects in a more comprehensible manner.

Accessible Properties

Feature Use of Definition
Firm_GUID: String; Clomosy.Firm_GUID; The GUID of the company where the user is located is provided. Educational accounts do not have a company GUID. For this reason, it returns "CLOSTARTER."
Clomosy.Project_GUID: String; Clomosy.Project_GUID; The GUID of the project entered by the user is provided.
Clomosy.AppUserGUID: String; Clomosy.AppUserGUID; The user's GUID is retrieved.
Procedure RunUnit(AUnitName:String); Clomosy.RunUnit('MyUnit1'); When you want to invoke a simple unit in Clomosy, you can use the "RunUnit" property.
Function GetProjectUserDefParam(xParamName:String):TClJSonQuery; Clomosy.GetProjectUserDefParam('letterCombo'). FieldByName('Value_Integer').AsInteger; You can get the values ​​of the variable created in the param template. Not available for free membership. Check out page for usage.
Function RunOpenForm(OpenFormParams:TOpenFormParams):Integer; Clomosy.RunOpenForm(Clomosy.OpenFormParams); It was created to enable the execution of the created custom form. Review example.
Function OpenForm(FormName:TFormTemplate; OpenStyle:TFormDisplayType; Recording:TFormRecordOption; FilterOption:TFormFilterOption):Integer; Clomosy.OpenForm(ftItems,fdtSingle,froAddNew,ffoNoFilter); Used to open custom form.
Procedure AskAndCall(xAskStr:WideString; CallYesProc, CallNoProc:String); Clomosy.AskAndCall('Are You Cola','ProcYes','ProcNo'); It returns a check box. Operations can be made according to the yes or no option. Check out page for usage.
Function Ask(AskStr:String):Boolean; Clomosy.Ask('Are You Cola?') It is the parameter required to write the question in the confirmation box. Check out page for usage.
Property AppProjectName:String read fAppProjectName write fAppProjectName; Clomosy.AppProjectName Returns the project name.
Property AppUserDisplayName:String read fAppUserDisplayName write fAppUserDisplayName; Clomosy.AppUserDisplayName The username is taken.
Property AppUserProfile:Integer read fAppUserProfile write fAppUserProfile; Clomosy.AppUserProfile In the project, there is a check for whether the user is an administrator. If it's 1, they are an administrator; if it's 0, they are a regular user.
Property GlobalVariableString:String read fGlobalVariableString write fGlobalVariableString; Clomosy.GlobalVariableString := 'Test'; It holds the global string variable. You can call and use this variable in different units.
Property GlobalVariableInteger:Integer read fGlobalVariableInteger write fGlobalVariableInteger; Clomosy.GlobalVariableInteger It holds the global integer variable. You can call and use this variable in different units.
Property ResumeLocalEvent:Boolean read fResumeLocalEvent write fResumeLocalEvent; Clomosy.ResumeLocalEvent := False; It is used to prevent the next page from opening in ready-made template structures.
Property DBSQLServerConnection:TUniConnection read fDBSQLServerConnection write fDBSQLServerConnection; Clomosy.DBSQLServerConnection; A connection to the SQL database is established.
Property LocationIsActive:Boolean read fLocationIsActive write fLocationIsActive; Clomosy.LocationIsActive In projects with templates, if location information is on, it returns 1, otherwise it returns 0.
Property AppBasePath:String read fAppBasePath write fAppBasePath; Clomosy.AppBasePath It is a property representing the path to the main directory where an application is launched.
Property AppFilesPath:String read fAppFilesPath write fAppFilesPath; Clomosy.AppFilesPath It is a property that represents the file path of the application.
Property PlatformIsMobile:Boolean read fPlatformIsMobile write fPlatformIsMobile; Clomosy.PlatformIsMobile If the platform on which the application is opened is mobile, it returns True, otherwise False.
Property PlatformIsTurkish:Boolean read fPlatformIsTurkish write fPlatformIsTurkish; Clomosy.PlatformIsTurkish If the system language is Turkish, it returns True; otherwise, it returns False.
AppPlatform Clomosy.AppPlatform Depending on the platform the application is opened on, operations can be performed. 0: Windows, 1: MacOS, 2: iOS, 3: Android, 4: WinRT, 5: Linux
ClomosyID Clomosy.ClomosyID; It is used to know which Clomosy applications you are using. If the return value is 0, it means that the project is entered through Clomosy CRM, and if it is 1, it means that the project is entered through Clomosy LEARN.
CallUserProfile Clomosy.CallUserProfile(MyForm); This is a feature for calling the profile page. In the structure you call, the profile page opens and comes from the side menu.

Send Message/Mail/Notify Feature

Feature Use of Definition
Function SendNotification(TitleStr, BodyStr, UserGUID :String):Boolean; Clomosy.SendNotification(notifTitleEdt.Text, notifTextEdt.Text, notifSendToEdt.Text); Used to send notifications to all users in the project.
Function SendNotifyAllUsers(TitleStr, BodyStr, WithoutUsers :String):Boolean; Clomosy.SendNotifyAllUsers(TitleEdt.Text, TextEdt.Text, SendToEdt.Text); If there is a user in the project that is not wanted to be notified, by selecting that user, notifications are sent to others.
Function SendMailNoReplay(TitleStr, BodyStr, UserGUID :String):Boolean; Clomosy.SendMailNoReplay('Title:Information',ztStr,'[email protected]'); It is used to send a message to the desired e-mail address.

Review example.

SQL Servers Feature

Feature Use of Definition
Function DBSQLServerConnect(ProviderName, Server, UserName, UserPassword, Database:String; Port:Integer=1433):Boolean; Clomosy.DBSQLServerConnect('SQL Server', Server, User, Password, DB, 1433); It is a component used to connect Clomosy applications with SQL Server.
Function DBSQLServerQueryWith(SQLStr:String):TUniQuery; Clomosy.DBSQLServerQueryWith('SELECT * FROM TBLSTOCK'); Sql Server database query is made and data is accessed.

For detailed information, visit page.

Local Database Feature

Feature Use of Definition
Function DBSQLiteConnect(Database, UPassword:String):Boolean; Clomosy.DBSQLiteConnect(DB, Password); It is a component used to connect Clomosy applications with SQLite.
Function DBSQLiteQueryWith(SQLStr:String):TClSQLiteQuery; Clomosy.DBSQLiteQueryWith('SELECT * FROM TBLSTOCK'); Sqlite database query is made and data is accessed.

For detailed information, visit page.

Cloud Database Feature

Feature Use of Definition
Function DBCloudSQLSelectWith(SQLStr:String):TClJSonQuery; Clomosy.DBCloudSQLSelectWith(sqlString); It can be used to retrieve data from a specific database table or view or to execute an SQL query.
Function DBCloudQueryWith(CloudDataSource:TFormTemplate;Filter_GUID, FilterStr:String):TClJSonQuery; Clomosy.DBCloudQueryWith(ftProducts,,'1=1'); Cloud database query is made and data is accessed.
Function DBCloudPostJSON(CloudDataSource:TFormTemplate; DataJSON:String):Boolean; Clomosy.DBCloudPostJSON(ftThreads,'[{"Thread_Value_Str":"Test Exam"}]'); It is a process used to handle JSON data from a database.

For detailed information, visit page.

Data Source Process

Feature Use of Definition
function ClDataSetFromJSON(payload : String):TClJSonQuery; Clomosy.ClDataSetFromJSON('[{"name":"Jack","age":22}]'); It can represent the process of converting data that comes in JSON format into a dataset.

For detailed information, visit page.

Image Procedure and Functions Feature

Feature Use of Definition
Procedure GlobalBitmapSaveToFile(aFileName:String); Clomosy.GlobalBitmapSaveToFile('x:\GlobalBitmap.png'); It allows converting an image or bitmap into a file and saving it to a desired directory.

System Feature

Feature Use of Definition
Procedure ProcessMessages; Clomosy.ProcessMessages; This function executes one cycle of an event processing loop and processes pending events.
Procedure SetClipBoard(AValue:Variant); Clomosy.setClipBoard('Hello World'); It is used to copy text or data to the clipboard. See page for clipboard feature usage.
Function GetClipBoard:Variant; testBtnn.Caption := Clomosy.GetClipBoard; It is used to retrieve text or data from the clipboard. See page for clipboard feature usage.
HoldScreen Clomosy.HoldScreen = False; The HoldScreen property determines whether the screen lock is on or off. When set to True, it prevents the screen from locking. Setting it to False enables screen locking. By default, it is set to False.

StringList Functions Feature

Feature Use of Definition
Function StringListNew:TStringList; Clomosy.StringListNew; It is the process of creating a useful class that provides a list-like structure to store and manage an array of arrays.Review example.
Function StringListItemString(AStringList:TStringList; AIndex:Integer):String; Str:=Clomosy.StringListItemString(List,0); Used to provide access to the items in the list.

For detailed information, visit page.