fGraphD.pas 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134
  1. unit fGraphD;
  2. interface
  3. uses
  4. Winapi.Windows,
  5. Winapi.Messages,
  6. System.SysUtils,
  7. System.Variants,
  8. System.Classes,
  9. Vcl.Graphics,
  10. Vcl.Controls,
  11. Vcl.Forms,
  12. Vcl.Dialogs,
  13. Vcl.ExtCtrls,
  14. Vcl.Menus,
  15. Vcl.ComCtrls,
  16. fFxyD,
  17. fHeightFieldD,
  18. fPointsD,
  19. fProjectionD,
  20. fSplinesD;
  21. type
  22. TFormGraphD = class(TForm)
  23. PanelLeft: TPanel;
  24. tvGraph: TTreeView;
  25. MainMenu: TMainMenu;
  26. PageControl: TPageControl;
  27. tsFxy: TTabSheet;
  28. tsHeightField: TTabSheet;
  29. tsPoints: TTabSheet;
  30. tsProjection: TTabSheet;
  31. tsSplines: TTabSheet;
  32. procedure tvGraphClick(Sender: TObject);
  33. procedure FormCreate(Sender: TObject);
  34. procedure FormShow(Sender: TObject);
  35. procedure FormDestroy(Sender: TObject);
  36. private
  37. public
  38. end;
  39. var
  40. FormGraphD: TFormGraphD;
  41. implementation
  42. {$R *.dfm}
  43. procedure TFormGraphD.FormCreate(Sender: TObject);
  44. begin
  45. // Fxy
  46. FormFxy := TFormFxy.Create(tsFxy);
  47. FormFxy.Top := 10;
  48. FormFxy.Left := 10;
  49. FormFxy.Parent := tsFxy;
  50. FormFxy.Align := alClient;
  51. FormFxy.BorderStyle := bsNone;
  52. FormFxy.Show;
  53. // HeightField
  54. FormHeightField := TFormHeightField.Create(tsHeightField);
  55. FormHeightField.Top := 10;
  56. FormHeightField.Left := 10;
  57. FormHeightField.Parent := tsHeightField;
  58. FormHeightField.Align := alClient;
  59. FormHeightField.BorderStyle := bsNone;
  60. FormHeightField.Show;
  61. // Points
  62. FormPoints := TFormPoints.Create(tsPoints);
  63. FormPoints.Top := 10;
  64. FormPoints.Left := 10;
  65. FormPoints.Parent := tsPoints;
  66. FormPoints.Align := alClient;
  67. FormPoints.BorderStyle := bsNone;
  68. FormPoints.Show;
  69. // Projection
  70. FormProjection := TFormProjection.Create(tsProjection);
  71. FormProjection.Top := 10;
  72. FormProjection.Left := 10;
  73. FormProjection.Parent := tsProjection;
  74. FormProjection.Align := alClient;
  75. FormProjection.BorderStyle := bsNone;
  76. FormProjection.Show;
  77. // Splines
  78. FormSplines := TFormSplines.Create(tsSplines);
  79. FormSplines.Top := 10;
  80. FormSplines.Left := 10;
  81. FormSplines.Parent := tsSplines;
  82. FormSplines.Align := alClient;
  83. FormSplines.BorderStyle := bsNone;
  84. FormSplines.Show;
  85. end;
  86. procedure TFormGraphD.FormShow(Sender: TObject);
  87. begin
  88. PageControl.ActivePage := tsFxy;
  89. end;
  90. procedure TFormGraphD.tvGraphClick(Sender: TObject);
  91. begin
  92. tvGraph.Items[0].DropHighlighted := False;
  93. case tvGraph.Selected.Index of
  94. 0:
  95. PageControl.ActivePage := tsFxy;
  96. 1:
  97. PageControl.ActivePage := tsHeightField;
  98. 2:
  99. PageControl.ActivePage := tsPoints;
  100. 3:
  101. PageControl.ActivePage := tsProjection;
  102. 4:
  103. PageControl.ActivePage := tsSplines;
  104. end;
  105. end;
  106. procedure TFormGraphD.FormDestroy(Sender: TObject);
  107. begin
  108. FormFxy.Free;
  109. FormHeightField.Free;
  110. FormPoints.Free;
  111. FormProjection.Free;
  112. FormSplines.Free;
  113. end;
  114. end.