unit U_MakeEditInterfNorm;

interface

uses
  Windows, U_LNG, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs, cxLookAndFeelPainters, StdCtrls, cxButtons, ExtCtrls, RzPanel,

  U_BaseCommon, U_BaseConstants, cxDropDownEdit, cxLookupEdit, cxDBLookupEdit,
  cxDBLookupComboBox, cxControls, cxContainer, cxEdit, cxTextEdit,
  cxMaskEdit, cxSpinEdit, cxRadioGroup, RzLabel, Buttons,

  kbmMemTable, siComp, siLngLnk, RzButton, RzCmboBx, Mask, RzEdit, RzSpnEdt,
  RzRadChk, RzRadGrp, cxGraphics, cxLookAndFeels, Menus;

type
  TF_MakeEditInterfNorm = class(TForm)
    Panel_Main: TRzPanel;
    Panel_OkCancel: TRzPanel;
    Button_OK: TcxButton;
    Button_Cancel: TcxButton;
    SpinEdit_Expenses: TcxSpinEdit;
    Label_Expense: TLabel;
    RzGroupBox1: TRzGroupBox;
    Button_ChoiceNorm: TcxButton;
    Label_NormCypher: TLabel;
    ComboBox_NormName: TcxComboBox;
    ComboBox_NormCypher: TcxComboBox;
    Label_NormName: TLabel;
    lng_Forms: TsiLangLinked;
    RzGroupBox3: TRzGroupBox;
    Label1: TLabel;
    cbComponentType: TRzComboBox;
    btChoiceComponentType: TRzToolButton;
    btInterfaceIsBusyInfo: TSpeedButton;
    RzGroupBox2: TRzGroupBox;
    rbInterfaceIsBusyYes: TcxRadioButton;
    rbInterfaceIsBusyNo: TcxRadioButton;
    RzGroupBox4: TRzGroupBox;
    Label2: TLabel;
    seKoefLengthForCompl: TRzSpinEdit;
    Label3: TLabel;
    edIzm: TcxTextEdit;
    RzAppliance: TRzRadioGroup;
    RzAll: TRzRadioButton;
    RzFirst: TRzRadioButton;
    RzNext: TRzRadioButton;
    procedure Button_ChoiceNormClick(Sender: TObject);
    procedure ComboBox_NormCypherPropertiesChange(Sender: TObject);
    procedure ComboBox_NormNamePropertiesChange(Sender: TObject);
    procedure Button_OKClick(Sender: TObject);
    procedure FormDestroy(Sender: TObject);
    procedure btInterfaceIsBusyInfoClick(Sender: TObject);
    procedure FormClose(Sender: TObject; var Action: TCloseAction);
    procedure FormCreate(Sender: TObject);
    procedure rbInterfaceIsBusyNoClick(Sender: TObject);
    procedure rbInterfaceIsBusyNoDblClick(Sender: TObject);
    procedure rbInterfaceIsBusyYesClick(Sender: TObject);
    procedure rbInterfaceIsBusyYesDblClick(Sender: TObject);
  private
    GForm: TForm;
    FFormMode: TFormMode;
    FComboHaveEmptyItem: Boolean;
    FIzm: String;

    FMemTableNorms: TkbmMemTable;

    procedure DefineIzm(AIDNorm: Integer; AGUIDNorm: string);
  public

    constructor Create(AOwner: TComponent; AForm: TForm);
    destructor  Destroy; override;

    procedure MakeEdit(AFormMode: TFormMode; ACurrInterfGUID: String; ACurrInterfID: Integer;
                AMemTable, AMemTableNorms, AMemTableComponTypes: TkbmMemTable);
  end;

//var
  //F_MakeEditInterfNorm: TF_MakeEditInterfNorm;

implementation
Uses U_Main, Unit_DM_SCS, U_Common, DB;

{$R *.dfm}


constructor TF_MakeEditInterfNorm.Create(AOwner: TComponent;
  AForm: TForm);
begin
    GForm := AForm;
    Inherited Create(AOwner);
end;

destructor TF_MakeEditInterfNorm.Destroy;
begin
    inherited ;
end;


procedure TF_MakeEditInterfNorm.MakeEdit(AFormMode: TFormMode; ACurrInterfGUID: String; ACurrInterfID: Integer;
  AMemTable, AMemTableNorms, AMemTableComponTypes: TkbmMemTable);
