using System;
using System.Collections.Generic;
using JD.Core;
using JD.CrashReporter;
using JD.GameLauncher;
using JD.Soundwich;
using Plume.Application.WPF.Actions.File;
using Plume.Bloomberg;
using Plume.Interfaces.Services;
using Plume.Interfaces.WPF.Modules;
using Plume.Interfaces.WPF.ToolBar;
using Plume.MetaData.ElasticSearch;
using Plume.MetaData.Service.Implementation;
using Plume.Output;
using Plume.Perforce;
using Plume.Perforce.Service.Implementation;
using Plume.Properties;
using Plume.Tracking;
using Plume.Tracking.Service.Implementation;
namespace Soundwich
{
///
/// Interaction logic for App.xaml
///
public partial class App
{
public App()
{
InitializeComponent();
ApplicationReady += Setup;
}
///
/// Application setup
///
private void Setup(object sender, EventArgs e)
{
//remove menu File -> Open
MenuManager.RemoveMenuItem(ActionManager.Get());
//TODO: JIRA 1729
var toolbarItems = ToolBarManager.GetToolBar(ToolBarName.Standard).Items;
if (toolbarItems.Count >= 1)
{
//toolbarItems[1] is the position of the "Open" action by default. This line replaces the "Open" button by the "Open Project" one.
toolbarItems[1] = ToolBarManager.CreateButton(ActionManager.Get());
}
}
///
protected override IEnumerable SetupModules()
{
//JiraConfiguration
yield return new WpfModuleInfo(new PropertiesModule());
yield return new WpfModuleInfo(new PerforceModule(), new PerforceModuleSetup { DefaultPerforceHost = "p4-jd-data-mrc.ubisoft.org:1808" });
yield return new WpfModuleInfo(new OutputModule());
yield return new WpfModuleInfo(new GameLauncherModule());
yield return new WpfModuleInfo(new ToolCrashReporterModule());
yield return new WpfModuleInfo(new SoundwichModule());
yield return new WpfModuleInfo(new TrackingModule(), new TrackingModuleSetup
{
Environment = JDDefinitions.Instance.EnvironmentName,
ConnectionSettings = new ConnectionSettings { EnableDebugMode = false, Uri = JDDefinitions.Instance.ElasticSearchUri }
});
}
///
protected override IEnumerable SetupServices()
{
yield return new PerforceService();
yield return new BloombergService();
yield return new MetaDataService();
yield return new TrackingService(new ClientDetails());
}
}
}