2017-02-27 02:06:48 +08:00
|
|
|
|
using Plane.FormationCreator.Formation;
|
|
|
|
|
using Plane.FormationCreator.ViewModels;
|
|
|
|
|
using Plane.Logging;
|
|
|
|
|
using GalaSoft.MvvmLight.Ioc;
|
|
|
|
|
using Microsoft.Practices.ServiceLocation;
|
|
|
|
|
using System;
|
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
using System.Linq;
|
|
|
|
|
using System.Text;
|
|
|
|
|
using System.Threading.Tasks;
|
|
|
|
|
|
|
|
|
|
namespace Plane.FormationCreator
|
|
|
|
|
{
|
|
|
|
|
public class ServiceLocatorConfigurer
|
|
|
|
|
{
|
|
|
|
|
public static ServiceLocatorConfigurer Instance { get; } = new ServiceLocatorConfigurer();
|
|
|
|
|
|
|
|
|
|
private ServiceLocatorConfigurer()
|
|
|
|
|
{
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private SimpleIoc _container = SimpleIoc.Default;
|
|
|
|
|
|
|
|
|
|
public void Configure()
|
|
|
|
|
{
|
|
|
|
|
ServiceLocator.SetLocatorProvider(() => _container);
|
|
|
|
|
|
|
|
|
|
_container.Register<MainViewModel>();
|
|
|
|
|
_container.Register<ConnectViewModel>();
|
|
|
|
|
_container.Register<MapViewModel>();
|
|
|
|
|
_container.Register<ControlPanelViewModel>();
|
|
|
|
|
_container.Register<CopterListViewModel>();
|
|
|
|
|
_container.Register<TaskBarViewModel>();
|
2018-11-03 10:25:21 +08:00
|
|
|
|
_container.Register<View3DViewModel>();
|
2017-02-27 02:06:48 +08:00
|
|
|
|
_container.Register<ModifyTaskViewModel>();
|
2018-12-21 11:27:53 +08:00
|
|
|
|
_container.Register<CalibrationViewModel>();
|
2020-02-25 03:50:34 +08:00
|
|
|
|
_container.Register<LoginViewModel>();
|
|
|
|
|
_container.Register<ChangePasswordViewModel>();
|
2019-03-23 21:43:51 +08:00
|
|
|
|
_container.Register<GroupsViewModel>();
|
2019-11-15 11:14:00 +08:00
|
|
|
|
_container.Register<RtcmInfoViewModel>();
|
2019-12-11 20:39:44 +08:00
|
|
|
|
_container.Register<ConfigVirtualIdViewModel>();
|
2017-02-27 02:06:48 +08:00
|
|
|
|
|
|
|
|
|
_container.Register<ILogger>(() => new LocalFileLogger(new DebugLogger()));
|
|
|
|
|
|
2019-03-23 21:43:51 +08:00
|
|
|
|
_container.Register<GroupManager>();
|
2017-02-27 02:06:48 +08:00
|
|
|
|
_container.Register<CopterManager>();
|
|
|
|
|
_container.Register<MapManager>();
|
2018-12-21 11:27:53 +08:00
|
|
|
|
_container.Register<View3DManager>();
|
2017-02-27 02:06:48 +08:00
|
|
|
|
_container.Register<FlightTaskManager>();
|
|
|
|
|
|
|
|
|
|
_container.Register<FormationController>();
|
2019-11-15 11:14:00 +08:00
|
|
|
|
_container.Register<RtcmManager>();
|
2017-02-27 02:06:48 +08:00
|
|
|
|
|
|
|
|
|
_container.Register<AppConfig>();
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|