DocumentWindow.Mono.cs 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. using FastReport.Controls;
  2. using FastReport.Utils;
  3. using System.Drawing;
  4. using System.Windows.Forms;
  5. namespace FastReport.Design
  6. {
  7. internal class DocumentWindow : PageControlPage
  8. {
  9. private FRTabControl parent;
  10. public Control ParentControl
  11. {
  12. get { return parent; }
  13. }
  14. public void AddToTabControl(FRTabControl tabs)
  15. {
  16. var rescale = tabs.Dpi() / (float)this.Dpi();
  17. tabs.Tabs.Add(this);
  18. // WPF: solve weird rendering issue on a secondary monitor
  19. Application.DoEvents();
  20. this.Scale(new SizeF(rescale, rescale));
  21. parent = tabs;
  22. }
  23. public void Activate()
  24. {
  25. parent.SelectedTab = this;
  26. }
  27. public void Close()
  28. {
  29. parent.Tabs.Remove(this);
  30. Dispose();
  31. }
  32. public virtual void Localize()
  33. {
  34. }
  35. public virtual void UpdateDpiDependencies()
  36. {
  37. }
  38. public virtual void UpdateUIStyle()
  39. {
  40. }
  41. public DocumentWindow()
  42. {
  43. Dock = DockStyle.Fill;
  44. }
  45. }
  46. }