diff --git a/interface/Project2.exe b/interface/Project2.exe index a3e9d70..c5d3f9a 100644 Binary files a/interface/Project2.exe and b/interface/Project2.exe differ diff --git a/interface/Project2.obj b/interface/Project2.obj index 332f4e5..1400824 100644 Binary files a/interface/Project2.obj and b/interface/Project2.obj differ diff --git a/interface/Project2.tds b/interface/Project2.tds new file mode 100644 index 0000000..d40845b Binary files /dev/null and b/interface/Project2.tds differ diff --git a/interface/ProjektCrane.cpp b/interface/ProjektCrane.cpp new file mode 100644 index 0000000..0f7a7d1 --- /dev/null +++ b/interface/ProjektCrane.cpp @@ -0,0 +1,66 @@ +//--------------------------------------------------------------------------- + +#include +#include +#include +#include +#include +#include "ProjektCrane.h" +//--------------------------------------------------------------------------- +#pragma package(smart_init) +#pragma resource "*.dfm" +TForm1 *Form1; + +//--------------------------------------------------------------------------- +__fastcall TForm1::TForm1(TComponent* Owner) + : TForm(Owner) +{ +} +//--------------------------------------------------------------------------- + + +void __fastcall TForm1::StringGrid1Click(TObject *Sender) +{ +StringGrid1->Cells[0][1] = "1"; +StringGrid1->Cells[0][2] = "2"; +StringGrid1->Cells[0][3] = "3"; +StringGrid1->Cells[0][4] = "4"; +StringGrid1->Cells[0][5] = "5"; +StringGrid1->Cells[0][6] = "6"; +StringGrid1->Cells[0][7] = "7"; +StringGrid1->Cells[0][8] = "8"; +StringGrid1->Cells[0][9] = "9"; +StringGrid1->Cells[0][10] = "10"; +StringGrid1->Cells[1][0] = "A"; +StringGrid1->Cells[2][0] = "B"; +StringGrid1->Cells[3][0] = "C"; +StringGrid1->Cells[4][0] = "D"; +StringGrid1->Cells[5][0] = "E"; +StringGrid1->Cells[6][0] = "F"; +StringGrid1->Cells[7][0] = "G"; +StringGrid1->Cells[8][0] = "H"; +StringGrid1->Cells[9][0] = "I"; +StringGrid1->Cells[10][0] = "J"; +} +//--------------------------------------------------------------------------- + +void __fastcall TForm1::Button1Click(TObject *Sender) +{ +String mystr = Edit1->Text; +ofstream myfile; +myfile.open("instructions.txt"); +myfile << mystr.c_str(); +myfile.close(); +Edit1->Clear(); +} +//--------------------------------------------------------------------------- +void __fastcall TForm1::Button2Click(TObject *Sender) +{ +Application->Terminate(); +} +//--------------------------------------------------------------------------- +void __fastcall TForm1::Button3Click(TObject *Sender) +{ +Application->Terminate(); +} +//--------------------------------------------------------------------------- diff --git a/interface/ProjektCrane.dfm b/interface/ProjektCrane.dfm new file mode 100644 index 0000000..fcaa82a --- /dev/null +++ b/interface/ProjektCrane.dfm @@ -0,0 +1,97 @@ +object Form1: TForm1 + Left = 376 + Top = 142 + Width = 800 + Height = 600 + Caption = 'Form1' + Color = clBtnFace + Font.Charset = DEFAULT_CHARSET + Font.Color = clWindowText + Font.Height = -11 + Font.Name = 'MS Sans Serif' + Font.Style = [] + OldCreateOrder = False + PixelsPerInch = 96 + TextHeight = 13 + object Label1: TLabel + Left = 296 + Top = 8 + Width = 187 + Height = 33 + Caption = 'Crane alpha 0.0.4' + Font.Charset = EASTEUROPE_CHARSET + Font.Color = clWindowText + Font.Height = -29 + Font.Name = 'Arial Narrow' + Font.Style = [] + ParentFont = False + end + object Label2: TLabel + Left = 256 + Top = 536 + Width = 268 + Height = 13 + Caption = 'Copyrights: Chlebzmaslem 2016-2017. All rights reserved.' + end + object StringGrid1: TStringGrid + Left = 104 + Top = 64 + Width = 257 + Height = 257 + ColCount = 11 + DefaultColWidth = 22 + DefaultRowHeight = 22 + RowCount = 11 + TabOrder = 0 + OnClick = StringGrid1Click + end + object RadioGroup1: TRadioGroup + Left = 448 + Top = 64 + Width = 217 + Height = 257 + Caption = 'Storage Data:' + TabOrder = 1 + end + object ScrollBox1: TScrollBox + Left = 104 + Top = 328 + Width = 561 + Height = 65 + TabOrder = 2 + end + object Edit1: TEdit + Left = 104 + Top = 392 + Width = 561 + Height = 21 + TabOrder = 3 + end + object Button1: TButton + Left = 560 + Top = 416 + Width = 105 + Height = 25 + Caption = 'Submit' + TabOrder = 4 + OnClick = Button1Click + end + object Button2: TButton + Left = 528 + Top = 472 + Width = 145 + Height = 41 + Caption = 'Save and exit' + TabOrder = 5 + OnClick = Button2Click + end + object Button3: TButton + Left = 104 + Top = 472 + Width = 145 + Height = 41 + Caption = 'Exit' + TabOrder = 6 + OnClick = Button3Click + end +end diff --git a/interface/ProjektCrane.h b/interface/ProjektCrane.h new file mode 100644 index 0000000..331e291 --- /dev/null +++ b/interface/ProjektCrane.h @@ -0,0 +1,36 @@ +//--------------------------------------------------------------------------- + +#ifndef ProjektCraneH +#define ProjektCraneH +//--------------------------------------------------------------------------- +#include +#include +#include +#include +#include +#include +//--------------------------------------------------------------------------- +class TForm1 : public TForm +{ +__published: // IDE-managed Components + TLabel *Label1; + TLabel *Label2; + TStringGrid *StringGrid1; + TRadioGroup *RadioGroup1; + TScrollBox *ScrollBox1; + TEdit *Edit1; + TButton *Button1; + TButton *Button2; + TButton *Button3; + void __fastcall StringGrid1Click(TObject *Sender); + void __fastcall Button1Click(TObject *Sender); + void __fastcall Button2Click(TObject *Sender); + void __fastcall Button3Click(TObject *Sender); +private: // User declarations +public: // User declarations + __fastcall TForm1(TComponent* Owner); +}; +//--------------------------------------------------------------------------- +extern PACKAGE TForm1 *Form1; +//--------------------------------------------------------------------------- +#endif diff --git a/interface/ProjektCrane.obj b/interface/ProjektCrane.obj new file mode 100644 index 0000000..2c355db Binary files /dev/null and b/interface/ProjektCrane.obj differ diff --git a/interface/ProjektCrane.~cpp b/interface/ProjektCrane.~cpp new file mode 100644 index 0000000..3a694a2 --- /dev/null +++ b/interface/ProjektCrane.~cpp @@ -0,0 +1,73 @@ +//--------------------------------------------------------------------------- + +#include +#pragma hdrstop +#include +#include +#include +#include +#include "ProjektCrane.h" +//--------------------------------------------------------------------------- +#pragma package(smart_init) +#pragma resource "*.dfm" +TForm1 *Form1; + + +int writefile(String A) +{ + ofstream myfile; + myfile.open("example.txt"); + myfile << A; + myfile.close(); + return 0; +} +//--------------------------------------------------------------------------- +__fastcall TForm1::TForm1(TComponent* Owner) + : TForm(Owner) +{ +} +//--------------------------------------------------------------------------- + + +void __fastcall TForm1::StringGrid1Click(TObject *Sender) +{ +StringGrid1->Cells[0][1] = "1"; +StringGrid1->Cells[0][2] = "2"; +StringGrid1->Cells[0][3] = "3"; +StringGrid1->Cells[0][4] = "4"; +StringGrid1->Cells[0][5] = "5"; +StringGrid1->Cells[0][6] = "6"; +StringGrid1->Cells[0][7] = "7"; +StringGrid1->Cells[0][8] = "8"; +StringGrid1->Cells[0][9] = "9"; +StringGrid1->Cells[0][10] = "10"; +StringGrid1->Cells[1][0] = "A"; +StringGrid1->Cells[2][0] = "B"; +StringGrid1->Cells[3][0] = "C"; +StringGrid1->Cells[4][0] = "D"; +StringGrid1->Cells[5][0] = "E"; +StringGrid1->Cells[6][0] = "F"; +StringGrid1->Cells[7][0] = "G"; +StringGrid1->Cells[8][0] = "H"; +StringGrid1->Cells[9][0] = "I"; +StringGrid1->Cells[10][0] = "J"; +} +//--------------------------------------------------------------------------- + +void __fastcall TForm1::Button1Click(TObject *Sender) +{ +String mystr = Edit1 +writefile(mystr); +Edit1->Clear(); +} +//--------------------------------------------------------------------------- +void __fastcall TForm1::Button2Click(TObject *Sender) +{ +Application->Terminate(); +} +//--------------------------------------------------------------------------- +void __fastcall TForm1::Button3Click(TObject *Sender) +{ +Application->Terminate(); +} +//--------------------------------------------------------------------------- diff --git a/interface/ProjektCrane.~dfm b/interface/ProjektCrane.~dfm new file mode 100644 index 0000000..fcaa82a --- /dev/null +++ b/interface/ProjektCrane.~dfm @@ -0,0 +1,97 @@ +object Form1: TForm1 + Left = 376 + Top = 142 + Width = 800 + Height = 600 + Caption = 'Form1' + Color = clBtnFace + Font.Charset = DEFAULT_CHARSET + Font.Color = clWindowText + Font.Height = -11 + Font.Name = 'MS Sans Serif' + Font.Style = [] + OldCreateOrder = False + PixelsPerInch = 96 + TextHeight = 13 + object Label1: TLabel + Left = 296 + Top = 8 + Width = 187 + Height = 33 + Caption = 'Crane alpha 0.0.4' + Font.Charset = EASTEUROPE_CHARSET + Font.Color = clWindowText + Font.Height = -29 + Font.Name = 'Arial Narrow' + Font.Style = [] + ParentFont = False + end + object Label2: TLabel + Left = 256 + Top = 536 + Width = 268 + Height = 13 + Caption = 'Copyrights: Chlebzmaslem 2016-2017. All rights reserved.' + end + object StringGrid1: TStringGrid + Left = 104 + Top = 64 + Width = 257 + Height = 257 + ColCount = 11 + DefaultColWidth = 22 + DefaultRowHeight = 22 + RowCount = 11 + TabOrder = 0 + OnClick = StringGrid1Click + end + object RadioGroup1: TRadioGroup + Left = 448 + Top = 64 + Width = 217 + Height = 257 + Caption = 'Storage Data:' + TabOrder = 1 + end + object ScrollBox1: TScrollBox + Left = 104 + Top = 328 + Width = 561 + Height = 65 + TabOrder = 2 + end + object Edit1: TEdit + Left = 104 + Top = 392 + Width = 561 + Height = 21 + TabOrder = 3 + end + object Button1: TButton + Left = 560 + Top = 416 + Width = 105 + Height = 25 + Caption = 'Submit' + TabOrder = 4 + OnClick = Button1Click + end + object Button2: TButton + Left = 528 + Top = 472 + Width = 145 + Height = 41 + Caption = 'Save and exit' + TabOrder = 5 + OnClick = Button2Click + end + object Button3: TButton + Left = 104 + Top = 472 + Width = 145 + Height = 41 + Caption = 'Exit' + TabOrder = 6 + OnClick = Button3Click + end +end diff --git a/interface/ProjektCrane.~h b/interface/ProjektCrane.~h new file mode 100644 index 0000000..331e291 --- /dev/null +++ b/interface/ProjektCrane.~h @@ -0,0 +1,36 @@ +//--------------------------------------------------------------------------- + +#ifndef ProjektCraneH +#define ProjektCraneH +//--------------------------------------------------------------------------- +#include +#include +#include +#include +#include +#include +//--------------------------------------------------------------------------- +class TForm1 : public TForm +{ +__published: // IDE-managed Components + TLabel *Label1; + TLabel *Label2; + TStringGrid *StringGrid1; + TRadioGroup *RadioGroup1; + TScrollBox *ScrollBox1; + TEdit *Edit1; + TButton *Button1; + TButton *Button2; + TButton *Button3; + void __fastcall StringGrid1Click(TObject *Sender); + void __fastcall Button1Click(TObject *Sender); + void __fastcall Button2Click(TObject *Sender); + void __fastcall Button3Click(TObject *Sender); +private: // User declarations +public: // User declarations + __fastcall TForm1(TComponent* Owner); +}; +//--------------------------------------------------------------------------- +extern PACKAGE TForm1 *Form1; +//--------------------------------------------------------------------------- +#endif diff --git a/interface/instructions.txt b/interface/instructions.txt new file mode 100644 index 0000000..0c3723d --- /dev/null +++ b/interface/instructions.txt @@ -0,0 +1 @@ +I want you to go to A4 \ No newline at end of file