var
  InterfNormID: Integer;
  //InterfNormGUID: string;
  InterfaceNormInfo: TInterfaceNormInfo;
  MakeEdit: TMakeEdit;

  RecNo: Integer;
  IDComponentType: Integer;
  IsNew: Boolean;
  // Tolik 28/08/2019 --
  //OldTick, CurrTick: Cardinal;
  OldTick, CurrTick: DWord;
  //
begin
  try
    FFormMode := AFormMode;
    MakeEdit := GetMakeEditByFormMode(AFormMode);
    InterfNormID := 0;
    //InterfNormGUID := '';

    FMemTableNorms := AMemTableNorms;

    with TF_Main(GForm).DM do
    begin
      FComboHaveEmptyItem := false;
      ComboBox_NormCypher.Properties.OnChange := nil;
      ComboBox_NormName.Properties.OnChange := nil;
      ComboBox_NormCypher.Properties.BeginUpdate;
      ComboBox_NormName.Properties.BeginUpdate;

      FIzm := '';

      rbInterfaceIsBusyYes.Checked := false;
      rbInterfaceIsBusyNo.Checked := false;

      BeginProgress;
      try
        IsNew := AFormMode = fmMake;

        OldTick := GetTickCount;
        if AMemTableNorms <> nil then
        begin
          FillComboBoxFromMT(ComboBox_NormCypher, AMemTableNorms, IsNew, fnID, fnCypher, '', 0);
          FillComboBoxFromMT(ComboBox_NormName, AMemTableNorms, IsNew, fnID, fnName, '', 0);
        end
        else
        begin
          FillComboBox(ComboBox_NormCypher, F_NormBase, IsNew, tnNBNorms, fnID, fnCypher, '', 0);
          FillComboBox(ComboBox_NormName, F_NormBase, IsNew, tnNBNorms, fnID, fnName, '', 0);
        end;
        CurrTick := GetTickCount - OldTick;
        CurrTick := GetTickCount - OldTick;


        OldTick := GetTickCount;
        if AMemTableComponTypes <> nil then
          FillComboBoxRzFromMT(cbComponentType, AMemTableComponTypes, true, fnID, fnName, cAniType, 0)
        else
          FillComboBoxRz(cbComponentType, F_NormBase, true, tnComponentTypes, fnID, fnName, cAniType, 0);

        CurrTick := GetTickCount - OldTick;
        CurrTick := GetTickCount - OldTick;

        case AFormMode of
          fmMake:
            begin
              Caption := cMakeEditInterfNorm_Msg1_1;
              FComboHaveEmptyItem := true;

              ComboBox_NormCypher.ItemIndex := 0;
              ComboBox_NormName.ItemIndex := 0;
              SpinEdit_Expenses.Value := 1;
              seKoefLengthForCompl.Value := 0;
              edIzm.Text := '';
              //rbInterfaceIsBusyYes.Check
            end;
          fmEdit:
            begin
              Caption := cMakeEditInterfNorm_Msg1_2;
              FComboHaveEmptyItem := false;

              if AMemTable <> nil then
              begin
                InterfNormID := AMemTable.FieldByName(fnID).AsInteger;
                //InterfNormGUID := AMemTable.FieldByName(fnGUID).AsString;

                //FillComboBox(ComboBox_NormCypher, F_NormBase, false, tnNBNorms, fnID, fnCypher, '', -1, AMemTable.FieldByName(fnGuidNBNorm).AsString);
                //FillComboBox(ComboBox_NormName, F_NormBase, false, tnNBNorms, fnID, fnName, '', -1, AMemTable.FieldByName(fnGuidNBNorm).AsString);
                //FillComboBoxRz(cbComponentType, F_NormBase, true, tnComponentTypes, fnID, fnName, cAniType, -1, AMemTable.FieldByName(fnGuidComponentType).AsString);
                SelectItemByGUIDinCombo(ComboBox_NormCypher, AMemTable.FieldByName(fnGuidNBNorm).AsString);
                SelectItemByGUIDinCombo(ComboBox_NormName, AMemTable.FieldByName(fnGuidNBNorm).AsString);
                SelectItemByGUIDinComboRz(cbComponentType, AMemTable.FieldByName(fnGuidComponentType).AsString);

                edIzm.Text := AMemTable.FieldByName(fnIzm).AsString;
                if AMemTable.FieldByName(fnGuidComponentType).AsString = '' then
                  SelectItemByGUIDinComboRz(cbComponentType, '');

                SpinEdit_Expenses.Value := RoundX(AMemTable.FieldByName(fnExpense).AsFloat, PrecisionNormKolvo);
               // Tolik -- 14/06/2016 -- 
               { if AMemTable.FieldByName(fnInterfaceIsBusy).AsInteger = biTrue then
                  rbInterfaceIsBusyYes.Checked := true
                else
                  rbInterfaceIsBusyNo.Checked := true;}
                if AMemTable.FieldByName(fnInterfaceIsBusy).AsInteger = biFalse then
                  rbInterfaceIsBusyNo.Checked := true
                else
                begin
                  rbInterfaceIsBusyYes.Checked := true;
                  if AMemTable.FieldByName(fnInterfaceIsBusy).AsInteger = 1 then
                    RzAll.Checked := true
                  else
                    if AMemTable.FieldByName(fnInterfaceIsBusy).AsInteger = 2 then
                      RzFirst.Checked := True
                    else
                      if AMemTable.FieldByName(fnInterfaceIsBusy).AsInteger = 3 then
                        RzNext.Checked := True;

                end;
               //

                seKoefLengthForCompl.Value := RoundCP(AMemTable.FieldByName(fnKoefLengthForCompl).AsFloat);
              end
              else
              begin
                InterfNormID := DataSet_Interface_Norms.FN(fnID).AsInteger;
                //InterfNormGUID := DataSet_Interface_Norms.FN(fnID).AsString;

                //FillComboBox(ComboBox_NormCypher, F_NormBase, false, tnNBNorms, fnID, fnCypher, '', DataSet_Interface_Norms.FN(fnIDNBNorm).AsInteger);
                //FillComboBox(ComboBox_NormName, F_NormBase, false, tnNBNorms, fnID, fnName, '', DataSet_Interface_Norms.FN(fnIDNBNorm).AsInteger);
                //FillComboBoxRz(cbComponentType, F_NormBase, true, tnComponentTypes, fnID, fnName, cAniType, DataSet_Interface_Norms.FN(fnIDComponentType).AsInteger);
                SelectItemByIDinCombo(ComboBox_NormCypher, DataSet_Interface_Norms.FN(fnIDNBNorm).AsInteger);
                SelectItemByIDinCombo(ComboBox_NormName, DataSet_Interface_Norms.FN(fnIDNBNorm).AsInteger);
                SelectItemByIDinComboRz(cbComponentType, DataSet_Interface_Norms.FN(fnIDComponentType).AsInteger);
                edIzm.Text := DataSet_Interface_Norms.FN(fnIzm).AsString;

                SpinEdit_Expenses.Value := RoundX(DataSet_Interface_Norms.FN(fnExpense).AsFloat, PrecisionNormKolvo);
                // Tolik -- 14/06/2016 --
                if DataSet_Interface_Norms.FN(fnInterfaceIsBusy).AsInteger = biFalse then
                  rbInterfaceIsBusyNo.Checked := true
                else
                begin
                  rbInterfaceIsBusyYes.Checked := true;
                  if DataSet_Interface_Norms.FN(fnInterfaceIsBusy).AsInteger = 1 then
                    RzAll.Checked := true
                  else
                    if DataSet_Interface_Norms.FN(fnInterfaceIsBusy).AsInteger = 2 then
                      RzFirst.Checked := True
                    else
                      if DataSet_Interface_Norms.FN(fnInterfaceIsBusy).AsInteger = 3 then
                        RzNext.Checked := True;

                end;
                {if DataSet_Interface_Norms.FN(fnInterfaceIsBusy).AsInteger = biTrue then
                  rbInterfaceIsBusyYes.Checked := true
                else
                  rbInterfaceIsBusyNo.Checked := true;}
                //

                seKoefLengthForCompl.Value := RoundCP(DataSet_Interface_Norms.FN(fnKoefLengthForCompl).AsFloat);
              end;
            end;
        end;
        Button_ChoiceNorm.Visible := AMemTableNorms = nil;
        //btChoiceComponentType.Visible := AMemTableComponTypes = nil;

        ComboBox_NormCypher.Properties.OnChange := ComboBox_NormCypherPropertiesChange;
        ComboBox_NormName.Properties.OnChange := ComboBox_NormNamePropertiesChange;
      finally
        ComboBox_NormCypher.Properties.EndUpdate;
        ComboBox_NormName.Properties.EndUpdate;
        EndProgress;
      end;

      if ShowModal = mrOk then
      begin
        IDComponentType := GetIDFromComboBoxRZ(cbComponentType);
        if AMemTable <> nil then
        begin
          if AFormMode = fmMake then
            AMemTable.Append;
          AMemTable.Edit;
          AMemTable.FieldByName(fnGUID).AsString := CreateGUID;
          AMemTable.FieldByName(fnGUIDInterface).AsString := ACurrInterfGUID;
          AMemTable.FieldByName(fnGUIDNBNorm).AsString := GetGUIDFromComboBox(ComboBox_NormCypher);
          AMemTable.FieldByName(fnGuidComponentType).AsString := GetGUIDFromComboBoxRZ(cbComponentType);
          AMemTable.FieldByName(fnIDInterface).AsInteger := ACurrInterfID;  //DataSet_INTERFACE.FN(fnID).AsInteger;
          AMemTable.FieldByName(fnIDNBNorm).AsInteger := GetIDFromComboBox(ComboBox_NormCypher);
          AMemTable.FieldByName(fnIDComponentType).AsInteger := IDComponentType;
          AMemTable.FieldByName(fnExpense).AsFloat := SpinEdit_Expenses.Value;
          // Tolik -- 14/06/2016 --
          // AMemTable.FieldByName(fnInterfaceIsBusy).AsInteger := BoolToInt(rbInterfaceIsBusyYes.Checked);
          if rbInterfaceIsBusyNo.Checked then
            AMemTable.FieldByName(fnInterfaceIsBusy).AsInteger := 0
          else
            if rbInterfaceIsBusyYes.Checked then
            begin
              if RzAll.Checked then
                AMemTable.FieldByName(fnInterfaceIsBusy).AsInteger := 1
              else
                if RzFirst.Checked then
                  AMemTable.FieldByName(fnInterfaceIsBusy).AsInteger := 2
                else
                  if RzNext.Checked then
                    AMemTable.FieldByName(fnInterfaceIsBusy).AsInteger := 3;
            end;
          //
          AMemTable.FieldByName(fnKoefLengthForCompl).AsFloat := seKoefLengthForCompl.Value;

          AMemTable.FieldByName(fnCypher).AsString := ComboBox_NormCypher.Text;
          AMemTable.FieldByName(fnName).AsString := ComboBox_NormName.Text;
          AMemTable.FieldByName(fnIzm).AsString := FIzm;

          AMemTable.FieldByName(fnIsModified).AsBoolean := true; 
          AMemTable.Post;

          {if AFormMode = fmMake then
          begin
            RecNo := AMemTable.RecNo;
            AMemTable.Close;
            AMemTable.Open;
            AMemTable.RecNo := RecNo;
          end;}
        end
        else
        begin
          ZeroMemory(@InterfaceNormInfo, SizeOf(TInterfaceNormInfo));
          InterfaceNormInfo.ID := InterfNormID;
          InterfaceNormInfo.IDInterface := ACurrInterfID;
          InterfaceNormInfo.IDNBNorm := GetIDFromComboBox(ComboBox_NormCypher);
          InterfaceNormInfo.Expense := SpinEdit_Expenses.Value;
          InterfaceNormInfo.IDComponentType := IDComponentType;
          // Tolik -- 14/06/2016 --
          //InterfaceNormInfo.InterfaceIsBusy := BoolToInt(rbInterfaceIsBusyYes.Checked);
          if rbInterfaceIsBusyNo.Checked then
            InterfaceNormInfo.InterfaceIsBusy := 0
          else
          begin
            if RzAll.Checked then
              InterfaceNormInfo.InterfaceIsBusy := 1;
            if RzFirst.Checked then
              InterfaceNormInfo.InterfaceIsBusy := 2;
            if RzNext.Checked then
              InterfaceNormInfo.InterfaceIsBusy := 3;
          end;
          //
          InterfaceNormInfo.KoefLengthForCompl := seKoefLengthForCompl.Value;
          SaveInterfaceNorm(MakeEdit, @InterfaceNormInfo);
          DataSet_Interface_Norms.FullRefresh;
          if AFormMode = fmMake then
            DataSet_Interface_Norms.Locate(fnID, InterfaceNormInfo.ID, []);

            
          {
          if AFormMode = fmMake then
            DataSet_Interface_Norms.Append;
          DataSet_Interface_Norms.Edit;
          DataSet_Interface_Norms.FN(fnIDInterface).AsInteger := ACurrInterfID;  //DataSet_INTERFACE.FN(fnID).AsInteger;
          DataSet_Interface_Norms.FN(fnIDNBNorm).AsInteger := GetIDFromComboBox(ComboBox_NormCypher);
          DataSet_Interface_Norms.FN(fnExpense).AsFloat := SpinEdit_Expenses.Value;
          if IDComponentType > 0 then
            DataSet_Interface_Norms.FN(fnIDComponentType).AsInteger := IDComponentType
          else
            DataSet_Interface_Norms.FN(fnIDComponentType).Value := null;
          DataSet_Interface_Norms.FN(fnInterfaceIsBusy).AsInteger := BoolToInt(rbInterfaceIsBusyYes.Checked);
          DataSet_Interface_Norms.FN(fnKoefLengthForCompl).AsFloat := seKoefLengthForCompl.Value;
          DataSet_Interface_Norms.Post;

          if AFormMode = fmMake then
          begin
            RecNo := DataSet_Interface_Norms.RecNo;
            DataSet_Interface_Norms.Close;
            DataSet_Interface_Norms.Open;
            DataSet_Interface_Norms.RecNo := RecNo;
          end;}
        end;
      end;
    end;
  except
    on E: Exception do AddExceptionToLog('TF_MakeEditInterfNorm.MakeEdit: '+E.Message);
  end;
