Автоматизированное рабочее место производственно-технического отдела

Дипломная работа - Компьютеры, программирование

Другие дипломы по предмету Компьютеры, программирование

---------------------------------------------------

#pragma package (smart_init)

#pragma link "sGauge"

#pragma link "sPanel"

#pragma link "sRadioButton"

#pragma link "sLabel"

#pragma link "sSkinManager"

#pragma resource "*. dfm"*Form12;

// ---------------------------------------------------------------------------

__fastcall TForm12:: TForm12 (TComponent* Owner)

: TForm (Owner)

{

}

// ---------------------------------------------------------------------------__fastcall TForm12:: Timer1Timer (TObject *Sender)

{( (ExtractFilePath (ParamStr (0)) +"Launcher // "+"Launcher1. exe"). c_str (), (ExtractFilePath (ParamStr (0)) +"Обновление. exe"). c_str (),true);->AlphaBlendValue++;(Form12->AlphaBlendValue==255) {( (ExtractFilePath (ParamStr (0)) +"Launcher // "+"Launcher1. exe"). c_str ());->Enabled=false;->Enabled=true; }

}

// ---------------------------------------------------------------------------__fastcall TForm12:: Timer2Timer (TObject *Sender)

{->Progress++;(sGauge1->Progress==1) {sGauge1->Suffix="% Проверка на наличие обновления. "; }(sGauge1->Progress==5) {sGauge1->Suffix="% Загрузка модулей программы. "; }(sGauge1->Progress==16) {sGauge1->Suffix="% Загрузка стиля Pulsar программы. "; }(sGauge1->Progress==30) {sGauge1->Suffix="% Подключение базы данных. "; }(sGauge1->Progress==44) {sGauge1->Suffix="% Оптимизация всех компонентов программы. "; }(sGauge1->Progress==sGauge1->MaxValue) {sGauge1->Suffix="% Запуск программы. ";(1500); Timer2->Enabled=false; Timer3->Enabled=true; }

}

// ---------------------------------------------------------------------------__fastcall TForm12:: Timer4Timer (TObject *Sender)

{char *FileTo = (ExtractFilePath (ParamStr (0)) +"Launcher // "+"Project1. exe"). c_str ();char *FileFrom = (ExtractFilePath (ParamStr (0)) +"Обновление. exe"). c_str ();(FileExists (FileTo) ==false) {Timer4->Enabled=false; Timer1->Enabled=true; }{Timer4->Enabled=false; Form12->Close ();(Handle, "open", FileFrom, 0, 0, SW_SHOWNORMAL); }

}

// ---------------------------------------------------------------------------__fastcall TForm12:: Timer3Timer (TObject *Sender)

{->AlphaBlendValue--;(Form12->AlphaBlendValue==0) {->ADOConnection1->Connected=true;->ADOQuery1->Active=true;->ADOQuery2->Active=true;->ADOQuery3->Active=true;->ADOQuery4->Active=true;->ADOQuery5->Active=true;->ADOQuery6->Active=true;->ADOQuery7->Active=true;->ADOQuery8->Active=true;->ADOQuery9->Active=true;->ADOQuery10->Active=true;->ADOQuery11->Active=true;->ADOQuery12->Active=true;->ADOQuery13->Active=true;->ADOQuery14->Active=true;->ADOQuery15->Active=true;->ADOQuery16->Active=true;->ADOTable1->Active=true;->ADOTable2->Active=true;->ADOTable3->Active=true;->ADOTable4->Active=true;->ADOTable5->Active=true;->ADOTable6->Active=true;->ADOTable7->Active=true;->ADOTable8->Active=true;->ADOTable9->Active=true;->ADOTable10->Active=true;->ADOTable11->Active=true;->ADOTable12->Active=true;->ADOTable13->Active=true;->ADOTable14->Active=true;->ADOTable15->Active=true;->ADOTable16->Active=true;->Timer1->Enabled=true;->Timer1->Enabled=true;->Enabled=false;->Hide ();->Show (); }

}

// ---------------------------------------------------------------------------

Меню программы

// ---------------------------------------------------------------------------

#include

#pragma hdrstop

#include "Unit1. h"

#include "Unit2. h"

#include "Unit3. h"

#include "Unit5. h"

#include "Unit6. h"

#include "Unit7. h"

#include "Unit8. h"

#include "Unit12. h"

// ---------------------------------------------------------------------------

#pragma package (smart_init)

#pragma link "sLabel"

#pragma link "sPanel"

#pragma link "sStatusBar"

#pragma link "sBitBtn"

#pragma link "sBevel"

#pragma link "sMonthCalendar"

#pragma link "sSkinManager"

#pragma link "sButton"

#pragma resource "*. dfm"*Form1;

// ---------------------------------------------------------------------------

__fastcall TForm1:: TForm1 (TComponent* Owner)

