Class AppDevice
IDevice implementation.
Implements
Inherited Members
Namespace: EduCATS.Helpers.Forms.Devices
Assembly: EduCATS.dll
Syntax
public class AppDevice : IDevice
  Methods
CancelSpeech()
Cancel speech.
Declaration
public void CancelSpeech()
  CheckConnectivity()
Check Internet or local network connection.
Declaration
public bool CheckConnectivity()
  Returns
| Type | Description | 
|---|---|
| bool | Is connection established.  | 
      
GetAppDataDirectory()
Get app data directory path.
Declaration
public string GetAppDataDirectory()
  Returns
| Type | Description | 
|---|---|
| string | App data directory.  | 
      
Remarks
Used to store cache files.
GetBuild()
Get application build.
Declaration
public string GetBuild()
  Returns
| Type | Description | 
|---|---|
| string | Application build.  | 
      
GetNamedSize(int, Type)
Get named size.
Declaration
public double GetNamedSize(int namedSize, Type type)
  Parameters
| Type | Name | Description | 
|---|---|---|
| int | namedSize | Named size enum.  | 
      
| Type | type | Type for size.  | 
      
Returns
| Type | Description | 
|---|---|
| double | Size.  | 
      
GetRuntimePlatform()
Get runtime platform.
Declaration
public string GetRuntimePlatform()
  Returns
| Type | Description | 
|---|---|
| string | Runtime platform.  | 
      
GetVersion()
Get application version.
Declaration
public string GetVersion()
  Returns
| Type | Description | 
|---|---|
| string | Application version.  | 
      
LaunchFile(string)
Launch file
Declaration
public Task LaunchFile(string pathForFile)
  Parameters
| Type | Name | Description | 
|---|---|---|
| string | pathForFile | 
Returns
| Type | Description | 
|---|---|
| Task | 
MainThread(Action)
Invoke on main thread.
Declaration
public void MainThread(Action action)
  Parameters
| Type | Name | Description | 
|---|---|---|
| Action | action | Action to invoke.  | 
      
OpenUri(string)
Open url.
Declaration
public Task OpenUri(string url)
  Parameters
| Type | Name | Description | 
|---|---|---|
| string | url | Url to open.  | 
      
Returns
| Type | Description | 
|---|---|
| Task | Task.  | 
      
SendEmail(string, string, string, string)
Send email.
Declaration
public Task<bool> SendEmail(string to, string title, string message, string attachmentPath)
  Parameters
| Type | Name | Description | 
|---|---|---|
| string | to | Email address to send to.  | 
      
| string | title | Title.  | 
      
| string | message | Email message.  | 
      
| string | attachmentPath | Attachment file path.  | 
      
Returns
| Type | Description | 
|---|---|
| Task<bool> | Status (sent or not).  | 
      
SetNativeTheme(string)
Sets theme for native platform.
Declaration
public bool SetNativeTheme(string hexColor)
  Parameters
| Type | Name | Description | 
|---|---|---|
| string | hexColor | Hex color.  | 
      
Returns
| Type | Description | 
|---|---|
| bool | 
SetTimer(TimeSpan, Func<bool>)
Set timer.
Declaration
public void SetTimer(TimeSpan interval, Func<bool> callback)
  Parameters
| Type | Name | Description | 
|---|---|---|
| TimeSpan | interval | Interval.  | 
      
| Func<bool> | callback | Callback.  | 
      
ShareFile(string, string)
Share file.
Declaration
public Task ShareFile(string title, string filePath)
  Parameters
| Type | Name | Description | 
|---|---|---|
| string | title | Title.  | 
      
| string | filePath | File path.  | 
      
Returns
| Type | Description | 
|---|---|
| Task | Task.  | 
      
Speak(string)
Text-to-speech.
Declaration
public Task Speak(string text)
  Parameters
| Type | Name | Description | 
|---|---|---|
| string | text | Text.  | 
      
Returns
| Type | Description | 
|---|---|
| Task | Task.  |