end;

procedure TF_MakeEditInterfNorm.Button_ChoiceNormClick(Sender: TObject);
var
  CurrID: Integer;
  NewID: Integer;
  // Tolik 28/08/2019 --
  //OldTick, CurrTick: Cardinal;
  OldTick, CurrTick: DWord;
  //
begin
  CurrID := GetIDFromComboBox(ComboBox_NormCypher);
  NewID := TF_Main(GForm).DM.GetNBNormIDFromGuide(CurrID, fmEdit); //TF_Main(GForm).DM.GetNBNormIDFromGuide(CurrID, FFormMode);

  OldTick := GetTickCount;
  ComboBox_NormCypher.Properties.OnChange := nil;
  ComboBox_NormName.Properties.OnChange := nil;
  ComboBox_NormCypher.Properties.BeginUpdate;
  ComboBox_NormName.Properties.BeginUpdate;
  try
    FillComboBox(ComboBox_NormCypher, TF_Main(GForm).FNormBase, FComboHaveEmptyItem, tnNBNorms, fnID, fnCypher, '', NewID);
    FillComboBox(ComboBox_NormName, TF_Main(GForm).FNormBase, FComboHaveEmptyItem, tnNBNorms, fnID, fnName, '', NewID);
  finally
    ComboBox_NormCypher.Properties.OnChange := ComboBox_NormCypherPropertiesChange;
    ComboBox_NormName.Properties.OnChange := ComboBox_NormNamePropertiesChange;
    ComboBox_NormCypher.Properties.EndUpdate;
    ComboBox_NormName.Properties.EndUpdate;
  end;
  CurrTick := GetTickCount - OldTick;
  CurrTick := GetTickCount - OldTick;
