summaryrefslogtreecommitdiff
path: root/plugins/Chess4Net/GameOptionsUnit.pas
diff options
context:
space:
mode:
authorVadim Dashevskiy <watcherhd@gmail.com>2012-10-08 09:10:06 +0000
committerVadim Dashevskiy <watcherhd@gmail.com>2012-10-08 09:10:06 +0000
commit194923c172167eb3fc33807ec8009b255f86337e (patch)
tree1effc97a1bd872cc3a5eac7a361250cf283e0efd /plugins/Chess4Net/GameOptionsUnit.pas
parentb2943645fed61d0c0cfee1225654e5ff44fd96f8 (diff)
Plugin is not adapted until someone can compile it and tell others how to do the same
git-svn-id: http://svn.miranda-ng.org/main/trunk@1809 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/Chess4Net/GameOptionsUnit.pas')
-rw-r--r--plugins/Chess4Net/GameOptionsUnit.pas191
1 files changed, 0 insertions, 191 deletions
diff --git a/plugins/Chess4Net/GameOptionsUnit.pas b/plugins/Chess4Net/GameOptionsUnit.pas
deleted file mode 100644
index 0c8fd6cdeb..0000000000
--- a/plugins/Chess4Net/GameOptionsUnit.pas
+++ /dev/null
@@ -1,191 +0,0 @@
-////////////////////////////////////////////////////////////////////////////////
-// All code below is exclusively owned by author of Chess4Net - Pavel Perminov
-// (packpaul@mail.ru, packpaul1@gmail.com).
-// Any changes, modifications, borrowing and adaptation are a subject for
-// explicit permition from the owner.
-
-unit GameOptionsUnit;
-
-interface
-
-uses
- Windows, Messages, SysUtils, Classes, Graphics, Controls,
- Dialogs, StdCtrls, TntStdCtrls, ExtCtrls, ComCtrls,
- ModalForm;
-
-type
- TGameOptionsForm = class(TModalForm)
- OkButton: TTntButton;
- CancelButton: TTntButton;
- TimeControlGroupBox: TTntGroupBox;
- EqualTimeCheckBox: TTntCheckBox;
- YouGroupBox: TTntGroupBox;
- YouMinLabel: TTntLabel;
- YouIncLabel: TTntLabel;
- YouMinEdit: TEdit;
- YouIncEdit: TEdit;
- YouUnlimitedCheckBox: TTntCheckBox;
- OpponentGroupBox: TTntGroupBox;
- OpponentMinLabel: TTntLabel;
- OpponentIncLabel: TTntLabel;
- OpponentIncEdit: TEdit;
- OpponentMinEdit: TEdit;
- OpponentUnlimitedCheckBox: TTntCheckBox;
- Panel1: TPanel;
- AutoFlagCheckBox: TTntCheckBox;
- TakeBackCheckBox: TTntCheckBox;
- TrainingModeGroupBox: TTntGroupBox;
- TrainingEnabledCheckBox: TTntCheckBox;
- ExtBaseComboBox: TTntComboBox;
- UsrBaseCheckBox: TTntCheckBox;
- ExtBaseLabel: TTntLabel;
- GamePauseCheckBox: TTntCheckBox;
- YouMinUpDown: TUpDown;
- YouIncUpDown: TUpDown;
- OpponentMinUpDown: TUpDown;
- OpponentIncUpDown: TUpDown;
- GameAdjournCheckBox: TTntCheckBox;
- procedure YouEditChange(Sender: TObject);
- procedure OpponentEditChange(Sender: TObject);
- procedure EqualTimeCheckBoxClick(Sender: TObject);
- procedure UnlimitedCheckBoxClick(Sender: TObject);
- procedure TrainingEnabledCheckBoxClick(Sender: TObject);
- procedure ExtBaseComboBoxChange(Sender: TObject);
- procedure FormShow(Sender: TObject);
- procedure FormCreate(Sender: TObject);
- private
- procedure FLocalize;
- protected
- function GetModalID: TModalFormID; override;
- end;
-
-implementation
-
-{$R *.dfm}
-
-uses
- LocalizerUnit;
-
-procedure TGameOptionsForm.YouEditChange(Sender: TObject);
-begin
- YouMinEdit.Text := IntToStr(YouMinUpDown.Position);
- YouIncEdit.Text := IntToStr(YouIncUpDown.Position);
- if EqualTimeCheckBox.Checked then
- begin
- OpponentMinEdit.Text := YouMinEdit.Text;
- OpponentIncEdit.Text := YouIncEdit.Text;
- end;
-end;
-
-
-procedure TGameOptionsForm.OpponentEditChange(Sender: TObject);
-begin
- OpponentMinEdit.Text := IntToStr(OpponentMinUpDown.Position);
- OpponentIncEdit.Text := IntToStr(OpponentIncUpDown.Position);
- if EqualTimeCheckBox.Checked then
- begin
- YouMinEdit.Text := OpponentMinEdit.Text;
- YouIncEdit.Text := OpponentIncEdit.Text;
- end;
-end;
-
-
-procedure TGameOptionsForm.EqualTimeCheckBoxClick(Sender: TObject);
-begin
- if EqualTimeCheckBox.Checked then
- begin
- OpponentMinEdit.Text := YouMinEdit.Text;
- OpponentIncEdit.Text := YouIncEdit.Text;
- OpponentUnlimitedCheckBox.Checked := YouUnlimitedCheckBox.Checked;
- end;
-end;
-
-
-procedure TGameOptionsForm.UnlimitedCheckBoxClick(Sender: TObject);
-begin
- if EqualTimeCheckBox.Checked then
- begin
- YouUnlimitedCheckBox.Checked := TCheckBox(Sender).Checked;
- OpponentUnlimitedCheckBox.Checked := TCheckBox(Sender).Checked;
- end;
-
- YouMinEdit.Enabled := (not YouUnlimitedCheckBox.Checked);
- YouMinUpDown.Enabled := (not YouUnlimitedCheckBox.Checked);
- YouIncEdit.Enabled := (not YouUnlimitedCheckBox.Checked);
- YouIncUpDown.Enabled := (not YouUnlimitedCheckBox.Checked);
-
- OpponentMinEdit.Enabled := (not OpponentUnlimitedCheckBox.Checked);
- OpponentMinUpDown.Enabled := (not OpponentUnlimitedCheckBox.Checked);
- OpponentIncEdit.Enabled := (not OpponentUnlimitedCheckBox.Checked);
- OpponentIncUpDown.Enabled := (not OpponentUnlimitedCheckBox.Checked);
-end;
-
-
-procedure TGameOptionsForm.TrainingEnabledCheckBoxClick(Sender: TObject);
-begin
- ExtBaseComboBox.Enabled := TrainingEnabledCheckBox.Checked;
- UsrBaseCheckBox.Enabled := TrainingEnabledCheckBox.Checked and (ExtBaseComboBox.ItemIndex <> 0);
- TakeBackCheckBox.Enabled := not TrainingEnabledCheckBox.Checked;
-end;
-
-
-procedure TGameOptionsForm.ExtBaseComboBoxChange(Sender: TObject);
-begin
- UsrBaseCheckBox.Enabled := (ExtBaseComboBox.ItemIndex <> 0);
- if ExtBaseComboBox.ItemIndex = 0 then
- UsrBaseCheckBox.Checked := TRUE;
-end;
-
-
-procedure TGameOptionsForm.FormShow(Sender: TObject);
-begin
- ExtBaseComboBoxChange(Sender);
-end;
-
-
-function TGameOptionsForm.GetModalID: TModalFormID;
-begin
- Result := mfGameOptions;
-end;
-
-
-procedure TGameOptionsForm.FormCreate(Sender: TObject);
-begin
- FLocalize;
-end;
-
-
-procedure TGameOptionsForm.FLocalize;
-begin
- with TLocalizer.Instance do
- begin
- Caption := GetLabel(24);
-
- TimeControlGroupBox.Caption := GetLabel(25);
- EqualTimeCheckBox.Caption := GetLabel(26);
- YouGroupBox.Caption := GetLabel(27);
- OpponentGroupBox.Caption := GetLabel(28);
- YouUnlimitedCheckBox.Caption := GetLabel(29);
- OpponentUnlimitedCheckBox.Caption := GetLabel(29);
- YouMinLabel.Caption := GetLabel(30);
- OpponentMinLabel.Caption := GetLabel(30);
- YouIncLabel.Caption := GetLabel(31);
- OpponentIncLabel.Caption := GetLabel(31);
-
- TrainingModeGroupBox.Caption := GetLabel(32);
- TrainingEnabledCheckBox.Caption := GetLabel(33);
- ExtBaseLabel.Caption := GetLabel(34);
- UsrBaseCheckBox.Caption := GetLabel(35);
-
- GamePauseCheckBox.Caption := GetLabel(36);
- GameAdjournCheckBox.Caption := GetLabel(37);
- TakeBackCheckBox.Caption := GetLabel(38);
- AutoFlagCheckBox.Caption := GetLabel(39);
-
- OkButton.Caption := GetLabel(11);
- CancelButton.Caption := GetLabel(12);
- end;
-end;
-
-
-end.