|
namespace TypograFix
{
using System.Windows;
using System.Windows.Threading;
using Properties;
/// <summary>
/// Interaction logic for App.xaml
/// </summary>
public sealed partial class App : Application
{
internal static ConversionOptions ConversionOptions { get; set; }
internal static string EntryText = string.Empty;
private void OnUnhandledException(object sender, DispatcherUnhandledExceptionEventArgs e)
{
MessageBox.Show(
"Unhandled exception: " + e,
"Unhandled exception", MessageBoxButton.OK);
}
private void Application_Startup(object sender, StartupEventArgs e)
{
ConversionOptions = new ConversionOptions();
if (Settings.Default != null &&
Settings.Default["EntryText"] != null)
{
string s = Settings.Default["EntryText"] as string;
if (!string.IsNullOrEmpty(s))
EntryText = s;
}
}
private void Application_Exit(object sender, ExitEventArgs e)
{
Settings.Default["EntryText"] = EntryText;
Settings.Default.Save();
}
}
}
|
By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.
If a file you wish to view isn't highlighted, and is a text file (not binary), please
let us know and we'll add colourisation support for it.
I work primarily with the .NET technology stack, and specialize in accelerated code production via code generation (static or dynamic), aspect-oriented programming, MDA, domain-specific languages and anything else that gets products out the door faster. My languages of choice are C# and C++, though I'm open to suggestions.