/// <summary> /// Constructor. /// </summary> public BiographyOrderReportsComponentControl(BiographyOrderReportsComponent component) : base(component) { _component = component; InitializeComponent(); Control reportPreview = (Control) _component.ReportPreviewComponentHost.ComponentView.GuiElement; reportPreview.Dock = DockStyle.Fill; _reportPreviewPanel.Controls.Add(reportPreview); _reports.DataSource = _component.Reports; _reports.DataBindings.Add("Value", _component, "SelectedReport", true, DataSourceUpdateMode.OnPropertyChanged); _reports.Format += delegate(object sender, ListControlConvertEventArgs e) { e.Value = _component.FormatReportListItem(e.ListItem); }; _toolbarActionModel = _component.ActionModel; ToolStripBuilder.BuildToolbar(_toolstrip.Items, _toolbarActionModel.ChildNodes); _component.AllPropertiesChanged += AllPropertiesChangedEventHandler; }
/// <summary> /// Constructor. /// </summary> public BiographyOrderReportsComponentControl(BiographyOrderReportsComponent component) : base(component) { _component = component; InitializeComponent(); Control reportPreview = (Control)_component.ReportPreviewComponentHost.ComponentView.GuiElement; reportPreview.Dock = DockStyle.Fill; _reportPreviewPanel.Controls.Add(reportPreview); _reports.DataSource = _component.Reports; _reports.DataBindings.Add("Value", _component, "SelectedReport", true, DataSourceUpdateMode.OnPropertyChanged); _reports.Format += delegate(object sender, ListControlConvertEventArgs e) { e.Value = _component.FormatReportListItem(e.ListItem); }; _toolbarActionModel = _component.ActionModel; ToolStripBuilder.BuildToolbar(_toolstrip.Items, _toolbarActionModel.ChildNodes); _component.AllPropertiesChanged += AllPropertiesChangedEventHandler; }
/// <summary> /// Called by the host to assign this view to a component. /// </summary> public void SetComponent(IApplicationComponent component) { _component = (BiographyOrderReportsComponent)component; }