Студопедия

КАТЕГОРИИ:

АстрономияБиологияГеографияДругие языкиДругоеИнформатикаИсторияКультураЛитератураЛогикаМатематикаМедицинаМеханикаОбразованиеОхрана трудаПедагогикаПолитикаПравоПсихологияРиторикаСоциологияСпортСтроительствоТехнологияФизикаФилософияФинансыХимияЧерчениеЭкологияЭкономикаЭлектроника


Программный код




 

Файл Unit1.h

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

 

#ifndef Unit1H

#define Unit1H

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

#include <Classes.hpp>

#include <Controls.hpp>

#include <StdCtrls.hpp>

#include <Forms.hpp>

#include <Menus.hpp>

#include <ExtCtrls.hpp>

#include <jpeg.hpp>

#include <Unit2.h>

#include <Unit3.h>

#include <Unit4.h>

#include <Unit5.h>

 

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

class TForm1 : public TForm

{

__published: // IDE-managed Components

TMainMenu *MainMenu1;

TMenuItem *N1;

TMenuItem *N2;

TMenuItem *N3;

TMenuItem *N4;

TLabel *Label1;

TButton *Button1;

TButton *Button3;

TButton *Button4;

TImage *Image1;

TLabel *Label2;

TEdit *Edit1;

TEdit *Edit2;

TButton *Button2;

TLabel *Label3;

TLabel *Label4;

TLabel *Label5;

TLabel *Label6;

void __fastcall N4Click(TObject *Sender);

void __fastcall Button1Click(TObject *Sender);

void __fastcall Button3Click(TObject *Sender);

void __fastcall Button4Click(TObject *Sender);

void __fastcall N2Click(TObject *Sender);

void __fastcall N3Click(TObject *Sender);

void __fastcall Button2Click(TObject *Sender);

void __fastcall FormCreate(TObject *Sender);

private: // User declarations

public: // User declarations

__fastcall TForm1(TComponent* Owner);

};

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

extern PACKAGE TForm1 *Form1;

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

#endif

 

Файл Unit2.h.

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

 

#ifndef Unit2H

#define Unit2H

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

#include <Classes.hpp>

#include <Controls.hpp>

#include <StdCtrls.hpp>

#include <Forms.hpp>

#include <Menus.hpp>

#include <ADODB.hpp>

#include <DB.hpp>

#include <DBCtrls.hpp>

#include <DBGrids.hpp>

#include <Dialogs.hpp>

#include <ExtCtrls.hpp>

#include <ExtDlgs.hpp>

#include <Grids.hpp>

#include <MPlayer.hpp>

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

class TForm2 : public TForm

{

__published: // IDE-managed Components

TLabel *Label1;

TLabel *Label2;

TMainMenu *MainMenu1;

TMenuItem *N1;

TMenuItem *N2;

TMenuItem *N3;

TMenuItem *N4;

TMenuItem *N5;

TDataSource *DataSource1;

TDBGrid *DBGrid1;

TDBNavigator *DBNavigator1;

TADOConnection *ADOConnection1;

TADOTable *ADOTable1;

TButton *Button1;

TButton *Button2;

TComboBox *ComboBox1;

TEdit *Edit1;

TEdit *Edit2;

TButton *Button3;

TButton *Button4;

TButton *Button5;

TButton *Button6;

TLabel *Label3;

TRadioButton *RadioButton1;

TRadioButton *RadioButton2;

void __fastcall N5Click(TObject *Sender);

void __fastcall N4Click(TObject *Sender);

void __fastcall FormCreate(TObject *Sender);

void __fastcall Button1Click(TObject *Sender);

void __fastcall Button2Click(TObject *Sender);

void __fastcall ComboBox1Change(TObject *Sender);

void __fastcall Button3Click(TObject *Sender);

void __fastcall Button4Click(TObject *Sender);

void __fastcall Button5Click(TObject *Sender);

void __fastcall Button6Click(TObject *Sender);

void __fastcall N3Click(TObject *Sender);

void __fastcall N2Click(TObject *Sender);

void __fastcall RadioButton2Click(TObject *Sender);

void __fastcall RadioButton1Click(TObject *Sender);

private: // User declarations

public: // User declarations

__fastcall TForm2(TComponent* Owner);

};

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

extern PACKAGE TForm2 *Form2;

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

#endif

 

Файл Unit3.h.

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

 

#include <vcl.h>

#pragma hdrstop

 

#include "Unit3.h"

#include "Unit4.h"

#include "Unit7.h"

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

#pragma package(smart_init)

#pragma resource "*.dfm"

TForm3 *Form3;

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

__fastcall TForm3::TForm3(TComponent* Owner)

: TForm(Owner)

{

}

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

 

void __fastcall TForm3::N5Click(TObject *Sender)

{

Form3->Visible=false;

}

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

 

void __fastcall TForm3::N4Click(TObject *Sender)

{

Form3->Close();

}

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

 

void __fastcall TForm3::FormCreate(TObject *Sender)

{

Form3->Position = poScreenCenter;

}

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

 

void __fastcall TForm3::ComboBox1Change(TObject *Sender)

{

if( ComboBox1->ItemIndex == 0)

Edit2->Text = Edit2->Text + "Kod_zayavki" + "='" + Edit1->Text + "'";

if( ComboBox1->ItemIndex == 1)

Edit2->Text = Edit2->Text + "Inventaeniy_nomer" + "='" + Edit1->Text + "'";

if( ComboBox1->ItemIndex == 2)

Edit2->Text = Edit2->Text + "data_podachi_zayavki" + "='" + Edit1->Text + "'";

if( ComboBox1->ItemIndex == 3)

Edit2->Text = Edit2->Text + "kod_sotrudnika" + "='" + Edit1->Text + "'";

if( ComboBox1->ItemIndex == 4)

Edit2->Text = Edit2->Text + "status" + "='" + Edit1->Text + "'";

if( ComboBox1->ItemIndex == 5)

Edit2->Text = Edit2->Text + "data_ispolneniya" + "='" + Edit1->Text + "'";

}

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

 

void __fastcall TForm3::Button3Click(TObject *Sender)

{

Edit1->Clear();

}

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

 

void __fastcall TForm3::Button4Click(TObject *Sender)

{

Edit2->Clear();

}

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

 

void __fastcall TForm3::Button1Click(TObject *Sender)

{

Form3->ADOTable1->Filter = Edit2->Text;

Form3->ADOTable1->Filtered = true;

}

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

 

void __fastcall TForm3::Button2Click(TObject *Sender)

{

ADOTable1->Filtered = false;

Edit2->Clear();

Edit1->Clear();

}

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

 

void __fastcall TForm3::Button5Click(TObject *Sender)

{

Edit2->Text = Edit2->Text + " AND ";

}

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

 

void __fastcall TForm3::Button6Click(TObject *Sender)

{

Edit2->Text = Edit2->Text + " OR ";

}

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

 

void __fastcall TForm3::Button7Click(TObject *Sender)

{

Edit2->Text = Edit2->Text + " < ";

}

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

 

void __fastcall TForm3::Button8Click(TObject *Sender)

{

Edit2->Text = Edit2->Text + " > ";

}

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

 

 

void __fastcall TForm3::N3Click(TObject *Sender)

{

Form7->Show();

}

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

 

void __fastcall TForm3::N2Click(TObject *Sender)

{

Form4->Show();

}

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

 

void __fastcall TForm3::RadioButton2Click(TObject *Sender)

{

Button4->Visible=false;

Edit2->Visible=false;

Button5->Visible=false;

Button6->Visible=false;

}

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

 

void __fastcall TForm3::RadioButton1Click(TObject *Sender)

{

Button4->Visible=true;

Edit2->Visible=true;

Button5->Visible=true;

Button6->Visible=true;

}

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

 

Файл Unit5.h.

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

 

#ifndef Unit5H

#define Unit5H

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

#include <Classes.hpp>

#include <Controls.hpp>

#include <StdCtrls.hpp>

#include <Forms.hpp>

#include <Menus.hpp>

#include <ADODB.hpp>

#include <DB.hpp>

#include <DBCtrls.hpp>

#include <DBGrids.hpp>

#include <ExtCtrls.hpp>

#include <Grids.hpp>

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

class TForm5 : public TForm

