public JoanMainWindowVm(JoanService joanService, Func <NewDownloadWindow> newDownload) { Downloads = new ReactiveList <DownloadItemVm>(); SelectedDownloads = new List <DownloadItemVm>(); _joanService = joanService; NewCommand = ReactiveCommand.Create(() => newDownload().ShowDialog()); //PauseCommand = ReactiveCommand.Create(() => _joanService.DownloadPause()); }
public App() { _builder = new ContainerBuilder(); _builder.RegisterType <Aria2Serivce>().AsSelf().SingleInstance(); _builder.RegisterType <JoanService>().AsSelf().SingleInstance(); _builder.RegisterType <Aria2Exe>().AsSelf().SingleInstance(); _builder.RegisterType <Presentation.JoanMainWindow>().AsSelf(); _builder.RegisterType <JoanMainWindowVm>().AsSelf(); _builder.RegisterType <Presentation.NewDownloadWindow>().AsSelf(); _builder.RegisterType <NewDownloadWindowVm>().AsSelf(); Container = _builder.Build(); _joanService = Container.Resolve <JoanService>(); Container.Resolve <Presentation.JoanMainWindow>().Show(); // Container.Resolve<Presentation.MainWindow>().Show(); }