Example #1
0
 private void preferencesToolStripMenuItem_Click(object sender, EventArgs e)
 {
     using (var dlg = new UserPreferencesDialog())
     {
         var sc = new ServiceContainer();
         var cfgSvc = new FakeConfigurationService();
         sc.AddService(typeof(IConfigurationService), cfgSvc);
         var uipSvc = new UiPreferencesService(cfgSvc, new FakeSettingsService());
         uipSvc.Load();
         sc.AddService(typeof(IUiPreferencesService), uipSvc);
         dlg.Services = sc;
         dlg.ShowDialog(this);
     }
 }