예제 #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);
         dlg.Services = sc;
         dlg.ShowDialog(this);
     }
 }
예제 #2
0
        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);
        }
예제 #3
0
        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);
        }
예제 #4
0
파일: ItpForm.cs 프로젝트: relaxar/reko
 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);
     }
 }