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); dlg.Services = sc; dlg.ShowDialog(this); } }
private void symbolSourcesToolStripMenuItem_Click(object sender, EventArgs e) { var sc = new ServiceContainer(); var cfgSvc = new FakeConfigurationService(); var fsSvc = new FileSystemServiceImpl(); var uiSvc = new FakeDecompilerShellUiService(this); sc.AddService <IConfigurationService>(cfgSvc); sc.AddService <IFileSystemService>(fsSvc); sc.AddService <IDecompilerShellUiService>(uiSvc); var dlg = new SymbolSourceDialog(); dlg.Services = sc; dlg.ShowDialog(this); }
public CodeViewerFrame() { InitializeComponent(); var pane = new CodeViewerPane(); pane.FrameWindow = this; Pane = pane; var sc = new ServiceContainer(); var uiSvc = new FakeDecompilerShellUiService(); var cfgSvc = new FakeConfigurationService(); sc.AddService(typeof(IDecompilerShellUiService), uiSvc); sc.AddService(typeof(IConfigurationService), cfgSvc); var uipSvc = new UiPreferencesService(cfgSvc, new FakeSettingsService()); uipSvc.Load(); sc.AddService(typeof(IUiPreferencesService), uipSvc); pane.SetSite(sc); var ctrl = pane.CreateControl(); ctrl.Dock = DockStyle.Fill; pane.DisplayDataType(new Reko.Core.Program(), CreateDataType()); Controls.Add(ctrl); }
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); } }