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

📄 unit2.pas

📁 delphi写的千年私服登陆器
💻 PAS
字号:
unit Unit2;

interface

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

type
  TForm2 = class(TForm)
    GroupBox1: TGroupBox;
    Edit1: TEdit;
    Label1: TLabel;
    Label2: TLabel;
    Edit2: TEdit;
    Edit3: TEdit;
    Label3: TLabel;
    Label4: TLabel;
    Button1: TButton;
    Button2: TButton;
    typelist: TComboBox;
    procedure Button2Click(Sender: TObject);
    procedure Button1Click(Sender: TObject);
    procedure TxtFileAddLine(Addline:String);
  private
    { Private declarations }
  public
    { Public declarations }
  end;

var
  Form2: TForm2;
  tips:tstringlist;
implementation

uses Unit3, Unit1;

{$R *.dfm}
procedure TForm2.TxtFileAddLine(Addline:String);
var
addr:string;
  begin
    addr:=Form1.ClinetPath(Form3.Edit1.Text)+'addr.txt';
    tips:=tstringlist.create;
    tips.loadfromfile(addr);
    tips.insert(0,Addline);
    tips.savetofile(addr);
    tips.free;
  end;

procedure TForm2.Button2Click(Sender: TObject);
begin
Close;
end;

procedure TForm2.Button1Click(Sender: TObject);
begin
if (edit1.Text = '') or (edit3.Text = '') then
  begin
   Application.MessageBox('服务器信息不能为空'+#13#10+'请重新输入!',
   '错误提示',mb_ok+mb_iconERROR);
   exit;
  end;
TxtFileAddLine(edit1.text+','+edit2.text+','+TypeList.Text+','+edit3.text);
if Application.MessageBox('新服务器添加成功'+#13#10+'是否返回!',
'信息提示',MB_YesNo+MB_ICONQUESTION) = IDNo then
   begin
     edit1.Clear;
     edit3.Clear;
   end;
Form1.ServerListUpdata;
Close;
end;
end.

⌨️ 快捷键说明

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