86 lines
2.8 KiB
C#
86 lines
2.8 KiB
C#
using System.Collections.Generic;
|
|
using System.Windows;
|
|
using JD.Core;
|
|
using JD.CrashReporter;
|
|
using JD.EngineLogger;
|
|
using JD.GameLauncher;
|
|
using JD.Plugin.WPF.Module;
|
|
using JD.Remoting.Services;
|
|
using JD.Remoting.WPF;
|
|
using Plume.Application.WPF;
|
|
using Plume.Bloomberg;
|
|
using Plume.Interfaces.Services;
|
|
using Plume.Interfaces.WPF.Actions;
|
|
using Plume.Interfaces.WPF.Menu;
|
|
using Plume.Interfaces.WPF.Modules;
|
|
using Plume.MetaData.ElasticSearch;
|
|
using Plume.MetaData.Service.Implementation;
|
|
using Plume.Tracking;
|
|
using Plume.Tracking.Service.Implementation;
|
|
|
|
namespace WarningTool
|
|
{
|
|
/// <inheritdoc />
|
|
/// <summary>
|
|
/// Interaction logic for App.xaml
|
|
/// </summary>
|
|
public partial class App : WpfApplication
|
|
{
|
|
public App()
|
|
{
|
|
Title = "Warning Tool";
|
|
}
|
|
|
|
/// <inheritdoc />
|
|
protected override void OnApplicationReady()
|
|
{
|
|
base.OnApplicationReady();
|
|
|
|
var pluginService = ServiceManager.GetPluginService();
|
|
pluginService.Start();
|
|
}
|
|
|
|
/// <inheritdoc />
|
|
public override bool HasDocumentWorkspace => false;
|
|
|
|
/// <inheritdoc />
|
|
public override Size InitialWindowSize => new Size(800, 650);
|
|
|
|
/// <inheritdoc />
|
|
protected override IEnumerable<WpfModuleInfo> SetupModules()
|
|
{
|
|
yield return new WpfModuleInfo(new EngineLoggerModule());
|
|
yield return new WpfModuleInfo(new RemotingModule());
|
|
yield return new WpfModuleInfo(new GameLauncherModule());
|
|
yield return new WpfModuleInfo(new PluginModule());
|
|
yield return new WpfModuleInfo(new ToolCrashReporterModule());
|
|
yield return new WpfModuleInfo(new TrackingModule(), new TrackingModuleSetup
|
|
{
|
|
Environment = JDDefinitions.Instance.EnvironmentName,
|
|
ConnectionSettings = new ConnectionSettings { EnableDebugMode = false, Uri = JDDefinitions.Instance.ElasticSearchUri }
|
|
});
|
|
}
|
|
|
|
/// <inheritdoc />
|
|
protected override IEnumerable<IService> SetupServices()
|
|
{
|
|
yield return new PluginService();
|
|
yield return new BloombergService();
|
|
yield return new MetaDataService();
|
|
yield return new TrackingService(new ClientDetails());
|
|
}
|
|
|
|
/// <inheritdoc />
|
|
protected override void OnMenuInitialization()
|
|
{
|
|
base.OnMenuInitialization();
|
|
IMenuManager menuService = MenuManager;
|
|
menuService.GetMenuItem("_File").Items.Clear();
|
|
menuService.AddMenuItem("_File", ActionManager.Get(StandardAction.ShowSettingsDialog));
|
|
menuService.AddSeparator("_File");
|
|
menuService.AddMenuItem("_File", ActionManager.Get(StandardAction.Exit));
|
|
|
|
menuService.RemoveMenu("_Edit");
|
|
}
|
|
}
|
|
}
|