传奇单机版,GM论坛,传奇版本库,GM基地

传奇Wil客户端编辑器Delphi源代码

[复制链接]
查看: 370   回复: 1     # 工具源码

187

主题

189

帖子

7505

积分

霸王教主

Rank: 9Rank: 9Rank: 9

积分
7505
2022-4-22 23:41:10   显示全部楼层   阅读模式  
传奇客户端Wil编辑器Delphi源代码
[Delphi] 纯文本查看 复制代码
procedure TForm1.CheckBox1Click(Sender: TObject);
begin
  if ((CheckBox1.Checked) and (fOpen.Count > 0)) then
   begin
     T1.Enabled:=TRUE;
   end
  else
   begin
     T1.Enabled:=FALSE;
   end;
end;

procedure TForm1.T1Timer(Sender: TObject);
begin
  if CheckBox2.Checked then Button3.Click
  else Button4.Click;
  if ((CrPos=0) or (CrPos=fOpen.Count - 1) or (cRpOS=fOpen.GetNextValidImageIndex(crPos))) then
   begin
    CheckBox1.Checked:=FALSE;
    T1.Enabled:=False;
   end;
end;

procedure TForm1.N9Click(Sender: TObject);
var tId:DWORD;
begin
  if fOpen.Count > 0 then
  begin
  ImOrOut:=0;
  DL.Edit4.Text:=IntToStr(crPos);
  DL.BG.Caption:='导出信息设置';
  DL.Show;
  end;
end;

procedure TForm1.N8Click(Sender: TObject);
var Pname:string;
    tId:DWORD;
begin
  if fOpen.Count > 0 then
  begin
   OD.Filter:='专用资源文件 (*.TPE)|*.TPE';
   if OD.Execute then
   begin
    b3:=Button3.Handle;
    b4:=Button4.Handle;
    Infseq:=Od.FileName;
    ImOrOut:=1;
    o_Pos:=crPos;
    bImp:=False;
    DL.Edit4.Text:=IntToStr(crPos);
    DL.BG.Caption:='导入信息设置';
    DL.Show;
    ResetEvent(hEvent);
    CloseHandle(CreateThread(
    nil,0,
    @TForm1.ImThreadProc,nil,0,tId
    ));
   end;
  end;
end;

procedure TForm1.KEN1Click(Sender: TObject);
var Pname:string;
    aBitMap:TBITMAP;
begin
  OD.Filter:='专用资源文件 (*.TPE)|*.TPE';
  if OD.Execute then
   begin
    Pname:=OD.FileName;
    if fOpen.ImportFromSeq(crPos,1,Pname) then
    begin
     if crPos=0 then
      begin
        IMG.Picture.Bitmap.FreeImage;
        aBitMap:=fOpen.IndexOfBitMap[crPos];
        if aBitMap <> nil then begin
        IMG.Picture.Bitmap:=aBitMap;
        IMG.Repaint;
        IMG.Refresh;
        end;
      end
     else
      begin
       edit7.Text:=IntToStr(crPos);
       crPos:=0;
       Button4.Click;
      end;
    end;
   end;
end;

procedure TForm1.N12Click(Sender: TObject);
var Pname:string;
begin
  if fOpen.Count > 0 then
   begin
   OD.Filter:='专用资源文件 (*.TPE)|*.TPE';
   if OD.Execute then
   begin
    Pname:=OD.FileName;
    if fOpen.ImportFromSeq(fOpen.Count,1,Pname) then
     begin
       mImage := fOpen.Count;
       crPos:= fOpen.Count - 2;
       edit7.Text:=IntToStr(fOpen.Count - 1);
       Button4.Click;
     end;
   end;
   end;
end;

procedure TForm1.N11Click(Sender: TObject);
begin
  close;
end;

function SaveMemToFile(fP:Pointer;size:DWORD;const fstr:string):DWORD;
var hfstr,hMap:Cardinal;
    hMem:Pointer;
begin
  ReSult:=0;
  hfstr:=CreateFile(
        pchar(fstr),
        GENERIC_READ + GENERIC_WRITE,
        FILE_SHARE_WRITE or FILE_SHARE_READ,
        0,
        OPEN_ALWAYS,
        FILE_ATTRIBUTE_NORMAL,
        0
        );
  if hfstr<>INVALID_HANDLE_VALUE then
    begin
      SetFilePointer(hfstr,size,0,FILE_BEGIN);
      SetEndOfFile(hfstr);
      hMap:=CreateFileMapping(hfstr,nil,PAGE_READWRITE,0,0,nil);
      if hMap<>0 then
        begin
         hMem:=MapViewOfFile(hMap,FILE_MAP_READ or FILE_MAP_WRITE,0,0,0);
         if hMem<>nil then
           begin
             CopyMemory(hMem,fP,size);
             UnmapViewOfFile(hMem);
           end;
         CloseHandle(hMap);
        end;
      CloseHandle(hfstr);
    end;
end;


游客,如果您要查看本帖隐藏内容请回复








上一篇:dnf地下城与勇士源码(Edgame Maker版)源码
下一篇:EI3.0插件代码5.0插件Delphi源码
回复 关闭延时

使用道具 举报

0

主题

6

帖子

60

积分

旋风流星刀

Rank: 1

积分
60
2022-4-23 16:30:41   显示全部楼层  
传奇Wil客户端编辑器Delphi源代码

回复 支持 反对

使用道具 举报

您需要登录后才可以回帖   登录 立即注册

高级模式

Powered by Discuz! X3.4 © Comsenz Inc.

Archiver|手机版|小黑屋|美林传奇GM论坛 ( 蜀ICP备2020030293号-2 )