public ShipmentJourneyViewModel(INavigationService navigationService, ILightClient lightClient, IApplication polkadotApi, IDeviceService device, IToastService toast) : base(navigationService, lightClient, polkadotApi) { Device = device; Toast = toast; }
public ManageViewModel(INavigationService navigationService, ILightClient lightClient, IApplication polkadotApi) : base(navigationService, lightClient, polkadotApi) { Title = "Manage"; QueryChainStateCommand = new Command(QueryChainState); SignTransferCommand = new Command(SubmitTransferExtrinsic); SubmitExtrinsicCommand = new Command(SubmitRegisterShipmentExtrinsicAsync); }
public NodeLogsViewModel(INavigationService navigationService, ILightClient lightClient, IApplication polkadotApi) : base(navigationService, lightClient, polkadotApi) { Title = "Node logs"; logSubscription = LightClient.Logs.Subscribe(log => Device.BeginInvokeOnMainThread(() => Logs.Add(new LogRecord(log.Substring(0, 19), log.Substring(20)))) ); }
public ShipmentViewModel(INavigationService navigationService, ILightClient lightClient, IApplication polkadotApi, IDeviceService device, IToastService toast) : base(navigationService, lightClient, polkadotApi) { Device = device; Toast = toast; TrackShipmentCommand = new Command(async(op) => await TrackShipmentAsync(Enum.Parse <ShippingOperation>((string)op))); }
public MainViewModel(INavigationService navigationService, ILightClient lightClient, IApplication polkadotApi, IDeviceService deviceService, INodeService nodeService) : base(navigationService, lightClient, polkadotApi) { Title = "Substrate Enterprise Sample"; nodeService.BestBlock.Subscribe(block => deviceService.BeginInvokeOnMainThread(() => BestBlock = $"best #{block}")); }
public Lights( IDelay delayProvider, ILayerBuilder layerBuilder, ILightClient lightClient, TimeSpan?delay = null) { this.delayProvider = delayProvider; this.layerBuilder = layerBuilder; this.lightClient = lightClient; this.delay = delay ?? TimeSpan.FromMilliseconds(50); }
public TrackingViewModel(INavigationService navigationService, ILightClient lightClient, IApplication polkadotApi, IDeviceService device, IEventAggregator eventAggregator) : base(navigationService, lightClient, polkadotApi) { Device = device; EventAggregator = eventAggregator; Title = "Track"; RefreshCommand = new Command(async() => await RefreshAsync()); IsActiveChanged += OnIsActiveChanged; eventSubs = EventAggregator.GetEvent <ApiStatusEvent>().Subscribe(async status => { if (status == ApiStatus.ApiReady) { await LoadDataAsync(); } }); }
public SettingsViewModel(INavigationService navigationService, IDeviceService device, ILightClient lightClient, IApplication polkadotApi) : base(navigationService, lightClient, polkadotApi) { Title = "Settings"; ApplicationVersion = $"{Xamarin.Essentials.AppInfo.Name} v{Xamarin.Essentials.AppInfo.Version}"; Device = device; IsActiveChanged += OnIsActiveChanged; }
public TabViewModel(INavigationService navigationService, ILightClient lightClient, IApplication polkadotApi) : base(navigationService, lightClient, polkadotApi) { }
public BaseViewModel(INavigationService navigationService, ILightClient lightClient, IApplication polkadotApi) { NavigationService = navigationService; LightClient = lightClient; PolkadotApi = polkadotApi; }
public Lights( ILightClient lightClient, TimeSpan?delay = null) : this(new Delay(), new LayerBuilder(), lightClient, delay) { }