|
- 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;
复制代码
分享名称:WIL编辑器源码.zip
分享链接:http://pan.zxdll.cn:188/#s/9bdGxklg
访问密码:
|
上一篇:dnf地下城与勇士源码(Edgame Maker版)源码下一篇:EI3.0插件代码5.0插件Delphi源码
|