: TForm (Owner)

{

}

// ---------------------------------------------------------------------------__fastcall TForm1:: sBitBtn1Click (TObject *Sender)

{->Close ();->Show ();->sGroupBox1->Visible=true;->sGroupBox2->Visible=false;->sGroupBox3->Visible=false;->sGroupBox4->Visible=false;->sGroupBox5->Visible=false;

}

// ---------------------------------------------------------------------------__fastcall TForm1:: sBitBtn2Click (TObject *Sender)

{->Close ();->Show ();->sPageControl1->ActivePage=Form5->sTabSheet1;->sButton1->SetFocus ();->sGroupBox2->Visible=false;->sGroupBox1->Visible=true;->sGroupBox3->Visible=false;->sGroupBox6->Visible=false;

}

// ---------------------------------------------------------------------------__fastcall TForm1:: sBitBtn3Click (TObject *Sender)

{->Close ();->Show ();->sPageControl1->ActivePage=Form5->sTabSheet1;->sButton2->SetFocus ();->sGroupBox1->Visible=false;->sGroupBox2->Visible=true;->sGroupBox3->Visible=false;->sGroupBox6->Visible=false;

}

// ---------------------------------------------------------------------------__fastcall TForm1:: sBitBtn4Click (TObject *Sender)

{->Close ();->Show ();->sPageControl1->ActivePage=Form5->sTabSheet1;->sButton3->SetFocus ();->sGroupBox1->Visible=false;->sGroupBox2->Visible=false;->sGroupBox3->Visible=true;->sGroupBox6->Visible=false;

}

// ---------------------------------------------------------------------------__fastcall TForm1:: sBitBtn9Click (TObject *Sender)

{->Close ();

}

// ---------------------------------------------------------------------------__fastcall TForm1:: Timer1Timer (TObject *Sender)

{->Panels->Items [0] - >Text=Time ();->Panels->Items [1] - >Text=Date ();->Panels->Items [2] - >Text="Copyright. 2012-2013";->Panels->Items [3] - >Text="АРМ ПТО_Beta v0.1";->sStatusBar1->Panels->Items [0] - >Text=Time ();->sStatusBar1->Panels->Items [1] - >Text=Date ();->sStatusBar1->Panels->Items [2] - >Text="Copyright. 2012-2013";->sStatusBar1->Panels->Items [3] - >Text="АРМ ПТО_Beta v0.1";->sStatusBar1->Panels->Items [0] - >Text=Time ();->sStatusBar1->Panels->Items [1] - >Text=Date ();->sStatusBar1->Panels->Items [2] - >Text="Copyright. 2012-2013";->sStatusBar1->Panels->Items [3] - >Text="АРМ ПТО_Beta v0.1";->sStatusBar1->Panels->Items [0] - >Text=Time ();->sStatusBar1->Panels->Items [1] - >Text=Date ();->sStatusBar1->Panels->Items [2] - >Text="Copyright. 2012-2013";->sStatusBar1->Panels->Items [3] - >Text="АРМ ПТО_Beta v0.1";->sStatusBar1->Panels->Items [0] - >Text=Time ();->sStatusBar1->Panels->Items [1] - >Text=Date ();->sStatusBar1->Panels->Items [2] - >Text="Copyright. 2012-2013";->sStatusBar1->Panels->Items [3] - >Text="АРМ ПТО_Beta v0.1";->sStatusBar1->Panels->Items [0] - >Text=Time ();->sStatusBar1->Panels->Items [1] - >Text=Date ();->sStatusBar1->Panels->Items [2] - >Text="АРМ ПТО_Beta v0.1";

}

// ---------------------------------------------------------------------------__fastcall TForm1:: sButton1Click (TObject *Sender)

{->Close ();->Show ();->sPageControl1->ActivePage=Form5->sTabSheet1;->sButton20->SetFocus ();->sGroupBox1->Visible=false;->sGroupBox2->Visible=false;->sGroupBox3->Visible=false;->sGroupBox6->Visible=true;

}

// ---------------------------------------------------------------------------__fastcall TForm1:: sButton2Click (TObject *Sender)

{->Close ();->Show ();->sPageControl1->ActivePage=Form5->sTabSheet2;->sPageControl2->ActivePage=Form5->sTabSheet3;->sPageControl4->ActivePage=Form5->sTabSheet18;

}

// ---------------------------------------------------------------------------__fastcall TForm1:: FormKeyDown (TObject *Sender, WORD &Key,Shift)

{(Key==VK_ESCAPE) {sBitBtn9Click (sBitBtn9); }(Key==VK_F1) {sBitBtn8Click (sBitBtn8); }

}

// ---------------------------------------------------------------------------__fastcall TForm1:: sBitBtn8Click (TObject *Sender)

{FILE_HELP_NAME_STR = "