⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 find.pas

📁 Monitor.dfm Meter.dpr pasMain.pas
💻 PAS
字号:
unit find;

interface

uses
  Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
  StdCtrls;

type
  TFrmfind = class(TForm)
    Button1: TButton;
    Button2: TButton;
    Edit1: TEdit;
    RadioButton1: TRadioButton;
    GroupBox1: TGroupBox;
    RadioButton2: TRadioButton;
    Label1: TLabel;
    Button3: TButton;
    Label9: TLabel;
    UNO_E: TEdit;
    MNO_E: TEdit;
    Label5: TLabel;
    Label10: TLabel;
    Label11: TLabel;
    ADDRESS_E: TEdit;
    NAME_E: TEdit;
    FIG_E: TEdit;
    Label14: TLabel;
    Label2: TLabel;
    SCP_E: TEdit;
    CNST_E: TEdit;
    Label12: TLabel;
    Label7: TLabel;
    AMP_E: TEdit;
    Label19: TLabel;
    FFIG_E: TEdit;
    Label16: TLabel;
    PFIG_E: TEdit;
    Label17: TLabel;
    GFIG_E: TEdit;
    Label18: TLabel;
    JFIG_E: TEdit;
    procedure Button1Click(Sender: TObject);
    procedure FormCreate(Sender: TObject);
    procedure Button3Click(Sender: TObject);
    procedure RadioButton2Click(Sender: TObject);
    procedure RadioButton1Click(Sender: TObject);
  private
    { Private declarations }
  public
    { Public declarations }
    find_row:integer;
  end;

var
  Frmfind: TFrmfind;

implementation

uses ReadData, Promot;

{$R *.DFM}

procedure TFrmfind.Button1Click(Sender: TObject);
var
  i,j:integer;
begin
        if edit1.text='' then exit;
        if   radiobutton1.checked=true then
        begin
                with frmread.DataListview do
                begin

                        for I := find_row+1 to Items.Count - 1 do
                        begin
                                if pos(edit1.text,Items[I].SubItems.Strings[1])>0 then
                                begin
                                        Items[I].Selected := True;
                                        Items[I].Focused := True;
                                        find_row:=i;
                                        items[i].MakeVisible(True);

                                        with frmread.DataListview do
                                        begin
                                                UNO_E.Text := Items[Selected.index].Caption;
                                                MNO_E.Text := Items[Selected.index].SubItems.Strings[0];
                                                NAME_E.Text :=Items[Selected.index].SubItems.Strings[1];
                                                ADDRESS_E.Text := Items[Selected.index].SubItems.Strings[2];
                                                FIG_E.Text := Trim(Items[Selected.index].SubItems.Strings[3]);
                                                FFIG_E.Text := Trim(Items[Selected.index].SubItems.Strings[4]);
                                                PFIG_E.Text := Trim(Items[Selected.index].SubItems.Strings[5]);
                                                GFIG_E.Text := Trim(Items[Selected.index].SubItems.Strings[6]);
                                                JFIG_E.Text := Trim(Items[Selected.index].SubItems.Strings[7]);
                                                SCP_E.Text := Items[Selected.index].SubItems.Strings[8];
                                                CNST_E.Text := Items[Selected.index].SubItems.Strings[9];
                                                AMP_E.Text := Items[Selected.index].SubItems.Strings[10];
                                                
                                        end;

                                        exit;
                                end;
                        end;
                        find_row:=-1;
                        frmPromot.Hide;
                        frmPromot.Promot.Caption := '无此 [' + edit1.text + '] 用户信息?';
                        if frmPromot.ShowModal <> mrOK then exit;
                        exit;
                end;
        end;

        if   radiobutton2.checked=true then
        begin
                with frmread.DataListview do
                begin

                        for I := find_row+1 to Items.Count - 1 do
                        begin
                                if pos(edit1.text,Items[I].caption)>0 then
                                begin
                                        Items[I].Selected := True;
                                        Items[I].Focused := True;
                                        find_row:=i;
                                        items[i].MakeVisible(True);
                                        with frmread.DataListview do
                                        begin
                                                UNO_E.Text := Items[Selected.index].Caption;
                                                MNO_E.Text := Items[Selected.index].SubItems.Strings[0];
                                                NAME_E.Text :=Items[Selected.index].SubItems.Strings[1];
                                                ADDRESS_E.Text := Items[Selected.index].SubItems.Strings[2];
                                                FIG_E.Text := Trim(Items[Selected.index].SubItems.Strings[3]);
                                                FFIG_E.Text := Trim(Items[Selected.index].SubItems.Strings[4]);
                                                PFIG_E.Text := Trim(Items[Selected.index].SubItems.Strings[5]);
                                                GFIG_E.Text := Trim(Items[Selected.index].SubItems.Strings[6]);
                                                JFIG_E.Text := Trim(Items[Selected.index].SubItems.Strings[7]);
                                                SCP_E.Text := Items[Selected.index].SubItems.Strings[8];
                                                CNST_E.Text := Items[Selected.index].SubItems.Strings[9];
                                                AMP_E.Text := Items[Selected.index].SubItems.Strings[10];
                                                
                                        end;
                                        exit;
                                end;
                        end;
                        find_row:=-1;
                        frmPromot.Hide;
                        frmPromot.Promot.Caption := '无此 [' + edit1.text + '] 表号?';
                        if frmPromot.ShowModal <> mrOK then exit;
                        exit;
                end;
        end;


end;

procedure TFrmfind.FormCreate(Sender: TObject);
begin
        find_row:=-1;
end;

procedure TFrmfind.Button3Click(Sender: TObject);
begin
    close;
end;

procedure TFrmfind.RadioButton2Click(Sender: TObject);
begin
        radiobutton1.Checked:=false; 
end;

procedure TFrmfind.RadioButton1Click(Sender: TObject);
begin
        radiobutton2.Checked:=false;
end;

end.

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -