12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455 |
- using FastReport.Controls;
- using FastReport.Utils;
- using System.Drawing;
- using System.Windows.Forms;
- namespace FastReport.Design
- {
- internal class DocumentWindow : PageControlPage
- {
- private FRTabControl parent;
- public Control ParentControl
- {
- get { return parent; }
- }
- public void AddToTabControl(FRTabControl tabs)
- {
- var rescale = tabs.Dpi() / (float)this.Dpi();
- tabs.Tabs.Add(this);
- // WPF: solve weird rendering issue on a secondary monitor
- Application.DoEvents();
- this.Scale(new SizeF(rescale, rescale));
- parent = tabs;
- }
- 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()
- {
- Dock = DockStyle.Fill;
- }
- }
- }
|