12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364 |
- using FastReport.DevComponents.DotNetBar;
- using System.Drawing;
- using System.Windows.Forms;
- namespace FastReport.Design
- {
- internal class DocumentWindow : TabItem
- {
- public Control ParentControl
- {
- get { return AttachedControl; }
- }
- public void AddToTabControl(FastReport.DevComponents.DotNetBar.TabControl tabs)
- {
- TabControlPanel panel = AttachedControl as TabControlPanel;
- tabs.Tabs.Add(this);
- tabs.Controls.Add(panel);
- tabs.ApplyDefaultPanelStyle(panel);
- panel.Padding = new System.Windows.Forms.Padding(0);
- if (tabs.Style == eTabStripStyle.VS2005Document)
- {
- panel.Style.BorderSide = eBorderSide.Bottom;
- panel.Padding = new System.Windows.Forms.Padding(0, 0, 0, 1);
- panel.Style.BorderColor.Color = SystemColors.ControlDark;
- }
- }
- public void Activate()
- {
- Parent.SelectedTab = this;
- }
- public void Close()
- {
- Parent.Tabs.Remove(this);
- Dispose();
- }
- public virtual void Localize()
- {
- }
- public virtual void UpdateDpiDependencies()
- {
- }
- public virtual void UpdateUIStyle()
- {
- }
- public DocumentWindow()
- {
- TabControlPanel panel = new TabControlPanel();
- // size is required in order to restore splitter distance correctly
- panel.Size = new Size(1000, 500);
- panel.Dock = DockStyle.Fill;
- panel.TabItem = this;
- AttachedControl = panel;
- }
- }
- }
|