Interface update

This commit is contained in:
Michał Jurgo 2016-11-17 08:56:06 +01:00
parent 838c132a74
commit 636dd5f512
11 changed files with 406 additions and 0 deletions

Binary file not shown.

Binary file not shown.

BIN
interface/Project2.tds Normal file

Binary file not shown.

View File

@ -0,0 +1,66 @@
//---------------------------------------------------------------------------
#include <vcl.h>
#include <iostream.h>
#include <fstream.h>
#include <String>
#include <windows.h>
#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();
}
//---------------------------------------------------------------------------

View File

@ -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

36
interface/ProjektCrane.h Normal file
View File

@ -0,0 +1,36 @@
//---------------------------------------------------------------------------
#ifndef ProjektCraneH
#define ProjektCraneH
//---------------------------------------------------------------------------
#include <Classes.hpp>
#include <Controls.hpp>
#include <StdCtrls.hpp>
#include <Forms.hpp>
#include <ExtCtrls.hpp>
#include <Grids.hpp>
//---------------------------------------------------------------------------
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

BIN
interface/ProjektCrane.obj Normal file

Binary file not shown.

View File

@ -0,0 +1,73 @@
//---------------------------------------------------------------------------
#include <vcl.h>
#pragma hdrstop
#include <iostream.h>
#include <fstream.h>
#include <String>
#include <windows.h>
#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();
}
//---------------------------------------------------------------------------

View File

@ -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

36
interface/ProjektCrane.~h Normal file
View File

@ -0,0 +1,36 @@
//---------------------------------------------------------------------------
#ifndef ProjektCraneH
#define ProjektCraneH
//---------------------------------------------------------------------------
#include <Classes.hpp>
#include <Controls.hpp>
#include <StdCtrls.hpp>
#include <Forms.hpp>
#include <ExtCtrls.hpp>
#include <Grids.hpp>
//---------------------------------------------------------------------------
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

View File

@ -0,0 +1 @@
I want you to go to A4