-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 6a8626f
Showing
42 changed files
with
5,328 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
program Project1; | ||
|
||
uses | ||
Vcl.Forms, | ||
Unit1 in 'Unit1.pas' {Form1}, | ||
Unit2 in 'Unit2.pas' {Form2}, | ||
Vcl.Themes, | ||
Vcl.Styles; | ||
|
||
{$R *.res} | ||
|
||
begin | ||
Application.Initialize; | ||
Application.MainFormOnTaskbar := True; | ||
TStyleManager.TrySetStyle('Windows10 Dark'); | ||
Application.CreateForm(TForm1, Form1); | ||
Application.CreateForm(TForm2, Form2); | ||
Application.Run; | ||
end. |
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<BorlandProject> | ||
<Transactions> | ||
<Transaction>1899-12-30 00:00:00.000.755,C:\Users\js22\Desktop\상훈\주차관리시스템\Unit2.dfm=C:\Users\js22\Documents\Embarcadero\Studio\Projects\Unit2.dfm</Transaction> | ||
<Transaction>1899-12-30 00:00:00.000.705,C:\Users\js22\Desktop\상훈\주차관리시스템\Project1.dproj=C:\Users\js22\Documents\Embarcadero\Studio\Projects\Project1.dproj</Transaction> | ||
<Transaction>1899-12-30 00:00:00.000.755,C:\Users\js22\Desktop\상훈\주차관리시스템\Unit2.pas=C:\Users\js22\Documents\Embarcadero\Studio\Projects\Unit2.pas</Transaction> | ||
<Transaction>1899-12-30 00:00:00.000.841,=C:\Users\js22\Documents\Embarcadero\Studio\Projects\Unit2.pas</Transaction> | ||
<Transaction>1899-12-30 00:00:00.000.194,=C:\Users\js22\Documents\Embarcadero\Studio\Projects\Unit1.pas</Transaction> | ||
<Transaction>1899-12-30 00:00:00.000.494,C:\Users\js22\Desktop\상훈\주차관리시스템\Unit1.dfm=C:\Users\js22\Documents\Embarcadero\Studio\Projects\Unit1.dfm</Transaction> | ||
<Transaction>1899-12-30 00:00:00.000.494,C:\Users\js22\Desktop\상훈\주차관리시스템\Unit1.pas=C:\Users\js22\Documents\Embarcadero\Studio\Projects\Unit1.pas</Transaction> | ||
</Transactions> | ||
</BorlandProject> |
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,91 @@ | ||
object Form1: TForm1 | ||
Left = 654 | ||
Top = 353 | ||
BorderStyle = bsSingle | ||
Caption = #51452#52264#44288#47532' '#49884#49828#53596' '#47196#44536#51064 | ||
ClientHeight = 250 | ||
ClientWidth = 352 | ||
Color = clBtnFace | ||
Font.Charset = DEFAULT_CHARSET | ||
Font.Color = clWindowText | ||
Font.Height = -12 | ||
Font.Name = 'Segoe UI' | ||
Font.Style = [] | ||
Position = poDesigned | ||
TextHeight = 15 | ||
object GroupBox1: TGroupBox | ||
Left = 8 | ||
Top = 2 | ||
Width = 286 | ||
Height = 92 | ||
Caption = #47196#44536#51064 | ||
TabOrder = 0 | ||
object editID: TEdit | ||
Left = 16 | ||
Top = 24 | ||
Width = 161 | ||
Height = 23 | ||
ImeMode = imDisable | ||
TabOrder = 0 | ||
Text = 'ID' | ||
end | ||
object editPW: TEdit | ||
Left = 16 | ||
Top = 53 | ||
Width = 161 | ||
Height = 23 | ||
ImeMode = imDisable | ||
PasswordChar = '*' | ||
TabOrder = 1 | ||
Text = 'PW' | ||
end | ||
object btnLogin: TButton | ||
Left = 183 | ||
Top = 24 | ||
Width = 75 | ||
Height = 53 | ||
Caption = #47196#44536#51064 | ||
TabOrder = 2 | ||
OnClick = btnLoginClick | ||
end | ||
end | ||
object DBGrid1: TDBGrid | ||
Left = 8 | ||
Top = 120 | ||
Width = 337 | ||
Height = 120 | ||
DataSource = DataSource1 | ||
Options = [dgEditing, dgAlwaysShowEditor, dgTitles, dgIndicator, dgColumnResize, dgColLines, dgRowLines, dgTabs, dgConfirmDelete, dgCancelOnExit, dgTitleClick, dgTitleHotTrack] | ||
TabOrder = 1 | ||
TitleFont.Charset = DEFAULT_CHARSET | ||
TitleFont.Color = clWindowText | ||
TitleFont.Height = -12 | ||
TitleFont.Name = 'Segoe UI' | ||
TitleFont.Style = [] | ||
end | ||
object FDPhysMySQLDriverLink1: TFDPhysMySQLDriverLink | ||
VendorLib = 'C:\Users\js22\Desktop\libmariadb.dll' | ||
Left = 40 | ||
Top = 280 | ||
end | ||
object FDQuery1: TFDQuery | ||
Connection = FDConnection1 | ||
Left = 120 | ||
Top = 264 | ||
end | ||
object FDConnection1: TFDConnection | ||
Params.Strings = ( | ||
'Database=parkinglot' | ||
'User_Name=root' | ||
'Password=root' | ||
'Server=127.0.0.1' | ||
'DriverID=MySQL') | ||
Left = 192 | ||
Top = 264 | ||
end | ||
object DataSource1: TDataSource | ||
DataSet = FDQuery1 | ||
Left = 264 | ||
Top = 304 | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,98 @@ | ||
unit Unit1; | ||
|
||
interface | ||
|
||
uses | ||
Winapi.Windows, Winapi.Messages, System.SysUtils, System.Variants, System.Classes, Vcl.Graphics, | ||
Vcl.Controls, Vcl.Forms, Vcl.Dialogs, Data.DB, FireDAC.Phys.MySQLDef, | ||
FireDAC.Stan.Intf, FireDAC.Stan.Option, FireDAC.Stan.Param, | ||
FireDAC.Stan.Error, FireDAC.DatS, FireDAC.Phys.Intf, FireDAC.DApt.Intf, | ||
FireDAC.Stan.Async, FireDAC.DApt, FireDAC.UI.Intf, FireDAC.Stan.Def, | ||
FireDAC.Stan.Pool, FireDAC.Phys, FireDAC.Phys.MySQL, FireDAC.VCLUI.Wait, | ||
FireDAC.Comp.Client, FireDAC.Comp.DataSet, Vcl.Grids, Vcl.DBGrids, | ||
Vcl.StdCtrls, system.Hash; | ||
|
||
type | ||
TForm1 = class(TForm) | ||
GroupBox1: TGroupBox; | ||
editID: TEdit; | ||
editPW: TEdit; | ||
btnLogin: TButton; | ||
DBGrid1: TDBGrid; | ||
FDPhysMySQLDriverLink1: TFDPhysMySQLDriverLink; | ||
FDQuery1: TFDQuery; | ||
FDConnection1: TFDConnection; | ||
DataSource1: TDataSource; | ||
procedure btnLoginClick(Sender: TObject); | ||
private | ||
{ Private declarations } | ||
public | ||
{ Public declarations } | ||
end; | ||
|
||
var | ||
Form1: TForm1; | ||
|
||
implementation | ||
|
||
uses unit2; | ||
{$R *.dfm} | ||
|
||
procedure TForm1.btnLoginClick(Sender: TObject); | ||
var | ||
afterID1, afterID2, afterPW1, afterPW2 : string; | ||
|
||
begin | ||
afterID1 := StringReplace(editID.Text, '=', '',[rfReplaceAll, rfIgnoreCase]); | ||
afterID2 := StringReplace(afterID1, '-', '',[rfReplaceAll, rfIgnoreCase]); | ||
afterPW1 := StringReplace(editPW.Text, '=', '',[rfReplaceAll, rfIgnoreCase]); | ||
afterPW2 := StringReplace(afterPW1, '-', '',[rfReplaceAll, rfIgnoreCase]); | ||
|
||
editID.Text := afterID2; | ||
editPW.Text := afterPW2; | ||
|
||
|
||
try | ||
begin | ||
with FDConnection1 do begin | ||
Params.Clear; | ||
Params.Add('DriverID=MySQL'); | ||
Params.Add('Server=127.0.0.1'); | ||
Params.Add('Port=3306'); | ||
Params.Add('Database=parkinglot'); | ||
Params.Add('User_Name=root'); | ||
Params.Add('Password=root'); | ||
|
||
Params.Add('CharacterSet=utf8'); | ||
|
||
Open; | ||
end; | ||
with FDQuery1 do begin | ||
SQL.Clear; | ||
SQL.Add('select * from member'); | ||
SQL.Add('where mbID =:ID and mbPW =:PW'); | ||
Params.ParamByName('ID').AsString := afterID2; | ||
Params.ParamByName('PW').AsString := afterPW2; | ||
|
||
|
||
open; | ||
end; | ||
|
||
if afterID2 = dbGrid1.Fields[1].AsString then | ||
begin | ||
if afterPW2 = dbGrid1.Fields[2].AsString then | ||
begin | ||
showMessage('Login successful'); | ||
form1.Hide; | ||
form2.show; | ||
end | ||
end | ||
else | ||
showmessage('Login Filed'); | ||
end | ||
except | ||
ShowMessage('Server Login Error'); | ||
end; | ||
end; | ||
|
||
end. |
Oops, something went wrong.