From ef31299cd784d4e9dc60f4f1eb9d8b675b6b8775 Mon Sep 17 00:00:00 2001 From: Aleksander Misztal Date: Sat, 9 Feb 2019 02:48:01 +0000 Subject: [PATCH] =?UTF-8?q?Prze=C5=9Blij=20pliki=20do=20''?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Unit2.h | 27 +++++++ Unit2.obj | Bin 0 -> 37250 bytes Unit3.~cpp | 208 +++++++++++++++++++++++++++++++++++++++++++++++++++++ Unit3.~dfm | 182 ++++++++++++++++++++++++++++++++++++++++++++++ Unit3.~h | 63 ++++++++++++++++ 5 files changed, 480 insertions(+) create mode 100644 Unit2.h create mode 100644 Unit2.obj create mode 100644 Unit3.~cpp create mode 100644 Unit3.~dfm create mode 100644 Unit3.~h diff --git a/Unit2.h b/Unit2.h new file mode 100644 index 0000000..367c484 --- /dev/null +++ b/Unit2.h @@ -0,0 +1,27 @@ +//--------------------------------------------------------------------------- + +#ifndef Unit2H +#define Unit2H +//--------------------------------------------------------------------------- +#include +#include +#include +#include +#include +#include +//--------------------------------------------------------------------------- +class TForm2 : public TForm +{ +__published: // IDE-managed Components + TMemo *Memo1; + TButton *Button1; + TImage *Image1; + void __fastcall Button1Click(TObject *Sender); +private: // User declarations +public: // User declarations + __fastcall TForm2(TComponent* Owner); +}; +//--------------------------------------------------------------------------- +extern PACKAGE TForm2 *Form2; +//--------------------------------------------------------------------------- +#endif diff --git a/Unit2.obj b/Unit2.obj new file mode 100644 index 0000000000000000000000000000000000000000..7811e04cfda504d357930974d1c7eafdb96e9635 GIT binary patch literal 37250 zcmd^od0(}UJcX`9~kzFYThzu)%z&9`TIUvita>7BM|lQzH4%L3-KF~?YQc?=(fYzTxK8_ zNwxGRlJR`Ym7`lWtvY;EmU1|HbSROG#dDhuC(_a6P%M6UIGQ|sdp16>c92B627G+r zc*XfuV^ECssFFJ>D!F^K&{@bO^Ro0Eir2Pj^NMCtsaO(~5M#R)lfbl@kSaRCsEZhp z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------------------------------------------------------- +#pragma package(smart_init) +#pragma resource "*.dfm" +TForm3 *Form3; +//--------------------------------------------------------------------------- +__fastcall TForm3::TForm3(TComponent* Owner) + : TForm(Owner) +{ +} +//--------------------------------------------------------------------------- + + +void __fastcall TForm3::Button10Click(TObject *Sender) +{ + Edit1->Text=Edit1->Text+0; +} +//--------------------------------------------------------------------------- + +void __fastcall TForm3::Button7Click(TObject *Sender) +{ + Edit1->Text=Edit1->Text+1; +} +//--------------------------------------------------------------------------- + +void __fastcall TForm3::Button8Click(TObject *Sender) +{ + Edit1->Text=Edit1->Text+2; +} +//--------------------------------------------------------------------------- + +void __fastcall TForm3::Button9Click(TObject *Sender) +{ + Edit1->Text=Edit1->Text+3; +} +//--------------------------------------------------------------------------- + +void __fastcall TForm3::Button4Click(TObject *Sender) +{ + Edit1->Text=Edit1->Text+4; +} +//--------------------------------------------------------------------------- + +void __fastcall TForm3::Button5Click(TObject *Sender) +{ + Edit1->Text=Edit1->Text+5; +} +//--------------------------------------------------------------------------- + +void __fastcall TForm3::Button6Click(TObject *Sender) +{ + Edit1->Text=Edit1->Text+6; +} +//--------------------------------------------------------------------------- + +void __fastcall TForm3::Button1Click(TObject *Sender) +{ + Edit1->Text=Edit1->Text+7; +} +//--------------------------------------------------------------------------- + +void __fastcall TForm3::Button2Click(TObject *Sender) +{ + Edit1->Text=Edit1->Text+8; +} +//--------------------------------------------------------------------------- + +void __fastcall TForm3::Button3Click(TObject *Sender) +{ + Edit1->Text=Edit1->Text+9; +} +//--------------------------------------------------------------------------- + +void __fastcall TForm3::Button13Click(TObject *Sender) +{ + if (mnozenie==true){ + y=Edit1->Text.ToDouble(); + x=x*y; + Edit1->Text=""; + + } + else{ + x=Edit1->Text.ToDouble(); + mnozenie=true; + Edit1->Clear(); + dodawanie=false; + odejmowanie=false; + dzielenie=false; + przecinek=false; + + } + +} +//--------------------------------------------------------------------------- + +void __fastcall TForm3::Button12Click(TObject *Sender) +{ + if (dzielenie==true){ + y=Edit1->Text.ToDouble(); + x=x/y; + Edit1->Text=""; + + } + else{ + x=Edit1->Text.ToDouble(); + dzielenie=true; + Edit1->Clear(); + dodawanie=false; + odejmowanie=false; + mnozenie=false; + przecinek=false; + + } +} +//--------------------------------------------------------------------------- +void __fastcall TForm3::Button14Click(TObject *Sender) +{ + if (dodawanie==true){ + y=Edit1->Text.ToDouble(); + x=x+y; + Edit1->Text=""; + + } + else{ + x=Edit1->Text.ToDouble(); + dodawanie=true; + Edit1->Clear(); + mnozenie=false; + odejmowanie=false; + dzielenie=false; + przecinek=false; + + } +} +//--------------------------------------------------------------------------- +void __fastcall TForm3::Button15Click(TObject *Sender) +{ + if (odejmowanie==true){ + y=Edit1->Text.ToDouble(); + x=x-y; + Edit1->Text=""; + + } + else{ + x=Edit1->Text.ToDouble(); + odejmowanie=true; + Edit1->Clear(); + dodawanie=false; + mnozenie=false; + dzielenie=false; + przecinek=false; + + } +} +//--------------------------------------------------------------------------- +void __fastcall TForm3::Button16Click(TObject *Sender) +{ + x=0; + y=0; + Edit1->Text=""; + dodawanie=false; + odejmowanie=false; + mnozenie=false; + dzielenie=false; + +} +//--------------------------------------------------------------------------- +void __fastcall TForm3::Button17Click(TObject *Sender) +{ + if(dodawanie==true){ + y=Edit1->Text.ToDouble(); + x=x+y; + Edit1->Text=x; + x=0; + y=0; + przecinek=false; + } + if(odejmowanie==true){ + y=Edit1->Text.ToDouble(); + x=x-y; + Edit1->Text=x; + x=0; + y=0; + przecinek=false; + } + if(mnozenie==true){ + y=Edit1->Text.ToDouble(); + x=x*y; + Edit1->Text=x; + x=0; + y=0; + przecinek=false; + } + if(dzielenie==true){ + y=Edit1->Text.ToDouble(); + x=x/y; + Edit1->Text=x; + x=0; + y=0; + przecinek=false; + } +} +//--------------------------------------------------------------------------- diff --git a/Unit3.~dfm b/Unit3.~dfm new file mode 100644 index 0000000..fe127d8 --- /dev/null +++ b/Unit3.~dfm @@ -0,0 +1,182 @@ +object Form3: TForm3 + Left = 1045 + Top = 225 + Width = 673 + Height = 675 + BorderIcons = [biSystemMenu, biMinimize] + Caption = 'Kalkulator' + Color = clBtnFace + Font.Charset = DEFAULT_CHARSET + Font.Color = clWindowText + Font.Height = -13 + Font.Name = 'MS Sans Serif' + Font.Style = [] + OldCreateOrder = False + PixelsPerInch = 120 + TextHeight = 16 + object Button1: TButton + Left = 112 + Top = 160 + Width = 75 + Height = 57 + Caption = '7' + TabOrder = 0 + OnClick = Button1Click + end + object Button2: TButton + Left = 200 + Top = 160 + Width = 75 + Height = 57 + Caption = '8' + TabOrder = 1 + OnClick = Button2Click + end + object Button3: TButton + Left = 288 + Top = 160 + Width = 75 + Height = 57 + Caption = '9' + TabOrder = 2 + OnClick = Button3Click + end + object Button4: TButton + Left = 112 + Top = 232 + Width = 75 + Height = 57 + Caption = '4' + TabOrder = 3 + OnClick = Button4Click + end + object Button5: TButton + Left = 200 + Top = 232 + Width = 75 + Height = 57 + Caption = '5' + TabOrder = 4 + OnClick = Button5Click + end + object Button6: TButton + Left = 288 + Top = 232 + Width = 75 + Height = 57 + Caption = '6' + TabOrder = 5 + OnClick = Button6Click + end + object Button7: TButton + Left = 112 + Top = 304 + Width = 75 + Height = 57 + Caption = '1' + TabOrder = 6 + OnClick = Button7Click + end + object Button8: TButton + Left = 200 + Top = 304 + Width = 75 + Height = 57 + Caption = '2' + TabOrder = 7 + OnClick = Button8Click + end + object Button9: TButton + Left = 288 + Top = 304 + Width = 75 + Height = 57 + Caption = '3' + TabOrder = 8 + OnClick = Button9Click + end + object Button10: TButton + Left = 112 + Top = 376 + Width = 161 + Height = 57 + Caption = '0' + TabOrder = 9 + OnClick = Button10Click + end + object Button11: TButton + Left = 288 + Top = 376 + Width = 75 + Height = 57 + Caption = ',' + TabOrder = 10 + end + object Button12: TButton + Left = 376 + Top = 160 + Width = 75 + Height = 57 + Caption = '/' + TabOrder = 11 + OnClick = Button12Click + end + object Button13: TButton + Left = 376 + Top = 232 + Width = 75 + Height = 57 + Caption = '*' + TabOrder = 12 + OnClick = Button13Click + end + object Button14: TButton + Left = 376 + Top = 304 + Width = 75 + Height = 57 + Caption = '+' + TabOrder = 13 + OnClick = Button14Click + end + object Button15: TButton + Left = 376 + Top = 376 + Width = 75 + Height = 57 + Caption = '-' + TabOrder = 14 + OnClick = Button15Click + end + object Button16: TButton + Left = 464 + Top = 160 + Width = 75 + Height = 129 + Caption = 'C' + TabOrder = 15 + OnClick = Button16Click + end + object Button17: TButton + Left = 464 + Top = 304 + Width = 75 + Height = 129 + Caption = '=' + TabOrder = 16 + OnClick = Button17Click + end + object Edit1: TEdit + Left = 112 + Top = 96 + Width = 425 + Height = 37 + Font.Charset = DEFAULT_CHARSET + Font.Color = clWindowText + Font.Height = -23 + Font.Name = 'MS Sans Serif' + Font.Style = [] + ParentFont = False + TabOrder = 17 + end +end diff --git a/Unit3.~h b/Unit3.~h new file mode 100644 index 0000000..13abc63 --- /dev/null +++ b/Unit3.~h @@ -0,0 +1,63 @@ +//--------------------------------------------------------------------------- + +#ifndef Unit3H +#define Unit3H +//--------------------------------------------------------------------------- +#include +#include +#include +#include +//--------------------------------------------------------------------------- +class TForm3 : public TForm +{ +__published: // IDE-managed Components + TButton *Button1; + TButton *Button2; + TButton *Button3; + TButton *Button4; + TButton *Button5; + TButton *Button6; + TButton *Button7; + TButton *Button8; + TButton *Button9; + TButton *Button10; + TButton *Button11; + TButton *Button12; + TButton *Button13; + TButton *Button14; + TButton *Button15; + TButton *Button16; + TButton *Button17; + TEdit *Edit1; + void __fastcall Button10Click(TObject *Sender); + void __fastcall Button7Click(TObject *Sender); + void __fastcall Button8Click(TObject *Sender); + void __fastcall Button9Click(TObject *Sender); + void __fastcall Button4Click(TObject *Sender); + void __fastcall Button5Click(TObject *Sender); + void __fastcall Button6Click(TObject *Sender); + void __fastcall Button1Click(TObject *Sender); + void __fastcall Button2Click(TObject *Sender); + void __fastcall Button3Click(TObject *Sender); + void __fastcall Button13Click(TObject *Sender); + void __fastcall Button12Click(TObject *Sender); + void __fastcall Button14Click(TObject *Sender); + void __fastcall Button15Click(TObject *Sender); + void __fastcall Button16Click(TObject *Sender); + void __fastcall Button17Click(TObject *Sender); +private: // User declarations +public: // User declarations +double x; +double y; +char znak; +bool przecinek; +char dodawanie; +char odejmowanie; +char mnozenie; +char dzielenie; + __fastcall TForm3(TComponent* Owner); +}; +//--------------------------------------------------------------------------- +extern PACKAGE TForm3 *Form3; +//--------------------------------------------------------------------------- +#endif