Class TPanelRow

Unit

Declaration

type TPanelRow = class(TPanel)

Description

A panel comprising components for displaying and entering data relating to a commercial route. By default, the panel has the Visible field set to False.

Hierarchy

Overview

Fields

Public SpinEditGroupID: TSpinEdit;
Public ComboBoxLoadingStation: TComboBox;
Public ComboBoxUnloadingStation: TComboBox;
Public ComboBoxCommodities: TComboBox;
Public SpinEditSCU: TSpinEdit;
Public ComboBoxSCUMaxSize: TComboBox;
Public CheckBoxDone: TCheckBox;
Public CheckBoxShowHideRow: TCheckBox;
Public Edit32: TEdit;
Public Edit24: TEdit;
Public Edit16: TEdit;
Public Edit08: TEdit;
Public Edit04: TEdit;
Public Edit02: TEdit;
Public Edit01: TEdit;

Methods

Public procedure SpinEditGroupIDChange(Sender: TObject);
Public procedure ComboBoxLoadingStationChange(Sender: TObject);
Public procedure ComboBoxLoadingStationKeyDown(Sender: TObject; var Key: Word; Shift: TShiftState);
Public procedure ComboBoxLoadingStationExit(Sender: TObject);
Public procedure ComboBoxUnloadingStationChange(Sender: TObject);
Public procedure ComboBoxUnloadingStationKeyDown(Sender: TObject; var Key: Word; Shift: TShiftState);
Public procedure ComboBoxUnloadingStationExit(Sender: TObject);
Public procedure ComboBoxCommoditiesChange(Sender: TObject);
Public procedure ComboBoxCommoditiesKeyDown(Sender: TObject; var Key: Word; Shift: TShiftState);
Public procedure ComboBoxCommoditiesExit(Sender: TObject);
Public procedure SpinEditSCUChange(Sender: TObject);
Public procedure ComboBoxSCUMaxSizeChange(Sender: TObject);
Public procedure CheckBoxDoneChange(Sender: TObject);
Public procedure CheckBoxShowHideRowChange(Sender: TObject);
Public procedure PanelLegNotify(const Sender: TObject; const PanelID: Integer; const AItem: TTradeRouteLegItem; const ATradeRouteLeg: TTradeRouteLeg);
Public procedure PanelContractNotify(const Sender: TObject; const GroupID: Integer; const AContract: TContract);
Public procedure RegisterPanel(AContractDB: TContractDB);
Public procedure UnregisterPanel;
Public procedure ReloadDataListAndSetComboBox(AStringListRecord: TItemsStringListRecord);
Public procedure TradeRouteLegReload(ATradeRouteLeg: TTradeRouteLeg);
Public procedure Clear;
Public procedure ChangeAnchorComponent(AAnchorComponent: TControl);
Public procedure SetValue(const AItem: TTradeRouteLegItem; const ATradeRouteLeg: TTradeRouteLeg);
Public function HasNoData: Boolean;
Public constructor Create(AOwner: TComponent; ACallback: TTradeRouteLegChanged; AAnchorComponent: TControl; AStringListRecord: TItemsStringListRecord; AConsoleServer: TConsoleReaderThread); reintroduce;
Public destructor Destroy; override;

Properties

Public property GroupId: Integer read GetGroupId;
Public property LoadingStationName: String read GetLoadingStationName;
Public property UnloadingStationName: String read GetUnloadingStationName;
Public property Commodity: String read GetCommodity;
Public property SCU: Integer read GetSCU;
Public property SCUMaxSize: TSCUSize read GetSCUMaxSize;
Public property Done: Boolean read GetDone;
Public property Hide: Boolean read GetHide;
Public property SCUxSize: TSCUxSizeRecord read GetSCUxSize;
Public property TradeRouteLeg: TTradeRouteLeg read GetTradeRouteLeg;
Public property ID: Integer read FID;
Public property ContractDB: TContractDB read FContractDB;

Description

Fields

Public SpinEditGroupID: TSpinEdit;

Generic grouping identifier.

Public ComboBoxLoadingStation: TComboBox;

Crate loading station name.

Public ComboBoxUnloadingStation: TComboBox;

Crate unloading station name.

Public ComboBoxCommodities: TComboBox;

Name of the goods.

Public SpinEditSCU: TSpinEdit;

Total number of SCUs to be delivered.

Public ComboBoxSCUMaxSize: TComboBox;

Maximum container size.

Public CheckBoxDone: TCheckBox;

Route completion flag.

Public CheckBoxShowHideRow: TCheckBox;

Route visibility flag.

Public Edit32: TEdit;

Number of 32-size crates.

Public Edit24: TEdit;

Number of 24-size crates.

Public Edit16: TEdit;

Number of 16-size crates.

Public Edit08: TEdit;

Number of 08-size crates.

Public Edit04: TEdit;

Number of 04-size crates.

Public Edit02: TEdit;

Number of 02-size crates.

Public Edit01: TEdit;

Number of 01-size crates.

Methods

Public procedure SpinEditGroupIDChange(Sender: TObject);

Callback of the onChange() event of the SpinEditGroupID component

Public procedure ComboBoxLoadingStationChange(Sender: TObject);

