unit U_LoadColor;

interface

uses
  Windows, U_LNG, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs, RzBorder,
  // PowerCad
  pcMsbar, PCTypesUtils, DrawObjects, DlgBase,  ExtDlgs, PCLayerDlg, OleCtnrs, PCgui,
  GuiStrings, DrawEngine, siComp, siLngLnk;

type
  TF_LoadColor = class(TForm)
    ColorPicker: TRzColorPicker;
    lng_Forms: TsiLangLinked;
    procedure ColorPickerChange(Sender: TObject);
    procedure FormKeyPress(Sender: TObject; var Key: Char);
    procedure FormShow(Sender: TObject);
  private
    { Private declarations }
  public
    { Public declarations }
  end;

var
  F_LoadColor: TF_LoadColor;

implementation
uses USCS_Main, U_CAD, U_Common, U_Constants;

{$R *.dfm}

procedure TF_LoadColor.ColorPickerChange(Sender: TObject);
begin
  // Tolik 06/10/2017 --
  F_LoadColor.ModalResult := mrOk;
  F_LoadColor.Close;
end;

procedure TF_LoadColor.FormKeyPress(Sender: TObject; var Key: Char);
begin
  if Key = #27 then
  // Tolik -- 06/10/2017 --
  //  F_LoadColor.Close;
  begin
    F_LoadColor.ModalResult := mrCancel;
    F_LoadColor.Close;
  end;
  //
end;

procedure TF_LoadColor.FormShow(Sender: TObject);
begin
  ColorPicker.NoColorCaption := cLoadColor_Mes1;
  ColorPicker.DefaultColorCaption := cLoadColor_Mes2;
  ColorPicker.CustomColorCaption := cLoadColor_Mes3;
end;

end.
