unit Test_Project;

interface

uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  StrUtils, Grids, StdCtrls, ExtCtrls, Buttons, ComCtrls, mmc_h;

type
  TfrmMain = class(TForm)
    mcon: TPageControl;
    TabSheet4: TTabSheet;
    Panel27: TPanel;
    Panel24: TPanel;
    SpeedButton17: TSpeedButton;
    SpeedButton18: TSpeedButton;
    SpeedButton19: TSpeedButton;
    SpeedButton20: TSpeedButton;
    SpeedButton21: TSpeedButton;
    SpeedButton22: TSpeedButton;
    SpeedButton23: TSpeedButton;
    SpeedButton24: TSpeedButton;
    Label17: TLabel;
    Bevel1: TBevel;
    Bevel2: TBevel;
    Label18: TLabel;
    Label19: TLabel;
    Label20: TLabel;
    Label21: TLabel;
    Label22: TLabel;
    Label23: TLabel;
    Label24: TLabel;
    Panel14: TPanel;
    PBNumEdit1: TEdit;
    Panel15: TPanel;
    PBNumEdit2: TEdit;
    PBNumEdit3: TEdit;
    Panel16: TPanel;
    Panel17: TPanel;
    PBNumEdit4: TEdit;
    PBNumEdit5: TEdit;
    Panel18: TPanel;
    Panel19: TPanel;
    PBNumEdit6: TEdit;
    PBNumEdit7: TEdit;
    Panel20: TPanel;
    Panel21: TPanel;
    PBNumEdit8: TEdit;
    PBNumEdit9: TEdit;
    Panel22: TPanel;
    Panel26: TPanel;
    CheckBox1: TCheckBox;
    CheckBox2: TCheckBox;
    CheckBox4: TCheckBox;
    CheckBox3: TCheckBox;
    Panel25: TPanel;
    RadioButton3: TRadioButton;
    RadioButton4: TRadioButton;
    RadioButton5: TRadioButton;
    Panel23: TPanel;
    CheckBox5: TCheckBox;
    CheckBox6: TCheckBox;
    CheckBox7: TCheckBox;
    CheckBox8: TCheckBox;
    RadioButton6: TRadioButton;
    RadioButton7: TRadioButton;
    RadioButton8: TRadioButton;
    Panel28: TPanel;
    CheckBox9: TCheckBox;
    CheckBox10: TCheckBox;
    CheckBox11: TCheckBox;
    CheckBox12: TCheckBox;
    RadioButton9: TRadioButton;
    RadioButton10: TRadioButton;
    RadioButton11: TRadioButton;
    Panel29: TPanel;
    CheckBox13: TCheckBox;
    CheckBox14: TCheckBox;
    CheckBox15: TCheckBox;
    CheckBox16: TCheckBox;
    RadioButton12: TRadioButton;
    RadioButton13: TRadioButton;
    RadioButton14: TRadioButton;
    mgrid: TStringGrid;
    Panel30: TPanel;
    CheckBox17: TCheckBox;
    Panel31: TPanel;
    SpeedButton25: TSpeedButton;
    SpeedButton26: TSpeedButton;
    SpeedButton27: TSpeedButton;
    SpeedButton28: TSpeedButton;
    procedure FormShow(Sender: TObject);
  private
    { Private declarations }
  public
    { Public declarations }
  end;

const
   mGridVal: array[0..5,0..15] of string =
		 ( ('-','BPSC1','BPSC0','ZONE2','ZONE1','ZONE0','CNEXT','I-DRV','U-ERR','Z-ERR','Y-ERR','X-ERR','U-DRV','Z-DRV','Y-DRV','X-DRV'),
		   ('EMG','ALARM','LMT-','LMT+','IN3','IN2','IN1','IN0','ADSND','ACNST','AASND','DSND','CNST','ASND','CMP-','CMP+'),
		   ('-','-','-','-','-','-','-','-','-','-','EMG','ALARM','HLMT-','HLMT+','SLMT-','SLMT+'),
		   ('-','-','-','-','-','-','-','-','D-END','C-STA','C-END','P>=C+','P<C+','P<C-','P>=C-','PULSE'),
		   ('Y-ALM','Y-INP','Y-EX-','Y-EX+','Y-IN3','Y-IN2','Y-IN1','Y-IN0','X-ALM','X-INP','X-EX-','X-EX+','X-IN3','X-IN2','X-IN1','X-IN0'),
		   ('U-ALM','U-INP','U-EX-','U-EX+','U-IN3','U-IN2','U-IN1','U-IN0','Z-ALM','Z-INP','Z-EX-','Z-EX+','Z-IN3','Z-IN2','Z-IN1','Z-IN0') );

var
  frmMain: TfrmMain;

implementation

{$R *.dfm}

procedure TfrmMain.FormShow(Sender: TObject);
var
  i,j:word;
begin
  with mgrid do
  begin
    for i := 0 to 5  do Cells[0,i+1] := 'RR' +inttostr(i);
    for i := 1 to 16 do Cells[i,0] := inttostr(16-i);
    for i := 0 to 5 do
    begin
      for j := 0 to 15 do
      begin
        cells[j+1,i+1] := mGridVal[i,j];
      end;
    end;
  end;
  width := 640;
  height:= 480;
  top   := 0;
  left  := 0;
end;

end.
