fGraphD.pas 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110
  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. private
  36. public
  37. end;
  38. var
  39. FormGraphD: TFormGraphD;
  40. implementation
  41. {$R *.dfm}
  42. procedure TFormGraphD.FormCreate(Sender: TObject);
  43. begin
  44. // Fxy
  45. FormFxy := TFormFxy.Create(tsFxy);
  46. FormFxy.Parent := tsFxy;
  47. FormFxy.Align := alClient;
  48. FormFxy.BorderStyle := bsNone;
  49. FormFxy.Show;
  50. // HeightField
  51. FormHeightField := TFormHeightField.Create(tsHeightField);
  52. FormHeightField.Parent := tsHeightField;
  53. FormHeightField.Align := alClient;
  54. FormHeightField.BorderStyle := bsNone;
  55. FormHeightField.Show;
  56. // Points
  57. FormPoints := TFormPoints.Create(tsPoints);
  58. FormPoints.Parent := tsPoints;
  59. FormPoints.Align := alClient;
  60. FormPoints.BorderStyle := bsNone;
  61. FormPoints.Show;
  62. // Projection
  63. FormProjection := TFormProjection.Create(tsProjection);
  64. FormProjection.Parent := tsProjection;
  65. FormProjection.Align := alClient;
  66. FormProjection.BorderStyle := bsNone;
  67. FormProjection.Show;
  68. // Splines
  69. FormSplines := TFormSplines.Create(tsSplines);
  70. FormSplines.Parent := tsSplines;
  71. FormSplines.Align := alClient;
  72. FormSplines.BorderStyle := bsNone;
  73. FormSplines.Show;
  74. end;
  75. procedure TFormGraphD.FormShow(Sender: TObject);
  76. begin
  77. PageControl.ActivePage := tsFxy;
  78. end;
  79. procedure TFormGraphD.tvGraphClick(Sender: TObject);
  80. begin
  81. tvGraph.Items[0].DropHighlighted := False;
  82. case tvGraph.Selected.Index of
  83. 0:
  84. PageControl.ActivePage := tsFxy;
  85. 1:
  86. PageControl.ActivePage := tsHeightField;
  87. 2:
  88. PageControl.ActivePage := tsPoints;
  89. 3:
  90. PageControl.ActivePage := tsProjection;
  91. 4:
  92. PageControl.ActivePage := tsSplines;
  93. end;
  94. end;
  95. end.