You've already forked lazarus-ccr
209 lines
4.9 KiB
ObjectPascal
209 lines
4.9 KiB
ObjectPascal
![]() |
unit LatinSpecsUnit;
|
||
|
|
||
|
{$mode objfpc}{$H+}
|
||
|
|
||
|
interface
|
||
|
|
||
|
uses
|
||
|
Classes, SysUtils, FileUtil, LResources, Forms, Controls, Graphics, Dialogs,
|
||
|
StdCtrls, Buttons, MainUnit, Globals;
|
||
|
|
||
|
type
|
||
|
|
||
|
{ TLatinSpecsFrm }
|
||
|
|
||
|
TLatinSpecsFrm = class(TForm)
|
||
|
AInBtn: TBitBtn;
|
||
|
nPerCellEdit: TEdit;
|
||
|
GrpOutBtn: TBitBtn;
|
||
|
DataInBtn: TBitBtn;
|
||
|
DataOutBtn: TBitBtn;
|
||
|
AOutBtn: TBitBtn;
|
||
|
BInBtn: TBitBtn;
|
||
|
BOutBtn: TBitBtn;
|
||
|
CInBtn: TBitBtn;
|
||
|
COutBtn: TBitBtn;
|
||
|
DInBtn: TBitBtn;
|
||
|
DOutBtn: TBitBtn;
|
||
|
GrpInBtn: TBitBtn;
|
||
|
Label8: TLabel;
|
||
|
ResetBtn: TButton;
|
||
|
CancelBtn: TButton;
|
||
|
OKBtn: TButton;
|
||
|
ACodeEdit: TEdit;
|
||
|
BCodeEdit: TEdit;
|
||
|
CCodeEdit: TEdit;
|
||
|
DCodeEdit: TEdit;
|
||
|
GrpCodeEdit: TEdit;
|
||
|
DepVarEdit: TEdit;
|
||
|
Label1: TLabel;
|
||
|
Label2: TLabel;
|
||
|
Label3: TLabel;
|
||
|
Label4: TLabel;
|
||
|
Label5: TLabel;
|
||
|
Label6: TLabel;
|
||
|
Label7: TLabel;
|
||
|
VarList: TListBox;
|
||
|
procedure AInBtnClick(Sender: TObject);
|
||
|
procedure AOutBtnClick(Sender: TObject);
|
||
|
procedure BInBtnClick(Sender: TObject);
|
||
|
procedure BOutBtnClick(Sender: TObject);
|
||
|
procedure CInBtnClick(Sender: TObject);
|
||
|
procedure COutBtnClick(Sender: TObject);
|
||
|
procedure DataInBtnClick(Sender: TObject);
|
||
|
procedure DataOutBtnClick(Sender: TObject);
|
||
|
procedure DInBtnClick(Sender: TObject);
|
||
|
procedure DOutBtnClick(Sender: TObject);
|
||
|
procedure FormShow(Sender: TObject);
|
||
|
procedure GrpInBtnClick(Sender: TObject);
|
||
|
procedure GrpOutBtnClick(Sender: TObject);
|
||
|
procedure OKBtnClick(Sender: TObject);
|
||
|
procedure ResetBtnClick(Sender: TObject);
|
||
|
private
|
||
|
{ private declarations }
|
||
|
public
|
||
|
{ public declarations }
|
||
|
end;
|
||
|
|
||
|
var
|
||
|
LatinSpecsFrm: TLatinSpecsFrm;
|
||
|
|
||
|
implementation
|
||
|
uses LatinSqrsUnit;
|
||
|
|
||
|
|
||
|
{ TLatinSpecsFrm }
|
||
|
|
||
|
procedure TLatinSpecsFrm.ResetBtnClick(Sender: TObject);
|
||
|
VAR i : integer;
|
||
|
begin
|
||
|
VarList.Clear;
|
||
|
for i := 1 to NoVariables do
|
||
|
VarList.Items.Add(OS3MainFrm.DataGrid.Cells[i,0]);
|
||
|
end;
|
||
|
|
||
|
procedure TLatinSpecsFrm.FormShow(Sender: TObject);
|
||
|
begin
|
||
|
ResetBtnClick(Self);
|
||
|
end;
|
||
|
|
||
|
procedure TLatinSpecsFrm.GrpInBtnClick(Sender: TObject);
|
||
|
VAR index : integer;
|
||
|
begin
|
||
|
index := VarList.ItemIndex;
|
||
|
GrpCodeEdit.Text := VarList.Items.Strings[index];
|
||
|
VarList.Items.Delete(index);
|
||
|
GrpInBtn.Visible := false;
|
||
|
GrpOutBtn.Visible := true;
|
||
|
end;
|
||
|
|
||
|
procedure TLatinSpecsFrm.GrpOutBtnClick(Sender: TObject);
|
||
|
begin
|
||
|
VarList.Items.Add(GrpCodeEdit.Text);
|
||
|
GrpCodeEdit.Text := '';
|
||
|
GrpInBtn.Visible := true;
|
||
|
GrpOutBtn.Visible := false;
|
||
|
end;
|
||
|
|
||
|
procedure TLatinSpecsFrm.AInBtnClick(Sender: TObject);
|
||
|
VAR index : integer;
|
||
|
begin
|
||
|
index := VarList.ItemIndex;
|
||
|
ACodeEdit.Text := VarList.Items.Strings[index];
|
||
|
VarList.Items.Delete(index);
|
||
|
AinBtn.Visible := false;
|
||
|
AOutBtn.Visible := true;
|
||
|
end;
|
||
|
|
||
|
procedure TLatinSpecsFrm.AOutBtnClick(Sender: TObject);
|
||
|
begin
|
||
|
VarList.Items.Add(ACodeEdit.Text);
|
||
|
ACodeEdit.Text := '';
|
||
|
AinBtn.Visible := true;
|
||
|
AOutBtn.Visible := false;
|
||
|
end;
|
||
|
|
||
|
procedure TLatinSpecsFrm.BInBtnClick(Sender: TObject);
|
||
|
VAR index : integer;
|
||
|
begin
|
||
|
index := VarList.ItemIndex;
|
||
|
BCodeEdit.Text := VarList.Items.Strings[index];
|
||
|
VarList.Items.Delete(index);
|
||
|
BinBtn.Visible := false;
|
||
|
BOutBtn.Visible := true;
|
||
|
end;
|
||
|
|
||
|
procedure TLatinSpecsFrm.BOutBtnClick(Sender: TObject);
|
||
|
begin
|
||
|
VarList.Items.Add(BCodeEdit.Text);
|
||
|
BCodeEdit.Text := '';
|
||
|
BinBtn.Visible := true;
|
||
|
BOutBtn.Visible := false;
|
||
|
end;
|
||
|
|
||
|
procedure TLatinSpecsFrm.CInBtnClick(Sender: TObject);
|
||
|
VAR index : integer;
|
||
|
begin
|
||
|
index := VarList.ItemIndex;
|
||
|
CCodeEdit.Text := VarList.Items.Strings[index];
|
||
|
VarList.Items.Delete(index);
|
||
|
CinBtn.Visible := false;
|
||
|
COutBtn.Visible := true;
|
||
|
end;
|
||
|
|
||
|
procedure TLatinSpecsFrm.COutBtnClick(Sender: TObject);
|
||
|
begin
|
||
|
VarList.Items.Add(CCodeEdit.Text);
|
||
|
CCodeEdit.Text := '';
|
||
|
CinBtn.Visible := true;
|
||
|
COutBtn.Visible := false;
|
||
|
end;
|
||
|
|
||
|
procedure TLatinSpecsFrm.DataInBtnClick(Sender: TObject);
|
||
|
VAR index : integer;
|
||
|
begin
|
||
|
index := VarList.ItemIndex;
|
||
|
DepVarEdit.Text := VarList.Items.Strings[index];
|
||
|
VarList.Items.Delete(index);
|
||
|
DataInBtn.Visible := false;
|
||
|
DataOutBtn.Visible := true;
|
||
|
end;
|
||
|
|
||
|
procedure TLatinSpecsFrm.DataOutBtnClick(Sender: TObject);
|
||
|
begin
|
||
|
VarList.Items.Add(DepVarEdit.Text);
|
||
|
DepVarEdit.Text := '';
|
||
|
DataInBtn.Visible := true;
|
||
|
DataOutBtn.Visible := false;
|
||
|
end;
|
||
|
|
||
|
procedure TLatinSpecsFrm.DInBtnClick(Sender: TObject);
|
||
|
VAR index : integer;
|
||
|
begin
|
||
|
index := VarList.ItemIndex;
|
||
|
DCodeEdit.Text := VarList.Items.Strings[index];
|
||
|
VarList.Items.Delete(index);
|
||
|
DinBtn.Visible := false;
|
||
|
DOutBtn.Visible := true;
|
||
|
end;
|
||
|
|
||
|
procedure TLatinSpecsFrm.DOutBtnClick(Sender: TObject);
|
||
|
begin
|
||
|
VarList.Items.Add(DCodeEdit.Text);
|
||
|
DCodeEdit.Text := '';
|
||
|
DinBtn.Visible := true;
|
||
|
DOutBtn.Visible := false;
|
||
|
end;
|
||
|
|
||
|
procedure TLatinSpecsFrm.OKBtnClick(Sender: TObject);
|
||
|
begin
|
||
|
LatinSpecsFrm.Hide;
|
||
|
ModalResult := mrOK;
|
||
|
end;
|
||
|
|
||
|
initialization
|
||
|
{$I latinspecsunit.lrs}
|
||
|
|
||
|
end.
|
||
|
|