NestedDockingStatus.cs
上传用户:szlfmled
上传日期:2020-11-22
资源大小:978k
文件大小:3k
源码类别:

C#编程

开发平台:

C#

  1. using System;
  2. using System.Drawing;
  3. namespace WeifenLuo.WinFormsUI.Docking
  4. {
  5. public sealed class NestedDockingStatus
  6. {
  7. internal NestedDockingStatus(DockPane pane)
  8. {
  9. m_dockPane = pane;
  10. }
  11. private DockPane m_dockPane = null;
  12. public DockPane DockPane
  13. {
  14. get { return m_dockPane; }
  15. }
  16. private NestedPaneCollection m_nestedPanes = null;
  17. public NestedPaneCollection NestedPanes
  18. {
  19. get { return m_nestedPanes; }
  20. }
  21. private DockPane m_previousPane = null;
  22. public DockPane PreviousPane
  23. {
  24. get { return m_previousPane; }
  25. }
  26. private DockAlignment m_alignment = DockAlignment.Left;
  27. public DockAlignment Alignment
  28. {
  29. get { return m_alignment; }
  30. }
  31. private double m_proportion = 0.5;
  32. public double Proportion
  33. {
  34. get { return m_proportion; }
  35. }
  36. private bool m_isDisplaying = false;
  37. public bool IsDisplaying
  38. {
  39. get { return m_isDisplaying; }
  40. }
  41. private DockPane m_displayingPreviousPane = null;
  42. public DockPane DisplayingPreviousPane
  43. {
  44. get { return m_displayingPreviousPane; }
  45. }
  46. private DockAlignment m_displayingAlignment = DockAlignment.Left;
  47. public DockAlignment DisplayingAlignment
  48. {
  49. get { return m_displayingAlignment; }
  50. }
  51. private double m_displayingProportion = 0.5;
  52. public double DisplayingProportion
  53. {
  54. get { return m_displayingProportion; }
  55. }
  56. private Rectangle m_logicalBounds = Rectangle.Empty; 
  57. public Rectangle LogicalBounds
  58. {
  59. get { return m_logicalBounds; }
  60. }
  61. private Rectangle m_paneBounds = Rectangle.Empty;
  62. public Rectangle PaneBounds
  63. {
  64. get { return m_paneBounds; }
  65. }
  66. private Rectangle m_splitterBounds = Rectangle.Empty;
  67. public Rectangle SplitterBounds
  68. {
  69. get { return m_splitterBounds; }
  70. }
  71. internal void SetStatus(NestedPaneCollection nestedPanes, DockPane previousPane, DockAlignment alignment, double proportion)
  72. {
  73. m_nestedPanes = nestedPanes;
  74. m_previousPane = previousPane;
  75. m_alignment = alignment;
  76. m_proportion = proportion;
  77. }
  78. internal void SetDisplayingStatus(bool isDisplaying, DockPane displayingPreviousPane, DockAlignment displayingAlignment, double displayingProportion)
  79. {
  80. m_isDisplaying = isDisplaying;
  81. m_displayingPreviousPane = displayingPreviousPane;
  82. m_displayingAlignment = displayingAlignment;
  83. m_displayingProportion = displayingProportion;
  84. }
  85. internal void SetDisplayingBounds(Rectangle logicalBounds, Rectangle paneBounds, Rectangle splitterBounds)
  86. {
  87. m_logicalBounds = logicalBounds;
  88. m_paneBounds = paneBounds;
  89. m_splitterBounds = splitterBounds;
  90. }
  91. }
  92. }