end;

procedure TF_MakeEditInterfNorm.ComboBox_NormCypherPropertiesChange(
  Sender: TObject);
var
  ComboID: Integer;
  ComboGUID: string;
begin
    try
      ComboBox_NormName.Properties.OnChange := nil;
      ComboID := GetIDFromComboBox(TcxComboBox(Sender));
      ComboGUID := GetGUIDFromComboBox(TcxComboBox(Sender));
      SelectItemByIDinCombo(ComboBox_NormName, ComboID);
      DefineIzm(ComboID, ComboGUID);
    finally
      ComboBox_NormName.Properties.OnChange := ComboBox_NormNamePropertiesChange;
    end;
end;

procedure TF_MakeEditInterfNorm.ComboBox_NormNamePropertiesChange(
  Sender: TObject);
var
  ComboID: Integer;
  ComboGUID: string;
begin
    try
      ComboBox_NormCypher.Properties.OnChange := nil;
      ComboID := GetIDFromComboBox(TcxComboBox(Sender));
      ComboGUID := GetGUIDFromComboBox(TcxComboBox(Sender));
      SelectItemByIDinCombo(ComboBox_NormCypher, ComboID);
      DefineIzm(ComboID, ComboGUID);
    finally
      ComboBox_NormCypher.Properties.OnChange := ComboBox_NormCypherPropertiesChange;
    end;
