101 lines
2.8 KiB
ObjectPascal
101 lines
2.8 KiB
ObjectPascal
![]() |
unit U_SLT;
|
|||
|
|
|||
|
interface
|
|||
|
|
|||
|
uses
|
|||
|
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
|
|||
|
Dialogs, ExtCtrls, jpeg, cxControls, cxContainer, cxEdit, cxImage, IdFTP,
|
|||
|
ShellAPI, cxGraphics, cxLookAndFeels, cxLookAndFeelPainters, dxSkinsCore,
|
|||
|
dxSkinBlack, dxSkinBlue, dxSkinBlueprint, dxSkinCaramel, dxSkinCoffee,
|
|||
|
dxSkinDarkRoom, dxSkinDarkSide, dxSkinDevExpressDarkStyle,
|
|||
|
dxSkinDevExpressStyle, dxSkinFoggy, dxSkinGlassOceans, dxSkinHighContrast,
|
|||
|
dxSkiniMaginary, dxSkinLilian, dxSkinLiquidSky, dxSkinLondonLiquidSky,
|
|||
|
dxSkinMcSkin, dxSkinMetropolis, dxSkinMetropolisDark, dxSkinMoneyTwins,
|
|||
|
dxSkinOffice2007Black, dxSkinOffice2007Blue, dxSkinOffice2007Green,
|
|||
|
dxSkinOffice2007Pink, dxSkinOffice2007Silver, dxSkinOffice2010Black,
|
|||
|
dxSkinOffice2010Blue, dxSkinOffice2010Silver, dxSkinOffice2013DarkGray,
|
|||
|
dxSkinOffice2013LightGray, dxSkinOffice2013White, dxSkinPumpkin, dxSkinSeven,
|
|||
|
dxSkinSevenClassic, dxSkinSharp, dxSkinSharpPlus, dxSkinSilver,
|
|||
|
dxSkinSpringTime, dxSkinStardust, dxSkinSummer2008, dxSkinTheAsphaltWorld,
|
|||
|
dxSkinsDefaultPainters, dxSkinValentine, dxSkinVS2010, dxSkinWhiteprint,
|
|||
|
dxSkinXmas2008Blue;
|
|||
|
|
|||
|
type
|
|||
|
TfrmSLT = class(TFrame)
|
|||
|
cxImage1: TcxImage;
|
|||
|
Panel1: TPanel;
|
|||
|
procedure cxImage1Click(Sender: TObject);
|
|||
|
procedure cxImage1DblClick(Sender: TObject);
|
|||
|
private
|
|||
|
CYID, FileName: string;
|
|||
|
// procedure Sharpen(SrcBmp:TBitmap);
|
|||
|
{ Private declarations }
|
|||
|
public
|
|||
|
procedure Init(fCYID: string; fFileName: string; fPicture: TJpegImage);
|
|||
|
{ Public declarations }
|
|||
|
end;
|
|||
|
|
|||
|
implementation
|
|||
|
|
|||
|
uses
|
|||
|
U_DataLink;
|
|||
|
{$R *.dfm}
|
|||
|
|
|||
|
procedure TfrmSLT.Init(fCYID: string; fFileName: string; fPicture: TJpegImage);
|
|||
|
begin
|
|||
|
CYID := trim(fCYID);
|
|||
|
FileName := trim(fFileName);
|
|||
|
Panel1.Caption := FileName;
|
|||
|
cxImage1.Picture.Assign(fPicture);
|
|||
|
end;
|
|||
|
|
|||
|
procedure TfrmSLT.cxImage1Click(Sender: TObject);
|
|||
|
begin
|
|||
|
// Fsplcode:=splcode;
|
|||
|
// FPatFile:=patfile;
|
|||
|
/// frmSample_List.Fsplcode:=splcode;
|
|||
|
/// frmSample_List.FPatFile:=patfile;
|
|||
|
// showmessage(splcode);
|
|||
|
end;
|
|||
|
|
|||
|
procedure TfrmSLT.cxImage1DblClick(Sender: TObject);
|
|||
|
var
|
|||
|
IdFTP1: TIdFTP;
|
|||
|
FPath, FFName: string;
|
|||
|
FInt: integer;
|
|||
|
begin
|
|||
|
try
|
|||
|
IdFTP1 := TIdFTP.Create(self);
|
|||
|
IdFTP1.Host := PicSvr;
|
|||
|
IdFTP1.Username := 'three';
|
|||
|
IdFTP1.Password := '641010';
|
|||
|
IdFTP1.Connect();
|
|||
|
except
|
|||
|
IdFTP1.Quit;
|
|||
|
IdFTP1.Free;
|
|||
|
Application.MessageBox('<27><EFBFBD><DEB7><EFBFBD><EFBFBD>ӵ<EFBFBD><D3B5>ļ<EFBFBD><C4BC><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>飡', '<27><>ʾ', MB_ICONWARNING);
|
|||
|
Exit;
|
|||
|
end;
|
|||
|
FPath := 'D:\Right1209\';
|
|||
|
if not DirectoryExists(ExtractFileDir(FPath)) then
|
|||
|
CreateDir(ExtractFileDir(FPath));
|
|||
|
FFName := Trim(FileName);
|
|||
|
FFName := FPath + FFName;
|
|||
|
if FileExists(FFName) then
|
|||
|
begin
|
|||
|
FInt := 1;
|
|||
|
end;
|
|||
|
if FInt <> 1 then
|
|||
|
IdFTP1.Get(UserDataFlag + 'YP\' + FileName, FFName);
|
|||
|
if IdFTP1.Connected then
|
|||
|
begin
|
|||
|
IdFTP1.Quit;
|
|||
|
IdFTP1.Free;
|
|||
|
end;
|
|||
|
ShellExecute(Handle, 'open', PChar(FFName), '', '', SW_SHOWNORMAL);
|
|||
|
|
|||
|
end;
|
|||
|
|
|||
|
end.
|
|||
|
|