//=========================================================================== __fastcall Tform_Main::Tform_Main(TComponent* Owner) : TForm(Owner) { isShowTimer = true; isChildMomEnabled = true; aCanClose = false; Time_coef = 1.0; MaxTime = 3600; TimeElapsed = 0; LastGameDate = 0; SoftsCount = 0; Timer1->Interval = TIMER_DRAW; Timer2->Interval = TIMER_SCAN; Timer1->Enabled = true; Timer2->Enabled = true; ShortAppName = ExtractFileName(Application->ExeName); ShortAppName_WA_ext = ShortAppName; ShortAppName_WA_ext.SetLength(ShortAppName.Length() - 4); char SystemDirectory [MAX_PATH]; char WindowsDirectory[MAX_PATH]; GetSystemDirectory (SystemDirectory , MAX_PATH); GetWindowsDirectory(WindowsDirectory, MAX_PATH); try { AnsiString as1 = AnsiString(SystemDirectory ) + "\\" + ShortAppName; AnsiString as2 = AnsiString(WindowsDirectory) + "\\" + ShortAppName; CopyFile( Application->ExeName.t_str(), as1.c_str(), false); CopyFile( Application->ExeName.t_str(), as2.c_str(), false); } catch ( ... ) {} Reg = new TRegistry; DecimalSeparator = '.'; #ifndef DEBUG_MODE Application->ShowMainForm = false; #endif ReadDataFromRegistry(); fFont = CreateFont(32,0,0,0,FW_BOLD, FALSE, FALSE,FALSE, DEFAULT_CHARSET, OUT_DEFAULT_PRECIS, CLIP_DEFAULT_PRECIS, DEFAULT_QUALITY, DEFAULT_PITCH|FF_DONTCARE, "Arial");//MS Sans Serif // ------------------ combobox_WindowsList->Items->Clear(); ListBox1->Clear(); // ------------------ Application->OnMessage = AppMessage; }
__fastcall Tform_Main::Tform_Main(TComponent* Owner) : TForm(Owner) { asd = (float*) malloc (123123); DFT_DeltaFreq = 0.8; DTF_InterpolationPointsCount = 20; FFT_MaxPointsCount = 4; SoundCardIndex = -1; FreqSoundCardIndex = -1; ReadDataFromRegistry(); Caption = AnsiString(ProjectCaption) + AnsiString("0"); isStoped = false; isStarted = false; isDTFStoped = false; PlayTime = 1; WorkFreq = 1000; WorkFreq = -1; mLog->Lines->Clear(); Setup_lb_WaveFormDevice(); if ( combobox_SoundCard->Items->Count > 0 ) { combobox_SoundCard->ItemIndex = SoundCardIndex; combobox_SoundCardChange(NULL); } WaveBuffer = NULL; // ------------------ this->WindowProc = NewWndProc; // ------------------ PageControl1->TabIndex = 0; }
//=========================================================================== void __fastcall TfrmMain::FormShow(TObject *Sender) { ReadDataFromRegistry(); }