private void InitServices() { #if ENV_MASTER var serverInfo = new ServerInfo() { SSL = true, RootUrl = "api.nuviot.com", }; #elif ENV_STAGE var serverInfo = new ServerInfo() { SSL = true, RootUrl = "api.nuviot.com", }; #elif ENV_DEV var serverInfo = new ServerInfo() { SSL = true, RootUrl = "dev-api.nuviot.com", }; #elif ENV_LOCAL var serverInfo = new ServerInfo() { SSL = false, RootUrl = "localhost:5001", }; #endif /* Configuring he IoC is something like this...be warned * * https://www.youtube.com/watch?v=7-FbfkUD78w */ DeviceInfo.Register(); var clientAppInfo = new ClientAppInfo(); _appConfig = new AppConfig(); SLWIOC.RegisterSingleton <IClientAppInfo>(clientAppInfo); SLWIOC.RegisterSingleton <IAppConfig>(_appConfig); var navigation = new ViewModelNavigation(this); LagoVista.XPlat.Core.Startup.Init(this, navigation); LagoVista.Client.Core.Startup.Init(serverInfo); navigation.Add <MainViewModel, Views.MainView>(); navigation.Add <SplashViewModel, Views.SplashView>(); navigation.Add <MonitorInstanceViewModel, Views.MonitorInstanceView>(); navigation.Add <InstanceViewModel, Views.InstanceView>(); navigation.Add <ListenerViewModel, Views.ListenerView>(); navigation.Add <PipelineViewModel, Views.PipelineView>(); navigation.Add <PlannerViewModel, Views.PlannerView>(); navigation.Add <TelemetryViewModel, Views.TelemetryView>(); navigation.Start <SplashViewModel>(); SLWIOC.RegisterSingleton <IViewModelNavigation>(navigation); }
public static void Init(Xamarin.Forms.Application app, ViewModelNavigation nav) { nav.Add <LoginViewModel, LoginView>(); nav.Add <ChangePasswordViewModel, ChangePasswordView>(); nav.Add <SendResetPasswordLinkViewModel, SendResetPasswordView>(); nav.Add <ResetPasswordViewModel, ResetPasswordView>(); nav.Add <InviteUserViewModel, InviteUserView>(); nav.Add <RegisterUserViewModel, RegisterView>(); nav.Add <VerifyUserViewModel, VerifyUserView>(); nav.Add <OrgEditorViewModel, OrgEditorView>(); nav.Add <UserOrgsViewModel, UserOrgsView>(); nav.Add <AcceptInviteViewModel, AcceptInviteView>(); }
public App() { InitializeComponent(); MainPage = new MainPage(); #if ENV_STAGE var serverInfo = new ServerInfo() { SSL = true, RootUrl = "api.nuviot.com", }; #elif ENV_DEV var serverInfo = new ServerInfo() { SSL = true, RootUrl = "dev-api.nuviot.com", }; #elif ENV_LOCALDEV var serverInfo = new ServerInfo() { SSL = false, RootUrl = "localhost:5001", }; #elif ENV_MASTER var serverInfo = new ServerInfo() { SSL = true, RootUrl = "api.nuviot.com", }; #endif var clientAppInfo = new ClientAppInfo(); var _appConfig = new AppConfig(); SLWIOC.RegisterSingleton <IClientAppInfo>(clientAppInfo); SLWIOC.RegisterSingleton <IAppConfig>(_appConfig); var navigation = new ViewModelNavigation(this); LagoVista.XPlat.Core.Startup.Init(this, navigation); LagoVista.Client.Core.Startup.Init(serverInfo); navigation.Add <MainViewModel, Views.MainPage>(); navigation.Add <SplashViewModel, Views.SplashView>(); navigation.Start <SplashViewModel>(); SLWIOC.RegisterSingleton <IViewModelNavigation>(navigation); }
private void InitServices() { #if ENV_STAGE var serverInfo = new ServerInfo() { SSL = true, RootUrl = "api.nuviot.com", }; #elif ENV_DEV var serverInfo = new ServerInfo() { SSL = true, RootUrl = "dev-api.nuviot.com", }; #elif ENV_LOCALDEV var serverInfo = new ServerInfo() { SSL = false, RootUrl = "localhost:5001", }; #elif ENV_MASTER var serverInfo = new ServerInfo() { SSL = true, RootUrl = "api.nuviot.com", }; #endif var clientAppInfo = new ClientAppInfo(); DeviceInfo.Register(); SLWIOC.Register <IMavLinkMessageParser, MavLinkMessageParser>(); SLWIOC.Register <ISerialTelemetryLink, SerialTelemetryLink>(); SLWIOC.Register <IDroneAdapter, APMDroneAdapter>(); SLWIOC.Register <IMissionPlanner, MissionPlanner>(); SLWIOC.RegisterSingleton <IClientAppInfo>(clientAppInfo); SLWIOC.RegisterSingleton <IAppConfig>(new AppConfig()); var navigation = new ViewModelNavigation(this); XPlat.Core.Startup.Init(this, navigation); Startup.Init(serverInfo); navigation.Add <MainViewModel, Views.MainPage>(); navigation.Add <SplashViewModel, Views.SplashView>(); navigation.Start <SplashViewModel>(); SLWIOC.RegisterSingleton <IViewModelNavigation>(navigation); }
private void InitServices() { #if ENV_STAGE var serverInfo = new ServerInfo() { SSL = true, RootUrl = "api.nuviot.com", }; #elif ENV_DEV var serverInfo = new ServerInfo() { SSL = true, RootUrl = "dev-api.nuviot.com", }; #elif ENV_LOCALDEV var serverInfo = new ServerInfo() { SSL = false, RootUrl = "localhost:5001", }; #elif ENV_MASTER var serverInfo = new ServerInfo() { SSL = true, RootUrl = "api.nuviot.com", }; #endif var clientAppInfo = new ClientAppInfo(); _appConfig = new AppConfig(); SLWIOC.RegisterSingleton <IClientAppInfo>(clientAppInfo); SLWIOC.RegisterSingleton <IAppConfig>(_appConfig); var navigation = new ViewModelNavigation(this); LagoVista.XPlat.Core.Startup.Init(this, navigation); LagoVista.Client.Core.Startup.Init(serverInfo, new AppStyle()); navigation.Add <MainViewModel, Views.MainView>(); navigation.Add <DeviceExplorerViewModel, Views.DeviceExplorerView>(); navigation.Add <ProvisionDeviceViewModel, Views.ProvisionDeviceView>(); navigation.Add <DeviceTypePickerViewModel, Views.DeviceTypePickerView>(); navigation.Add <MonitorDeviceViewModel, Views.MonitorDeviceView>(); navigation.Add <DeviceMapViewModel, Views.DeviceMapView>(); navigation.Add <ManageDeviceViewModel, Views.ManageDeviceView>(); navigation.Add <SplashViewModel, Views.SplashView>(); navigation.Start <SplashViewModel>(); SLWIOC.Register <IDeviceManagementClient, DeviceManagementClient>(); SLWIOC.RegisterSingleton <IViewModelNavigation>(navigation); }
private void InitServices() { #if ENV_PROD var serverInfo = new ServerInfo() { SSL = true, RootUrl = "api.nuviot.com", }; #elif ENV_DEV var serverInfo = new ServerInfo() { SSL = true, RootUrl = "dev-api.nuviot.com", }; #elif ENV_LOCAL var serverInfo = new ServerInfo() { SSL = false, RootUrl = "localhost:5001", }; #elif ENV_LIVE var serverInfo = new ServerInfo() { SSL = true, RootUrl = "api.nuviot.com", }; #endif /* Configuring he IoC is something like this...be warned * * https://www.youtube.com/watch?v=7-FbfkUD78w */ var clientAppInfo = new ClientAppInfo(); SLWIOC.RegisterSingleton <IClientAppInfo>(clientAppInfo); SLWIOC.RegisterSingleton <IAppConfig>(new AppConfig()); var navigation = new ViewModelNavigation(this); LagoVista.XPlat.Core.Startup.Init(this, navigation); LagoVista.Client.Core.Startup.Init(serverInfo); navigation.Add <MainViewModel, Views.MainView>(); navigation.Add <DeviceExplorerViewModel, Views.DeviceExplorerView>(); navigation.Add <ProvisionDeviceViewModel, Views.ProvisionDeviceView>(); navigation.Add <DeviceTypePickerViewModel, Views.DeviceTypePickerView>(); navigation.Add <MonitorDeviceViewModel, Views.MonitorDeviceView>(); navigation.Add <ManageDeviceViewModel, Views.ManageDeviceView>(); navigation.Add <SplashViewModel, Views.SplashView>(); navigation.Start <SplashViewModel>(); SLWIOC.RegisterSingleton <IViewModelNavigation>(navigation); }
private void InitServices() { var serverInfo = new ServerInfo() { SSL = true, RootUrl = "dev-api.nuviot.com", }; var clientAppInfo = new ClientAppInfo() { MainViewModel = typeof(MainViewModel) }; DeviceInfo.Register(); SLWIOC.RegisterSingleton <IAppConfig>(new AppConfig()); LagoVista.Client.Core.Startup.Init(serverInfo); SLWIOC.RegisterSingleton <IClientAppInfo>(clientAppInfo); var navigation = new ViewModelNavigation(this); navigation.Add <MainViewModel, MainPage>(); navigation.Add <ServicesViewModel, ServicesView>(); navigation.Add <SecureStorageViewModel, SecureStorageView>(); navigation.Add <ControlSampleViewModel, ControlSampleView>(); navigation.Add <ViewModel2, Model2View>(); SLWIOC.RegisterSingleton <IViewModelNavigation>(navigation); try { LagoVista.XPlat.Core.Startup.Init(this, navigation); } catch (Exception ex) { System.Diagnostics.Debug.WriteLine(ex.Message); } navigation.Start <MainViewModel>(); }
private void InitServices() { #if ENV_STAGE var serverInfo = new ServerInfo() { SSL = true, RootUrl = "api.nuviot.com", }; #elif ENV_DEV var serverInfo = new ServerInfo() { SSL = true, RootUrl = "dev-api.nuviot.com", }; #elif ENV_LOCALDEV var serverInfo = new ServerInfo() { SSL = false, RootUrl = "localhost:5001", }; #elif ENV_MASTER var serverInfo = new ServerInfo() { SSL = true, RootUrl = "api.nuviot.com", }; #endif var clientAppInfo = new ClientAppInfo(); DeviceInfo.Register(); SLWIOC.Register <IHeartBeatManager, HeartBeatManager>(); SLWIOC.Register <IMissionPlanner, MissionPlanner>(); SLWIOC.Register <Uas.Core.INavigation, Uas.Core.Services.Navigation>(); SLWIOC.RegisterSingleton <IClientAppInfo>(clientAppInfo); SLWIOC.RegisterSingleton <IAppConfig>(new AppConfig()); SLWIOC.RegisterSingleton <IConfigurationManager>(new ConfigurationManager()); SLWIOC.RegisterSingleton <ITelemetryService, TelemetryService>(); SLWIOC.RegisterSingleton <IConnectedUasManager>(new ConnectedUasManager()); SLWIOC.Register <IDeviceManagementClient, DeviceManagementClient>(); var navigation = new ViewModelNavigation(this); XPlat.Core.Startup.Init(this, navigation); Startup.Init(serverInfo); navigation.Add <MotorsTestViewModel, Views.Testing.MotorTestsView>(); navigation.Add <CompassCalibrationViewModel, Views.Calibration.CompassCalibrationView>(); navigation.Add <AccCalibrationViewModel, Views.Calibration.AccCalibrationView>(); navigation.Add <MissionPlannerViewModel, Views.Missions.MissionPlannerView>(); navigation.Add <UasDetailViewModel, Views.Uas.UasDetail>(); navigation.Add <UasManagerViewModel, Views.Uas.UasManager>(); navigation.Add <UasTypeManagerViewModel, Views.Uas.UasTypeManager>(); navigation.Add <MainViewModel, Views.MainPage>(); navigation.Add <HudViewModel, Views.HudView>(); navigation.Add <SplashViewModel, Views.SplashView>(); navigation.Start <SplashViewModel>(); SLWIOC.RegisterSingleton <IViewModelNavigation>(navigation); }
private void InitServices() { #if ENV_PROD var serverInfo = new ServerInfo() { SSL = true, RootUrl = "api.nuviot.com", }; #elif ENV_DEV var serverInfo = new ServerInfo() { SSL = true, RootUrl = "dev-api.nuviot.com", }; #elif ENV_LOCAL var serverInfo = new ServerInfo() { SSL = false, RootUrl = "localhost:5001", }; #elif ENV_TEST var serverInfo = new ServerInfo() { SSL = true, RootUrl = "test-api.nuviot.com", }; #endif /* Configuring the IoC is something like this...be warned * * https://www.youtube.com/watch?v=7-FbfkUD78w */ var clientAppInfo = new ClientAppInfo() { MainViewModel = typeof(MainViewModel) }; SLWIOC.RegisterSingleton <IClientAppInfo>(clientAppInfo); SLWIOC.RegisterSingleton <IAppConfig>(new AppConfig()); var navigation = new ViewModelNavigation(this); LagoVista.XPlat.Core.Startup.Init(this, navigation); LagoVista.Client.Core.Startup.Init(serverInfo); navigation.Add <MainViewModel, Views.MainView>(); navigation.Add <SimulatorViewModel, Views.Simulator.SimulatorView>(); navigation.Add <SimulatorEditorViewModel, Views.Simulator.SimulatorEditorView>(); navigation.Add <MessageEditorViewModel, Views.Messages.MessageEditorView>(); navigation.Add <SendMessageViewModel, Views.Messages.SendMessageView>(); navigation.Add <MessageHeaderViewModel, Views.Messages.MessageHeaderView>(); navigation.Add <DynamicAttributeViewModel, Views.Messages.DynamicAttributeView>(); navigation.Add <SplashViewModel, Views.SplashView>(); navigation.Start <SplashViewModel>(); SLWIOC.Register <IMQTTAppClient, MQTTAppClient>(); SLWIOC.Register <IMQTTDeviceClient, MQTTDeviceClient>(); SLWIOC.RegisterSingleton <IViewModelNavigation>(navigation); }
private void InitServices() { _appConfig = new AppConfig(); #if ENV_MASTER var serverInfo = new ServerInfo() { SSL = true, RootUrl = "api.nuviot.com", }; _appConfig.Environment = Environments.Production; #elif ENV_DEV var serverInfo = new ServerInfo() { SSL = true, RootUrl = "dev-api.nuviot.com", }; _appConfig.Environment = Environments.Development; #elif ENV_LOCAL var serverInfo = new ServerInfo() { SSL = false, RootUrl = "localhost:5001", }; _appConfig.Environment = Environments.Local; #elif ENV_STAGE var serverInfo = new ServerInfo() { SSL = true, RootUrl = "stage-api.nuviot.com", }; _appConfig.Environment = Environments.Staging; #endif var clientAppInfo = new ClientAppInfo() { MainViewModel = typeof(MainViewModel) }; DeviceInfo.Register(); var deviceInfo = SLWIOC.Get <IDeviceInfo>(); SLWIOC.RegisterSingleton <IClientAppInfo>(clientAppInfo); SLWIOC.RegisterSingleton <IAppConfig>(_appConfig); var navigation = new ViewModelNavigation(this); LagoVista.XPlat.Core.Startup.Init(this, navigation); LagoVista.Client.Core.Startup.Init(serverInfo); navigation.Add <MainViewModel, Views.MainView>(); navigation.Add <SimulatorViewModel, Views.Simulator.SimulatorView>(); navigation.Add <SimulatorEditorViewModel, Views.Simulator.SimulatorEditorView>(); navigation.Add <MessageEditorViewModel, Views.Messages.MessageEditorView>(); navigation.Add <SendMessageViewModel, Views.Messages.SendMessageView>(); navigation.Add <MessageHeaderViewModel, Views.Messages.MessageHeaderView>(); navigation.Add <PasswordEntryViewModel, Views.Simulator.PasswordEntryView>(); navigation.Add <UnlockStorageViewModel, Views.Simulator.UnlockStorageView>(); navigation.Add <SetStoragePasswordViewModel, Views.Simulator.SetStoragePasswordView>(); navigation.Add <DynamicAttributeViewModel, Views.Messages.DynamicAttributeView>(); navigation.Add <SplashViewModel, Views.SplashView>(); navigation.Start <SplashViewModel>(); SLWIOC.Register <IMQTTAppClient, MQTTAppClient>(); SLWIOC.Register <IMQTTDeviceClient, MQTTDeviceClient>(); SLWIOC.RegisterSingleton <IViewModelNavigation>(navigation); }