{

__published: // IDE-managed Components

TLabel *Label2;

TLabel *Label1;

TMainMenu *MainMenu1;

TMenuItem *N1;

TMenuItem *N2;

TMenuItem *N3;

TMenuItem *N4;

TMenuItem *N5;

TADOConnection *ADOConnection1;

TADOTable *ADOTable1;

TDataSource *DataSource1;

TDBGrid *DBGrid1;

TDBNavigator *DBNavigator1;

TLabel *Label3;

TButton *Button1;

TButton *Button2;

TComboBox *ComboBox1;

TEdit *Edit1;

TEdit *Edit2;

TButton *Button3;

TButton *Button4;

TButton *Button5;

TButton *Button6;

TRadioButton *RadioButton1;

TRadioButton *RadioButton2;

void __fastcall N5Click(TObject *Sender);

void __fastcall N4Click(TObject *Sender);

void __fastcall FormCreate(TObject *Sender);

void __fastcall Button3Click(TObject *Sender);

void __fastcall ComboBox1Change(TObject *Sender);

void __fastcall Button4Click(TObject *Sender);

void __fastcall Button1Click(TObject *Sender);

void __fastcall Button2Click(TObject *Sender);

void __fastcall Button5Click(TObject *Sender);

void __fastcall Button6Click(TObject *Sender);

void __fastcall N3Click(TObject *Sender);

void __fastcall N2Click(TObject *Sender);

void __fastcall RadioButton1Click(TObject *Sender);

void __fastcall RadioButton2Click(TObject *Sender);

private: // User declarations

public: // User declarations

__fastcall TForm5(TComponent* Owner);

};

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

extern PACKAGE TForm5 *Form5;

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

#endif

 

Файл Unit6.h.

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

 

 

#ifndef Unit6H

#define Unit6H

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

#include <Classes.hpp>

#include <Controls.hpp>

#include <StdCtrls.hpp>

#include <Forms.hpp>

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

class TFrame6 : public TFrame

{

__published: // IDE-managed Components

private: // User declarations

public: // User declarations

__fastcall TFrame6(TComponent* Owner);

};

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

extern PACKAGE TFrame6 *Frame6;

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

#endif

Файл Unit7.h.

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

 

#ifndef Unit7H

#define Unit7H

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

#include <Classes.hpp>

#include <Controls.hpp>

#include <StdCtrls.hpp>

#include <Forms.hpp>

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

class TForm7 : public TForm

{

__published: // IDE-managed Components

TButton *Button1;

TLabel *Label1;

TLabel *Label2;

TLabel *Label3;

TLabel *Label4;

TLabel *Label5;

void __fastcall FormCreate(TObject *Sender);

void __fastcall Button1Click(TObject *Sender);

void __fastcall Label3Click(TObject *Sender);

private: // User declarations

public: // User declarations

__fastcall TForm7(TComponent* Owner);

};

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

extern PACKAGE TForm7 *Form7;

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

#endif

 

Файл JPEG.hpp.

// Borland C++ Builder

// Copyright (c) 1995, 2002 by Borland Software Corporation

// All rights reserved

 

// (DO NOT EDIT: machine generated header) 'jpeg.pas' rev: 6.00

 

#ifndef jpegHPP

#define jpegHPP

 

#pragma delphiheader begin

#pragma option push -w-

#pragma option push -Vx

#include <Graphics.hpp> // Pascal unit

#include <Classes.hpp> // Pascal unit

#include <SysUtils.hpp> // Pascal unit

#include <Windows.hpp> // Pascal unit

#include <SysInit.hpp> // Pascal unit

#include <System.hpp> // Pascal unit

 

//-- user supplied -----------------------------------------------------------

#pragma link "jpeg.obj"

 

namespace Jpeg

