fGraphC.cpp 2.5 KB

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