Added source code.
This commit is contained in:
42
Source/Help/App.xaml.cs
Normal file
42
Source/Help/App.xaml.cs
Normal file
@ -0,0 +1,42 @@
|
||||
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);
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user