math-suite/Source/Help/App.xaml.cs

43 lines
1.1 KiB
C#
Raw Normal View History

2018-02-05 23:24:46 +00:00
using System;
using System.Collections.Generic;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Windows;
namespace Help
{
/// <summary>
/// Interaction logic for App.xaml
/// </summary>
public partial class App : Application
{
protected override void OnStartup(StartupEventArgs e)
{
// We need to initialize the help system now
try
{
string file = DynamicLink.Launcher.FindHelpFiles();
if (System.IO.File.Exists(file))
HelpSystem.HelpManager.Load(file);
else Properties["ERROR"] = new Exception("Could not find index file documentation\\index.xml.");
}
catch (Exception ex)
{
Properties["ERROR"] = ex;
}
// Check if we were asked to load anything
if (e.Args.Length != 0)
{
Properties["APPLICATION"] = e.Args[0];
}
// Continue
base.OnStartup(e);
}
}
}