end;

procedure TF_MakeEditInterfNorm.Button_OKClick(Sender: TObject);
var strMessage: String;

  procedure AddMessage(AMessg: String);
  begin
      strMessage := strMessage + #10+#13+ '-'+AMessg;
      ModalResult := mrNone;
  end;

begin
  strMessage := cMakeEditInterfNorm_Msg2_1+':';

  if ComboBox_NormCypher.Text = '' then
    AddMessage(cMakeEditInterfNorm_Msg2_2);
  if Not rbInterfaceIsBusyYes.Checked and Not rbInterfaceIsBusyNo.Checked then
    AddMessage(cMakeEditInterfNorm_Msg2_3);

  if ModalResult = mrNone then
    ShowMessageByType(Self.Handle, smtDisplay, strMessage, Application.Title, MB_OK or MB_ICONINFORMATION);
end;

procedure TF_MakeEditInterfNorm.FormDestroy(Sender: TObject);
begin
    ClearComboBox(ComboBox_NormCypher);
    ClearComboBox(ComboBox_NormName);
end;

procedure TF_MakeEditInterfNorm.btInterfaceIsBusyInfoClick(
  Sender: TObject);
begin
    with TF_Main(GForm) do
      begin
          F_AnswerToQuast.ShowContextHelp(cMakeEditInterfNorm_Msg3_1, cMakeEditInterfNorm_Msg3_2);
      end;
