Application class for Markdown Monster that provides a global static placeholder for configuration and some utility functions
MarkdownMonster.mmApp
public class mmApp : object
Class Members
Member | Description | |
---|---|---|
Constructor |
||
_configuration |
||
ApplicationStart |
public static void ApplicationStart() |
|
CompareVersions |
Compare two version strings. public static int CompareVersions(string versionToCompare, Â Â Â Â string versionToCompareAgainst) |
|
DecryptString |
Decrypts a string encrypted with EncryptString() public static string DecryptString(string encrypted, Â Â Â Â bool? dontUseMachineKey) |
|
EncryptString |
Encrypts sensitive user data using an internally generated encryption key. public static string EncryptString(string value) |
|
GetDocumentionUrl |
Returns a fully qualified Help URL to a topic in the online documentation based on a topic id. public static string GetDocumentionUrl(string topic) |
|
GetVersion |
Gets the Markdown Monster Version as a string public static string GetVersion() |
|
GetVersionDate |
Return the write date for the Main MM application executable public static string GetVersionDate() |
|
GetVersionForDisplay |
Returns a formatted string value for the version. public static string GetVersionForDisplay(string version) |
|
HandleApplicationException |
Handles an Application level exception by logging the error to log, and displaying an error message to the user. Also sends the error to server if enabled. Returns true if application should continue, false to exit. public static bool HandleApplicationException(Exception ex, Â Â Â Â ApplicationErrorModes errorMode) |
|
InitializeLogging |
Starts the Application Insights logging functionality Note: this should be set on application startup once and will not fire multiple times. public static void InitializeLogging() |
|
Log |
Logs exceptions in the applications public static void Log(Exception ex, Â Â Â Â LogLevels logLevel) public static void Log(string msg, Â Â Â Â Exception ex, Â Â Â Â bool unhandledException, Â Â Â Â LogLevels logLevel) |
|
LogInfo |
Logs an information message public static void LogInfo(string msg, Â Â Â Â LogLevels logLevel) |
|
LogLocal |
This method logs only to the local file, not to the online telemetry. Use primarily for informational messages and errors. public static void LogLocal(string msg, Â Â Â Â Exception ex) |
|
LogTrace |
Writes a trace message public static void LogTrace(string msg, Â Â Â Â LogLevels logLevel) |
|
SetTheme |
Sets the light or dark theme for a form. Call before InitializeComponents(). We only support the dark theme now so this no longer relevant but left in place in case we decide to support other themes. public static void SetTheme(Themes theme, Â Â Â Â MetroWindow window) |
|
SetThemeWindowOverride |
Overrides specific colors in the active theme depending on the currently active theme. Use this in every Metro Window form to apply base window styling. Affects:
public static void SetThemeWindowOverride(MetroWindow window, Â Â Â Â bool isMainWindow, Â Â Â Â string forceTheme) |
|
SetWorkingSet |
public static void SetWorkingSet(int lnMaxSize, Â Â Â Â int lnMinSize) |
|
Shutdown |
public static void Shutdown(bool errorShutdown) |
|
ShutdownLogging |
Shuts down the Application Insights Logging functionality and flushes any pending requests. This handles start and stop times and the application lifetime log entry that logs duration of operation. public static void ShutdownLogging() |
|
AllowedFileExtensions |
||
ApplicationName |
The full name of the application displayed on toolbar and dialogs |
|
Configuration |
Holds a static instance of the application's configuration settings |
|
Constants |
||
EncryptionMachineKey |
Returns a machine specific encryption key that can be used for passwords and other settings. If the Configuration.UseMachineEcryptionKeyForPasswords flag is false, no machine specific information is added to the key. Do this if you want to share your encrypted configuration settings in cloud based folders like DropBox, OneDrive, etc. |
|
GlobalConfiguration |
Explicit global configuration property, that unlike |
|
Model |
Holds a static instance of the Application Model |
|
NewLine |
||
OpenWindows |
A static class that holds singleton window references |
|
Started |
||
Urls |
Application related Urls used throughout the application |
Requirements
Namespace: MarkdownMonsterAssembly: markdownmonster.exe
© West Wind Technologies, 2016-2024 • Updated: 11/23/21
Comment or report problem with topic