ServerUtils Class
Auxiliary functions for server operations.
Syntax
public class ServerUtils;
Information
- File: Thinfinity.VirtualUI.Settings.cs
- Namespace: Cybele.Thinfinity.Settings.VirtualUI
Description
The ServerUtils class provides static utility methods related to the configuration and management of the server in the context of Thinfinity VirtualUI applications.
Members
| Type | Link |
|---|---|
| Methods | Methods |
Methods
| Name | Description |
|---|---|
| RunAsAdmin(string, string) | Runs an application in elevated mode |
| Base64ToIcon(string) | Converts a base64 string to a PNG image |
| IconToBase64(Image) | Converts a PNG image to a base64 string |
Example
// Run application with administrator permissions
if (args.Length == 0)
ServerUtils.RunAsAdmin(Application.ExecutablePath, "/edit");
// Convert icon to base64
string iconData = ServerUtils.IconToBase64(myImage);
// Convert base64 to icon
Image icon = ServerUtils.Base64ToIcon(iconData);