unit ListMAP;

interface

uses
  Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
  dxCore, dxButtons, StdCtrls, TFlatMemoUnit, TFlatEditUnit, ProCtrls;

type
  TListForm = class(TForm)
    Label5: TLabel;
    ProListBox1: TProListBox;
    FlatEdit1: TFlatEdit;
    Label1: TLabel;
    Label3: TLabel;
    FlatEdit2: TFlatEdit;
    FlatEdit3: TFlatEdit;
    Label2: TLabel;
    FlatMemo1: TFlatMemo;
    dxButton3: TdxButton;
    procedure FlatMemo1Change(Sender: TObject);
    procedure dxButton3Click(Sender: TObject);
    procedure FlatEdit3Change(Sender: TObject);
  private
    { Private declarations }
  public
    { Public declarations }
  end;

var
  ListForm: TListForm;

implementation

uses Eq2maped1;

{$R *.DFM}

procedure TListForm.FlatMemo1Change(Sender: TObject);
begin
        dxbutton3.Enabled := true;
end;

procedure TListForm.dxButton3Click(Sender: TObject);
var
        ix : integer;
begin
        ix := prolistbox1.ItemIndex;
        if ix <> -1 then begin
        Form1.xmlscan.Root.Items.Item[ix].Properties.ItemNamed['Tooltip'].Value := FlatMemo1.Text;
        Form1.isModified := true;
        FlatMemo1.Modified := false;
        Form1.dxButton2.Enabled := true;
        dxbutton3.Enabled := false;        
        end;
end;

procedure TListForm.FlatEdit3Change(Sender: TObject);
var
        ix : integer;
begin
        with ListForm do begin
        ix := prolistbox1.ItemIndex;
        if ix <> -1 then begin
                if FlatEdit3.Modified then begin
                        Form1.xmlscan.Root.Items.Item[ix].Properties.ItemNamed['Name'].Value := FlatEdit3.Text;
                        Form1.isModified := true;
                        FlatEdit3.Modified := false;
                        Form1.dxButton2.Enabled := true;
                        Form1.RefreshView;
                        prolistbox1.ItemIndex := ix;
                end;
        end;
        end; // with
end;

end.