Callback of the onChange() event of the ComboBoxLoadingStation component

Public procedure ComboBoxLoadingStationKeyDown(Sender: TObject; var Key: Word; Shift: TShiftState);

Callback of the onKeyDown() event of the ComboBoxLoadingStation component

Public procedure ComboBoxLoadingStationExit(Sender: TObject);

Callback of the onExit() event of the ComboBoxLoadingStation component

Public procedure ComboBoxUnloadingStationChange(Sender: TObject);

Callback of the onChange() event of the ComboBoxUnloadingStation component

Public procedure ComboBoxUnloadingStationKeyDown(Sender: TObject; var Key: Word; Shift: TShiftState);

Callback of the onKeyDown() event of the ComboBoxUnloadingStation component

Public procedure ComboBoxUnloadingStationExit(Sender: TObject);

Callback of the onExit() event of the ComboBoxUnloadingStation component

Public procedure ComboBoxCommoditiesChange(Sender: TObject);

Callback of the onChange() event of the ComboBoxCommodities component

Public procedure ComboBoxCommoditiesKeyDown(Sender: TObject; var Key: Word; Shift: TShiftState);

Callback of the onKeyDown() event of the ComboBoxCommodities component

Public procedure ComboBoxCommoditiesExit(Sender: TObject);

Callback of the onExit() event of the ComboBoxCommodities component

Public procedure SpinEditSCUChange(Sender: TObject);

Callback of the onChange() event of the SpinEditSCU component

Public procedure ComboBoxSCUMaxSizeChange(Sender: TObject);

Callback of the onChange() event of the ComboBoxSCUMaxSize component

Public procedure CheckBoxDoneChange(Sender: TObject);

Callback of the onChange() event of the CheckBoxDone component

Public procedure CheckBoxShowHideRowChange(Sender: TObject);

Callback of the onChange() event of the CheckBoxShowHideRow component

Public procedure PanelLegNotify(const Sender: TObject; const PanelID: Integer; const AItem: TTradeRouteLegItem; const ATradeRouteLeg: TTradeRouteLeg);

Notification when a single panel/leg changes. Sender = TContractDB.

Parameters
Sender
The sender object.
PanelID
The panel ID.
AItem
The field that changed.
ATradeRouteLeg
The trade route leg.
Public procedure PanelContractNotify(const Sender: TObject; const GroupID: Integer; const AContract: TContract);

Notification when a contract changes. Sender = TContractDB.

Parameters
Sender
The sender object.
GroupID
The group ID.
AContract
The contract.
Public procedure RegisterPanel(AContractDB: TContractDB);

Register this panel in ContractDB.

Public procedure UnregisterPanel;

Unregister this panel from ContractDB.

Public procedure ReloadDataListAndSetComboBox(AStringListRecord: TItemsStringListRecord);

Reset StringListRecord with new data and update the items in ComboBox

Public procedure TradeRouteLegReload(ATradeRouteLeg: TTradeRouteLeg);

Reassign the contents of visual components.

Public procedure Clear;

Delete the contents of the visual components.

Public procedure ChangeAnchorComponent(AAnchorComponent: TControl);

Change the anchor component.

Public procedure SetValue(const AItem: TTradeRouteLegItem; const ATradeRouteLeg: TTradeRouteLeg);

Set the contents of the visual components and notify the ContractDB.

Public function HasNoData: Boolean;

Check if the contents of the visual components are empty.

Public constructor Create(AOwner: TComponent; ACallback: TTradeRouteLegChanged; AAnchorComponent: TControl; AStringListRecord: TItemsStringListRecord; AConsoleServer: TConsoleReaderThread); reintroduce;

Create an instance of TPanelRow

Parameters
AOwner
The owner component, must be a TWinControl.
ACallback
Pointer to the callback procedure linked to events.
AAnchorComponent
The component to anchor this panel below. If nil, anchors to the main form.
AStringListRecord
The string lists for filling in TCheckBox components.
AConsoleServer
Pointer to the console server for logging.
Public destructor Destroy; override;

Destroy the instance.

Properties

Public property GroupId: Integer read GetGroupId;

Generic record grouping identifier. Panels with the same GroupId belong to the same contract leg.

Public property LoadingStationName: String read GetLoadingStationName;

Crate loading station name.

Public property UnloadingStationName: String read GetUnloadingStationName;

Crate unloading station name.

Public property Commodity: String read GetCommodity;

Name of the goods.

Public property SCU: Integer read GetSCU;

Total number of SCUs to be delivered.

Public property SCUMaxSize: TSCUSize read GetSCUMaxSize;

Maximum container size.

Public property Done: Boolean read GetDone;

Route completion flag.

Public property Hide: Boolean read GetHide;

Route visibility flag.

Public property SCUxSize: TSCUxSizeRecord read GetSCUxSize;

Record to keep track of the number of boxes for each SCU size.

Public property TradeRouteLeg: TTradeRouteLeg read GetTradeRouteLeg;

Leg of Trade Route

Public property ID: Integer read FID;

Unique identifier.

Public property ContractDB: TContractDB read FContractDB;

Pointer to the Contract Database.