Table of Contents

Class AppUtils

Namespace
Alternet.UI
Assembly
Alternet.UI.Common.dll

General application utility methods.

public static class AppUtils
Inheritance
AppUtils

Properties

FirstWindowChildOrEmpty

Gets first child of the first window or an empty control.

FrameworkIdentifier

Gets identifier for the net framework used in the application.

Methods

CreateFirstWindowClone(bool)

Creates clone of the first window and optinally shows it on the screen.

ExecuteApp(string, string, string?, bool, bool)

Executes application with the specified parameters.

ExecuteTerminalCommand(string, string?, bool, bool)

Executes terminal command redirecting output and error streams to Log(object?, LogItemKind).

GetMyTargetFrameworkName()

Gets this application target framework in the form like 'net8.0' or 'net462'.

OpenLogFile()

Opens log file LogFilePath in the default editor of the operating system.

OpenTerminalAndRunCommand(string?, string?)

Opens terminal and runs command there.

OpenTerminalAndRunEcho(string)

Opens terminal and runs 'echo' command with the specified text string there.

OpenUrl(string)

Opens url in the default browser.

ProcessStart(string, string?, string?)

Uses Process to start the application.

ProcessStartEx(ProcessStartInfo)

Uses Process to start the application.

RepeatAction(int, Action)

Repeats action specified number of times.

SegmentAndQuoteCommandLine(string?)

Splits command line string into array and adds double quotes to the elements if they contain spaces.

SegmentCommandLine(string?, bool)

Splits command line string into array.

ShellExecute(string, string?, string?)

Uses Process to start the application.