/// <inheritdoc/> public override void ShowInView(IHtmlView htmlView, KeyValueList <string, string> variables) { base.ShowInView(htmlView, variables); _viewModel = new MergeChoiceViewModel( Ioc.GetOrCreate <INavigationService>(), Ioc.GetOrCreate <ILanguageService>(), Ioc.GetOrCreate <ISvgIconService>(), Ioc.GetOrCreate <IBaseUrlService>(), Ioc.GetOrCreate <IStoryBoardService>()); Bindings.BindCommand("GoBack", _viewModel.GoBackCommand); Bindings.BindCommand("UseMergedRepository", _viewModel.UseMergedRepositoryCommand); Bindings.BindCommand("UseCloudRepository", _viewModel.UseCloudRepositoryCommand); Bindings.BindCommand("UseLocalRepository", _viewModel.UseLocalRepositoryCommand); string html = _viewService.GenerateHtml(_viewModel); View.LoadHtml(html); }
/// <inheritdoc/> public override void ShowInView(IHtmlView htmlView, KeyValueList<string, string> variables, Navigation redirectedFrom) { base.ShowInView(htmlView, variables,redirectedFrom); _viewModel = new MergeChoiceViewModel( Ioc.GetOrCreate<INavigationService>(), Ioc.GetOrCreate<ILanguageService>(), Ioc.GetOrCreate<ISvgIconService>(), Ioc.GetOrCreate<IThemeService>(), Ioc.GetOrCreate<IBaseUrlService>(), Ioc.GetOrCreate<IStoryBoardService>()); VueBindingShortcut[] shortcuts = new[] { new VueBindingShortcut(VueBindingShortcut.KeyEscape, nameof(MergeChoiceViewModel.CancelCommand)), }; VueBindings = new VueDataBinding(_viewModel, View, shortcuts); _viewModel.VueDataBindingScript = VueBindings.BuildVueScript(); VueBindings.StartListening(); string html = _viewService.GenerateHtml(_viewModel); View.LoadHtml(html); }