diff --git a/applications/fpchess/fpchess.lpi b/applications/fpchess/fpchess.lpi
index f748eb224..75b0fcdb7 100644
--- a/applications/fpchess/fpchess.lpi
+++ b/applications/fpchess/fpchess.lpi
@@ -34,7 +34,7 @@
-
+
@@ -63,15 +63,10 @@
-
-
-
-
-
-
+
diff --git a/applications/fpchess/fpchess.lpr b/applications/fpchess/fpchess.lpr
index 06674600b..748c64ecc 100644
--- a/applications/fpchess/fpchess.lpr
+++ b/applications/fpchess/fpchess.lpr
@@ -7,7 +7,7 @@ uses
cthreads,
{$ENDIF}{$ENDIF}
Interfaces, // this includes the LCL widgetset
- Forms, lnetvisual, mainform, chessdrawer, chessgame, chessconfig, tcpcomm,
+ Forms, lnetvisual, mainform, chessdrawer, chessgame, chessconfig,
chesstcputils;
{$R *.res}
diff --git a/applications/fpchess/mainform.lfm b/applications/fpchess/mainform.lfm
index 8d03c1e40..53e94cc09 100644
--- a/applications/fpchess/mainform.lfm
+++ b/applications/fpchess/mainform.lfm
@@ -13,7 +13,7 @@ object formChess: TformChess
Height = 433
Top = 0
Width = 360
- PageIndex = 0
+ PageIndex = 4
Align = alClient
TabOrder = 0
TabStop = True
@@ -54,18 +54,19 @@ object formChess: TformChess
TabOrder = 0
end
object btnDirectComm: TBitBtn
- Left = 62
+ Left = 64
Height = 30
Top = 288
- Width = 226
+ Width = 224
Caption = 'Play with a friend through a direct connection'
+ Enabled = False
OnClick = HandleMainScreenButton
TabOrder = 1
end
object BitBtn3: TBitBtn
- Left = 64
+ Left = 62
Height = 30
- Top = 336
+ Top = 376
Width = 224
Caption = 'Quit'
TabOrder = 2
@@ -146,11 +147,20 @@ object formChess: TformChess
OnClick = HandleMainScreenButton
TabOrder = 7
end
+ object btnWebservice: TBitBtn
+ Left = 64
+ Height = 30
+ Top = 328
+ Width = 224
+ Caption = 'Play with a friend through the chess Webservice'
+ OnClick = HandleMainScreenButton
+ TabOrder = 8
+ end
end
object pageConfigConnection: TUNBPage
OnBeforeShow = pageBeforeShow
- ClientWidth = 2880
- ClientHeight = 3464
+ ClientWidth = 360
+ ClientHeight = 433
object Label3: TLabel
Left = 0
Height = 32
@@ -165,7 +175,7 @@ object formChess: TformChess
end
object editRemoteID: TLabeledEdit
Left = 112
- Height = 22
+ Height = 21
Top = 72
Width = 120
EditLabel.AnchorSideLeft.Control = editRemoteID
@@ -173,10 +183,10 @@ object formChess: TformChess
EditLabel.AnchorSideTop.Side = asrCenter
EditLabel.AnchorSideRight.Control = editRemoteID
EditLabel.AnchorSideBottom.Control = editRemoteID
- EditLabel.Left = 8
- EditLabel.Height = 17
+ EditLabel.Left = 31
+ EditLabel.Height = 14
EditLabel.Top = 75
- EditLabel.Width = 101
+ EditLabel.Width = 78
EditLabel.Caption = 'Your friend''s IP:'
EditLabel.ParentColor = False
LabelPosition = lpLeft
@@ -184,7 +194,7 @@ object formChess: TformChess
end
object editLocalIP: TLabeledEdit
Left = 112
- Height = 22
+ Height = 21
Top = 104
Width = 120
EditLabel.AnchorSideLeft.Control = editLocalIP
@@ -192,29 +202,30 @@ object formChess: TformChess
EditLabel.AnchorSideTop.Side = asrCenter
EditLabel.AnchorSideRight.Control = editLocalIP
EditLabel.AnchorSideBottom.Control = editLocalIP
- EditLabel.Left = 4
- EditLabel.Height = 17
+ EditLabel.Left = 27
+ EditLabel.Height = 14
EditLabel.Top = 107
- EditLabel.Width = 105
+ EditLabel.Width = 82
EditLabel.Caption = 'Your IP Address:'
EditLabel.ParentColor = False
LabelPosition = lpLeft
ReadOnly = True
TabOrder = 1
end
- object BitBtn1: TBitBtn
+ object btnConnect: TBitBtn
Left = 8
Height = 30
Top = 184
Width = 224
Caption = 'Connect'
+ OnClick = btnConnectClick
TabOrder = 2
end
end
object pageConnecting: TUNBPage
OnBeforeShow = pageBeforeShow
- ClientWidth = 15360
- ClientHeight = 19200
+ ClientWidth = 360
+ ClientHeight = 433
object Label4: TLabel
Left = 0
Height = 32
@@ -237,8 +248,8 @@ object formChess: TformChess
end
object pageGame: TUNBPage
OnBeforeShow = pageBeforeShow
- ClientWidth = 7680
- ClientHeight = 13856
+ ClientWidth = 360
+ ClientHeight = 433
object Label5: TLabel
Left = 0
Height = 32
@@ -260,6 +271,50 @@ object formChess: TformChess
ParentColor = False
end
end
+ object pageWebservice: TUNBPage
+ ClientWidth = 360
+ ClientHeight = 433
+ object editWebserviceURL: TLabeledEdit
+ Left = 72
+ Height = 21
+ Top = 72
+ Width = 280
+ EditLabel.AnchorSideLeft.Control = editPlayerName
+ EditLabel.AnchorSideTop.Control = editPlayerName
+ EditLabel.AnchorSideTop.Side = asrCenter
+ EditLabel.AnchorSideRight.Control = editPlayerName
+ EditLabel.AnchorSideBottom.Control = editPlayerName
+ EditLabel.Left = 24
+ EditLabel.Height = 14
+ EditLabel.Top = 75
+ EditLabel.Width = 61
+ EditLabel.Caption = 'Player Name'
+ EditLabel.ParentColor = False
+ LabelPosition = lpLeft
+ TabOrder = 0
+ Text = 'http://www.bobswart.nl/cgi-bin/ChessISAPIServer.dll/wsdl/IDelphiChess'
+ end
+ object Label8: TLabel
+ Left = 0
+ Height = 32
+ Top = 8
+ Width = 360
+ Alignment = taCenter
+ AutoSize = False
+ Caption = 'Playing through the Chess Webservice'
+ Font.Height = -19
+ ParentColor = False
+ ParentFont = False
+ end
+ object Button1: TButton
+ Left = 35
+ Height = 25
+ Top = 140
+ Width = 75
+ Caption = 'Button1'
+ TabOrder = 1
+ end
+ end
end
object timerChessTimer: TTimer
OnTimer = timerChessTimerTimer
diff --git a/applications/fpchess/mainform.pas b/applications/fpchess/mainform.pas
index 5e7df80c7..241b3407b 100644
--- a/applications/fpchess/mainform.pas
+++ b/applications/fpchess/mainform.pas
@@ -26,13 +26,16 @@ type
{ TformChess }
TformChess = class(TForm)
- BitBtn1: TBitBtn;
+ btnConnect: TBitBtn;
+ btnWebservice: TBitBtn;
btnSinglePlayer: TBitBtn;
btnDirectComm: TBitBtn;
BitBtn3: TBitBtn;
btnHotSeat: TBitBtn;
+ Button1: TButton;
checkTimer: TCheckBox;
comboStartColor: TComboBox;
+ editWebserviceURL: TLabeledEdit;
Label1: TLabel;
Label2: TLabel;
Label3: TLabel;
@@ -40,6 +43,7 @@ type
Label5: TLabel;
Label6: TLabel;
Label7: TLabel;
+ Label8: TLabel;
labelPos: TLabel;
editRemoteID: TLabeledEdit;
editLocalIP: TLabeledEdit;
@@ -52,6 +56,8 @@ type
pageGame: TUNBPage;
spinPlayerTime: TSpinEdit;
timerChessTimer: TTimer;
+ pageWebservice: TUNBPage;
+ procedure btnConnectClick(Sender: TObject);
procedure FormCreate(Sender: TObject);
procedure HandleMainScreenButton(Sender: TObject);
procedure pageBeforeShow(Sender: TObject; ANewPage: TUNBPage; ANewIndex: Integer);
@@ -139,6 +145,12 @@ begin
vChessDrawer.LoadImages();
end;
+procedure TformChess.btnConnectClick(Sender: TObject);
+begin
+ notebookMain.PageIndex := INT_PAGE_CONNECTING;
+
+end;
+
{ TFormDrawerDelegate }
procedure TFormDrawerDelegate.HandleMouseMove(Sender: TObject;