//=========================================================================== // CONTROL WINDOW //=========================================================================== #include #pragma hdrstop #include "Unit3.h" #include "Unit1.h" #include "Unit2.h" //--------------------------------------------------------------------------- #pragma package(smart_init) #pragma resource "*.dfm" TForm3 *Form3; //--------------------------------------------------------------------------- __fastcall TForm3::TForm3(TComponent* Owner) : TForm(Owner) { } //=========================================================================== // VARIABLES //=========================================================================== // extern allows me to access variables from other units extern stop, stop2; extern nextStep(); extern nextStep2(); extern fill(); extern fill2(); //=========================================================================== // EVENT HANDLERS //=========================================================================== //------------------------------------------------------------- On Form Close void __fastcall TForm3::FormClose(TObject *Sender, TCloseAction &Action) { Form1->Close(); Form2->Close(); } //----------------------------------------------------------- Fill All Button void __fastcall TForm3::ButtonFillAllClick(TObject *Sender) { fill(); fill2(); } //------------------------------------------------------------ Run All Button void __fastcall TForm3::ButtonRunAllClick(TObject *Sender) { stop = false; stop2 = false; while (stop == false && stop2 == false) { nextStep(); nextStep2(); Application->ProcessMessages(); } } //----------------------------------------------------------- Step All Button void __fastcall TForm3::ButtonStepAllClick(TObject *Sender) { stop = true; stop2 = true; nextStep(); nextStep2(); } //----------------------------------------------------------- Stop All Button void __fastcall TForm3::ButtonStopClick(TObject *Sender) { stop = true; stop2 = true; } //---------------------------------------------------------- That's All Folks