public void DisplayDataType(Program program, DataType dt) { if (dt == null) return; var pane = new CodeViewerPane(); var frame = ShowWindow("codeViewerWindow", dt.Name, dt, pane); pane.FrameWindow = frame; pane.DisplayDataType(program, dt); }
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); }