end;

procedure TF_MakeEditInterfNorm.FormClose(Sender: TObject;
  var Action: TCloseAction);
begin
  try
    TF_Main(GForm).F_AnswerToQuast.Close;
  except
  end;
end;

procedure TF_MakeEditInterfNorm.DefineIzm(AIDNorm: Integer; AGUIDNorm: string);
var
  //mtNormsBookMark: string;
  mtNormsBookMark: TBookMark;
begin
  FIzm := '';
  if (FMemTableNorms <> nil) and FMemTableNorms.Active then
  begin
    //mtNormsBookMark := FMemTableNorms.Bookmark;
    mtNormsBookMark := FMemTableNorms.GetBookmark;
    try
      if FMemTableNorms.Locate(fnGuid, AGUIDNorm, []) or
         FMemTableNorms.Locate(fnID, AIDNorm, []) then
        FIzm := FMemTableNorms.FieldByName(fnIzm).AsString;
    finally
      //FMemTableNorms.Bookmark := mtNormsBookMark;
      FMemTableNorms.GotoBookmark(mtNormsBookMark);
      FMemTableNorms.FreeBookmark(mtNormsBookMark);
    end;
  end
  else
     FIzm := TF_Main(GForm).FNormBase.DM.GetStringFromTableByID(tnNBNorms, fnIzm, AIDNorm, qmPhisical);
  edIzm.Text := FIzm;
end;

procedure TF_MakeEditInterfNorm.FormCreate(Sender: TObject);
begin
  // Tolik 01/11/2019 --
  seKoefLengthForCompl.Min := 0;
  seKoefLengthForCompl.Max :=0;

  //
  seKoefLengthForCompl.Decimals := FloatPrecision;
  seKoefLengthForCompl.IntegersOnly := false;
  seKoefLengthForCompl.Min := 0.000;
  seKoefLengthForCompl.Max := 1E10; 
end;

procedure TF_MakeEditInterfNorm.rbInterfaceIsBusyNoClick(Sender: TObject);
begin
  RzAppliance.Enabled := False;
end;

procedure TF_MakeEditInterfNorm.rbInterfaceIsBusyNoDblClick(
  Sender: TObject);
begin
  RzAppliance.Enabled := False;
end;

procedure TF_MakeEditInterfNorm.rbInterfaceIsBusyYesClick(Sender: TObject);
begin
  RzAppliance.Enabled := True;
end;

procedure TF_MakeEditInterfNorm.rbInterfaceIsBusyYesDblClick(
  Sender: TObject);
begin
  RzAppliance.Enabled := True;
end;

end.
