Class mmApp

Application class for Markdown Monster that provides a global static placeholder for configuration and some utility functions

System.Object
  MarkdownMonster.mmApp
public class mmApp : object

Class Members

MemberDescription

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:

  • Title Brush, Active Title Brush * Window Border

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 Configuration always returns the global configuration.

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: MarkdownMonster
Assembly: markdownmonster.exe

© West Wind Technologies, 1996-2021 • Updated: 11/23/21
Comment or report problem with topic