private static DialogRegistrator RegisterDialogs(Window wnd) { DialogRegistrator dialogRegistrator = new DialogRegistrator(wnd); dialogRegistrator.Register <AboutDialogViewModel, AboutWindow>(); dialogRegistrator.Register <SavePresetDialogViewModel, SavePresetDialogWindow>(); dialogRegistrator.Register <RenamePresetDialogViewModel, RenamePresetDialogWindow>(); return(dialogRegistrator); }
private static UnityContainer RegisterTypes(DialogRegistrator dialogRegistrator, CycleBellManager manager) { var container = new UnityContainer(); container.RegisterInstance <IDialogRegistrator>(dialogRegistrator); var alarm = new Alarm(new MediaPlayerFactory()); alarm.LoadDefaultSoundCollection(); alarm.SetDefaultSound(); container.RegisterInstance <IAlarm>(alarm); container.RegisterInstance <ICycleBellManager>(manager); container.RegisterType <MainViewModel>(); return(container); }