{

//-- type declarations -------------------------------------------------------

class DELPHICLASS TJPEGData;

class PASCALIMPLEMENTATION TJPEGData : public Graphics::TSharedImage

{

typedef Graphics::TSharedImage inherited;

 

private:

Classes::TCustomMemoryStream* FData;

int FHeight;

int FWidth;

bool FGrayscale;

 

protected:

virtual void __fastcall FreeHandle(void);

 

public:

__fastcall virtual ~TJPEGData(void);

public:

#pragma option push -w-inl

/* TObject.Create */ inline __fastcall TJPEGData(void) : Graphics::TSharedImage() { }

#pragma option pop

 

};

 

 

typedef Shortint TJPEGQualityRange;

 

#pragma option push -b-

enum TJPEGPerformance { jpBestQuality, jpBestSpeed };

#pragma option pop

 

#pragma option push -b-

enum TJPEGScale { jsFullSize, jsHalf, jsQuarter, jsEighth };

#pragma option pop

 

#pragma option push -b-

enum TJPEGPixelFormat { jf24Bit, jf8Bit };

#pragma option pop

 

class DELPHICLASS TJPEGImage;

class PASCALIMPLEMENTATION TJPEGImage : public Graphics::TGraphic

{

typedef Graphics::TGraphic inherited;

 

private:

TJPEGData* FImage;

Graphics::TBitmap* FBitmap;

int FScaledWidth;

int FScaledHeight;

HPALETTE FTempPal;

bool FSmoothing;

bool FGrayScale;

TJPEGPixelFormat FPixelFormat;

TJPEGQualityRange FQuality;

bool FProgressiveDisplay;

bool FProgressiveEncoding;

TJPEGPerformance FPerformance;

TJPEGScale FScale;

bool FNeedRecalc;

void __fastcall CalcOutputDimensions(void);

Graphics::TBitmap* __fastcall GetBitmap(void);

bool __fastcall GetGrayscale(void);

void __fastcall SetGrayscale(bool Value);

void __fastcall SetPerformance(TJPEGPerformance Value);

void __fastcall SetPixelFormat(TJPEGPixelFormat Value);

void __fastcall SetScale(TJPEGScale Value);

void __fastcall SetSmoothing(bool Value);

 

protected:

virtual void __fastcall AssignTo(Classes::TPersistent* Dest);

virtual void __fastcall Changed(System::TObject* Sender);

virtual void __fastcall Draw(Graphics::TCanvas* ACanvas, const Types::TRect &Rect);

virtual bool __fastcall Equals(Graphics::TGraphic* Graphic);

void __fastcall FreeBitmap(void);

virtual bool __fastcall GetEmpty(void);

virtual int __fastcall GetHeight(void);

virtual HPALETTE __fastcall GetPalette(void);

virtual int __fastcall GetWidth(void);

void __fastcall NewBitmap(void);

void __fastcall NewImage(void);

virtual void __fastcall ReadData(Classes::TStream* Stream);

void __fastcall ReadStream(int Size, Classes::TStream* Stream);

virtual void __fastcall SetHeight(int Value);

virtual void __fastcall SetPalette(HPALETTE Value);

virtual void __fastcall SetWidth(int Value);

virtual void __fastcall WriteData(Classes::TStream* Stream);

__property Graphics::TBitmap* Bitmap = {read=GetBitmap};

 

public:

__fastcall virtual TJPEGImage(void);

__fastcall virtual ~TJPEGImage(void);

void __fastcall Compress(void);

void __fastcall DIBNeeded(void);

void __fastcall JPEGNeeded(void);

virtual void __fastcall Assign(Classes::TPersistent* Source);

virtual void __fastcall LoadFromStream(Classes::TStream* Stream);

virtual void __fastcall SaveToStream(Classes::TStream* Stream);

virtual void __fastcall LoadFromClipboardFormat(Word AFormat, unsigned AData, HPALETTE APalette);

virtual void __fastcall SaveToClipboardFormat(Word &AFormat, unsigned &AData, HPALETTE &APalette);

__property bool Grayscale = {read=GetGrayscale, write=SetGrayscale, nodefault};

__property bool ProgressiveEncoding = {read=FProgressiveEncoding, write=FProgressiveEncoding, nodefault};

__property TJPEGQualityRange CompressionQuality = {read=FQuality, write=FQuality, nodefault};

__property TJPEGPixelFormat PixelFormat = {read=FPixelFormat, write=SetPixelFormat, nodefault};

__property bool ProgressiveDisplay = {read=FProgressiveDisplay, write=FProgressiveDisplay, nodefault};

__property TJPEGPerformance Performance = {read=FPerformance, write=SetPerformance, nodefault};

__property TJPEGScale Scale = {read=FScale, write=SetScale, nodefault};

__property bool Smoothing = {read=FSmoothing, write=SetSmoothing, nodefault};

};

 

 

#pragma pack(push, 1)

struct TJPEGDefaults

{

TJPEGQualityRange CompressionQuality;

bool Grayscale;

TJPEGPerformance Performance;

TJPEGPixelFormat PixelFormat;

bool ProgressiveDisplay;

bool ProgressiveEncoding;

TJPEGScale Scale;

bool Smoothing;

} ;

#pragma pack(pop)

 

//-- var, const, procedure ---------------------------------------------------

extern PACKAGE TJPEGDefaults JPEGDefaults;

 

} /* namespace Jpeg */

using namespace Jpeg;

#pragma option pop // -w-

#pragma option pop // -Vx

 

#pragma delphiheader end.

//-- end unit ----------------------------------------------------------------

#endif // jpeg


Поделиться:

Дата добавления: 2015-08-05; просмотров: 122; Мы поможем в написании вашей работы!; Нарушение авторских прав





lektsii.com - Лекции.Ком - 2014-2024 год. (0.007 сек.) Все материалы представленные на сайте исключительно с целью ознакомления читателями и не преследуют коммерческих целей или нарушение авторских прав
Главная страница Случайная страница Контакты