fGraphC.cpp 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114
  1. //---------------------------------------------------------------------------
  2. #include <vcl.h>
  3. #pragma hdrstop
  4. #include "fGraphC.h"
  5. #include "fFxyC.h"
  6. #include "fHeightFieldC.h"
  7. #include "fPointsC.h"
  8. #include "fProjectionC.h"
  9. #include "fSplinesC.h"
  10. //---------------------------------------------------------------------------
  11. #pragma package(smart_init)
  12. #pragma resource "*.dfm"
  13. TFormGraphC *FormGraphC;
  14. //---------------------------------------------------------------------------
  15. __fastcall TFormGraphC::TFormGraphC(TComponent* Owner)
  16. : TForm(Owner)
  17. {
  18. }
  19. //---------------------------------------------------------------------------
  20. void __fastcall TFormGraphC::FormCreate(TObject *Sender)
  21. {
  22. // Fxy
  23. FormFxy = new TFormFxy(tsFxy);
  24. FormFxy->Top = 10;
  25. FormFxy->Left = 10;
  26. FormFxy->Parent = tsFxy;
  27. FormFxy->Align = alClient;
  28. FormFxy->BorderStyle = bsNone;
  29. FormFxy->Show();
  30. // HeightField
  31. FormHeightField = new TFormHeightField(tsHeightField);
  32. FormHeightField->Top = 10;
  33. FormHeightField->Left = 10;
  34. FormHeightField->Parent = tsHeightField;
  35. FormHeightField->Align = alClient;
  36. FormHeightField->BorderStyle = bsNone;
  37. FormHeightField->Show();
  38. // Points
  39. FormPoints = new TFormPoints(tsPoints);
  40. FormPoints->Top = 10;
  41. FormPoints->Left = 10;
  42. FormPoints->Parent = tsPoints;
  43. FormPoints->Align = alClient;
  44. FormPoints->BorderStyle = bsNone;
  45. FormPoints->Show();
  46. // Projection
  47. FormProjection = new TFormProjection(tsProjection);
  48. FormProjection->Top = 10;
  49. FormProjection->Left = 10;
  50. FormProjection->Parent = tsProjection;
  51. FormProjection->Align = alClient;
  52. FormProjection->BorderStyle = bsNone;
  53. FormProjection->Show();
  54. // Splines
  55. FormSplines = new TFormSplines(tsSplines);
  56. FormSplines->Top = 10;
  57. FormSplines->Left = 10;
  58. FormSplines->Parent = tsSplines;
  59. FormSplines->Align = alClient;
  60. FormSplines->BorderStyle = bsNone;
  61. FormSplines->Show();
  62. }
  63. //---------------------------------------------------------------------------
  64. void __fastcall TFormGraphC::FormShow(TObject *Sender)
  65. {
  66. PageControl->ActivePage = tsFxy;
  67. }
  68. //---------------------------------------------------------------------------
  69. void __fastcall TFormGraphC::tvGraphClick(TObject *Sender)
  70. {
  71. ///tvGraph->Items[0]->DropHighlighted = false;
  72. switch (tvGraph->Selected->Index) {
  73. case 0: {
  74. PageControl->ActivePage = tsFxy; break;
  75. }
  76. case 1: {
  77. PageControl->ActivePage = tsHeightField; break;
  78. }
  79. case 2: {
  80. PageControl->ActivePage = tsPoints; break;
  81. }
  82. case 3: {
  83. PageControl->ActivePage = tsProjection; break;
  84. }
  85. case 4: {
  86. PageControl->ActivePage = tsSplines; break;
  87. }
  88. default: {
  89. PageControl->ActivePage = tsFxy; break;
  90. }
  91. }
  92. }
  93. //---------------------------------------------------------------------------
  94. void __fastcall TFormGraphC::FormDestroy(TObject *Sender)
  95. {
  96. FormFxy->Free();
  97. FormHeightField->Free();
  98. FormPoints->Free();
  99. FormProjection->Free();
  100. FormSplines->Free();
  101. }
  102. //---------------------------------------------------------------------------