From 9649ae46f093f7d4e6130d24c90da19e153a2ccf Mon Sep 17 00:00:00 2001 From: Vadim Dashevskiy Date: Tue, 10 Dec 2013 14:30:49 +0000 Subject: MirandaNGHistoryToDB moved to deprecated git-svn-id: http://svn.miranda-ng.org/main/trunk@7118 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- .../IMDownloaderComponent/Demo/DownLoaderTest.dpr | 15 -- .../Demo/DownLoaderTest.dproj | 109 ------------- .../IMDownloaderComponent/Demo/DownLoaderTest.res | Bin 5280 -> 0 bytes .../Demo/DownLoaderTestUnit.dfm | 125 --------------- .../Demo/DownLoaderTestUnit.pas | 176 --------------------- 5 files changed, 425 deletions(-) delete mode 100644 plugins/MirandaNGHistoryToDB/IMDownloaderComponent/Demo/DownLoaderTest.dpr delete mode 100644 plugins/MirandaNGHistoryToDB/IMDownloaderComponent/Demo/DownLoaderTest.dproj delete mode 100644 plugins/MirandaNGHistoryToDB/IMDownloaderComponent/Demo/DownLoaderTest.res delete mode 100644 plugins/MirandaNGHistoryToDB/IMDownloaderComponent/Demo/DownLoaderTestUnit.dfm delete mode 100644 plugins/MirandaNGHistoryToDB/IMDownloaderComponent/Demo/DownLoaderTestUnit.pas (limited to 'plugins/MirandaNGHistoryToDB/IMDownloaderComponent/Demo') diff --git a/plugins/MirandaNGHistoryToDB/IMDownloaderComponent/Demo/DownLoaderTest.dpr b/plugins/MirandaNGHistoryToDB/IMDownloaderComponent/Demo/DownLoaderTest.dpr deleted file mode 100644 index 8942f8b61d..0000000000 --- a/plugins/MirandaNGHistoryToDB/IMDownloaderComponent/Demo/DownLoaderTest.dpr +++ /dev/null @@ -1,15 +0,0 @@ -program DownLoaderTest; - -uses - Forms, - DownLoaderTestUnit in 'DownLoaderTestUnit.pas' {MainForm}; - -{$R *.res} - -begin - Application.Initialize; - Application.MainFormOnTaskbar := True; - Application.Title := 'IM Downloader Demo'; - Application.CreateForm(TMainForm, MainForm); - Application.Run; -end. diff --git a/plugins/MirandaNGHistoryToDB/IMDownloaderComponent/Demo/DownLoaderTest.dproj b/plugins/MirandaNGHistoryToDB/IMDownloaderComponent/Demo/DownLoaderTest.dproj deleted file mode 100644 index c0b14483c0..0000000000 --- a/plugins/MirandaNGHistoryToDB/IMDownloaderComponent/Demo/DownLoaderTest.dproj +++ /dev/null @@ -1,109 +0,0 @@ -п»ї - - {8B841E47-C817-4F26-8ACF-89048F0E7C42} - DownLoaderTest.dpr - True - Release - Win32 - Application - VCL - DCC32 - 12.3 - - - true - - - true - Base - true - - - true - Base - true - - - 00400000 - false - false - false - false - false - WinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE;WinTypes=Windows;WinProcs=Windows;$(DCC_UnitAlias) - - - 0 - RELEASE;$(DCC_Define) - false - false - - - DEBUG;$(DCC_Define) - true - false - - - - MainSource - - -
MainForm
-
- - Cfg_2 - Base - - - Base - - - Cfg_1 - Base - -
- - - - Delphi.Personality.12 - VCLApplication - - - - DownLoaderTest.dpr - - - False - False - 1 - 0 - 0 - 0 - False - False - False - False - False - 1049 - 1251 - - - - - 1.0.0.0 - - - - - - 1.0.0.0 - - - - - True - - - 12 - -
diff --git a/plugins/MirandaNGHistoryToDB/IMDownloaderComponent/Demo/DownLoaderTest.res b/plugins/MirandaNGHistoryToDB/IMDownloaderComponent/Demo/DownLoaderTest.res deleted file mode 100644 index fc1937e1c7..0000000000 Binary files a/plugins/MirandaNGHistoryToDB/IMDownloaderComponent/Demo/DownLoaderTest.res and /dev/null differ diff --git a/plugins/MirandaNGHistoryToDB/IMDownloaderComponent/Demo/DownLoaderTestUnit.dfm b/plugins/MirandaNGHistoryToDB/IMDownloaderComponent/Demo/DownLoaderTestUnit.dfm deleted file mode 100644 index b245bf8704..0000000000 --- a/plugins/MirandaNGHistoryToDB/IMDownloaderComponent/Demo/DownLoaderTestUnit.dfm +++ /dev/null @@ -1,125 +0,0 @@ -object MainForm: TMainForm - Left = 0 - Top = 0 - Caption = 'TIMDownloadThread Test' - ClientHeight = 252 - ClientWidth = 608 - Color = clBtnFace - Font.Charset = DEFAULT_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Tahoma' - Font.Style = [] - OldCreateOrder = False - Position = poDesktopCenter - OnShow = FormShow - PixelsPerInch = 96 - TextHeight = 13 - object ToolBar1: TToolBar - Left = 0 - Top = 0 - Width = 608 - Height = 25 - ButtonHeight = 27 - ButtonWidth = 79 - Caption = 'ToolBar1' - List = True - ShowCaptions = True - TabOrder = 0 - object Edit1: TEdit - Left = 0 - Top = 0 - Width = 385 - Height = 27 - TabOrder = 0 - end - object TBDownload: TToolButton - Left = 385 - Top = 0 - AutoSize = True - Caption = #1057#1082#1072#1095#1072#1090#1100 - ImageIndex = 0 - OnClick = TBDownloadClick - end - object TBStopDownload: TToolButton - Left = 444 - Top = 0 - AutoSize = True - Caption = #1054#1089#1090#1072#1085#1086#1074#1080#1090#1100 - ImageIndex = 1 - Visible = False - OnClick = TBStopDownloadClick - end - object TBView: TToolButton - Left = 521 - Top = 0 - AutoSize = True - Caption = #1042#1099#1074#1077#1089#1090#1080 - DropdownMenu = PopupMenu1 - ImageIndex = 2 - Style = tbsDropDown - Visible = False - OnClick = TBViewClick - end - end - object StatusBar1: TStatusBar - Left = 0 - Top = 233 - Width = 608 - Height = 19 - Panels = <> - SimplePanel = True - end - object RichEdit1: TRichEdit - Left = 0 - Top = 25 - Width = 608 - Height = 191 - Align = alClient - Font.Charset = RUSSIAN_CHARSET - Font.Color = clWindowText - Font.Height = -11 - Font.Name = 'Tahoma' - Font.Style = [] - ParentFont = False - ReadOnly = True - ScrollBars = ssBoth - TabOrder = 2 - end - object ProgressBar1: TProgressBar - Left = 0 - Top = 216 - Width = 608 - Height = 17 - Align = alBottom - TabOrder = 3 - end - object IMDownloader_Demo: TIMDownloader - OnError = IMDownloader_DemoError - OnAccepted = IMDownloader_DemoAccepted - OnHeaders = IMDownloader_DemoHeaders - OnMD5Checked = IMDownloader_DemoMD5Checked - OnDownloading = IMDownloader_DemoDownloading - OnStartDownload = IMDownloader_DemoStartDownload - OnBreak = IMDownloader_DemoBreak - Left = 72 - Top = 40 - end - object SaveDialog1: TSaveDialog - Left = 136 - Top = 96 - end - object PopupMenu1: TPopupMenu - Left = 224 - Top = 120 - object ViewAsTest: TMenuItem - Caption = #1054#1090#1086#1073#1088#1072#1079#1080#1090#1100' '#1082#1072#1082' '#1090#1077#1082#1089#1090 - Default = True - OnClick = ViewAsTestClick - end - object SaveToFile: TMenuItem - Caption = #1057#1086#1093#1088#1072#1085#1080#1090#1100' '#1074' '#1092#1072#1081#1083 - OnClick = SaveToFileClick - end - end -end diff --git a/plugins/MirandaNGHistoryToDB/IMDownloaderComponent/Demo/DownLoaderTestUnit.pas b/plugins/MirandaNGHistoryToDB/IMDownloaderComponent/Demo/DownLoaderTestUnit.pas deleted file mode 100644 index 2ca42ac174..0000000000 --- a/plugins/MirandaNGHistoryToDB/IMDownloaderComponent/Demo/DownLoaderTestUnit.pas +++ /dev/null @@ -1,176 +0,0 @@ -unit DownLoaderTestUnit; - -interface - -uses - Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, - Dialogs, uIMDownLoader, StdCtrls, ToolWin, ComCtrls, Menus; - -type - TMainForm = class(TForm) - IMDownloader_Demo: TIMDownloader; - Edit1: TEdit; - ToolBar1: TToolBar; - StatusBar1: TStatusBar; - RichEdit1: TRichEdit; - SaveDialog1: TSaveDialog; - TBDownload: TToolButton; - TBStopDownload: TToolButton; - TBView: TToolButton; - ViewAsTest: TMenuItem; - SaveToFile: TMenuItem; - PopupMenu1: TPopupMenu; - ProgressBar1: TProgressBar; - procedure FormShow(Sender: TObject); - procedure IMDownloader_DemoError(Sender: TObject; E: TIMDownLoadError); - procedure IMDownloader_DemoAccepted(Sender: TObject); - procedure IMDownloader_DemoStartDownload(Sender: TObject); - procedure IMDownloader_DemoBreak(Sender: TObject); - procedure ViewAsTestClick(Sender: TObject); - procedure SaveToFileClick(Sender: TObject); - procedure TBDownloadClick(Sender: TObject); - procedure TBStopDownloadClick(Sender: TObject); - procedure TBViewClick(Sender: TObject); - procedure IMDownloader_DemoDownloading(Sender: TObject; AcceptedSize, MaxSize: Cardinal); - procedure IMDownloader_DemoHeaders(Sender: TObject; Headers: string); - procedure IMDownloader_DemoMD5Checked(Sender: TObject; MD5Correct, - SizeCorrect: Boolean; MD5Str: string); - private - { Private declarations } - public - { Public declarations } - end; - -var - MainForm: TMainForm; - -const - uURL = 'http://im-history.ru/update/get.php?file=HistoryToDB-Update'; - -implementation - -{$R *.dfm} - -procedure TMainForm.FormShow(Sender: TObject); -begin - Edit1.Text := uURL; - IMDownloader_Demo.DirPath := ExtractFilePath(Application.ExeName); -end; - -procedure TMainForm.IMDownloader_DemoAccepted(Sender: TObject); -begin - ProgressBar1.Visible := False; - TBStopDownload.Visible := false; - TBDownload.Visible := true; - TBView.Visible := true; - Edit1.ReadOnly := false; - StatusBar1.SimpleText := - 'Скачивание успешно завершено. Всего получено данных в байтах: ' + IntToStr - (IMDownloader_Demo.AcceptedSize); - //RichEdit1.Lines.Append('MD5 файла в памяти: '+MD5DigestToStr(MD5Stream(IMDownloader_Demo.OutStream))); -end; - -procedure TMainForm.IMDownloader_DemoBreak(Sender: TObject); -begin - ProgressBar1.Visible := False; - TBStopDownload.Visible := false; - TBStopDownload.Enabled := true; - TBDownload.Visible := true; - TBView.Visible := IMDownloader_Demo.AcceptedSize > 0; - Edit1.ReadOnly := false; - StatusBar1.SimpleText := - 'Скачивание остановлено. Всего получено данных в байтах: ' + IntToStr - (IMDownloader_Demo.AcceptedSize); -end; - -procedure TMainForm.IMDownloader_DemoDownloading(Sender: TObject; AcceptedSize, - MaxSize: Cardinal); -begin - StatusBar1.SimpleText := 'Получено байт: ' + IntToStr(AcceptedSize); - ProgressBar1.Visible := MaxSize > AcceptedSize; - ProgressBar1.Max := MaxSize; - ProgressBar1.Position := AcceptedSize; -end; - -procedure TMainForm.IMDownloader_DemoError(Sender: TObject; E: TIMDownLoadError); -var - s: string; -begin - ProgressBar1.Visible := False; - TBStopDownload.Visible := false; - TBDownload.Visible := true; - TBView.Visible := IMDownloader_Demo.AcceptedSize > 0; - Edit1.ReadOnly := false; - case E of - deInternetOpen: s := 'Ошибка при открытии сессии. '; - deInternetOpenUrl: s := 'Ошибка при запрашивании файла. '; - deDownloadingFile: s := 'Ошибка при чтении файла. '; - deRequest: s := 'Ошибка при запросе данных через прокси-сервер. '; - end; - StatusBar1.SimpleText := - s + 'Всего получено данных в байтах: ' + IntToStr - (IMDownloader_Demo.AcceptedSize); -end; - -procedure TMainForm.IMDownloader_DemoHeaders(Sender: TObject; Headers: string); -begin - RichEdit1.Lines.Text := Headers; -end; - -procedure TMainForm.IMDownloader_DemoMD5Checked(Sender: TObject; MD5Correct, - SizeCorrect: Boolean; MD5Str: string); -begin - if MD5Correct then - RichEdit1.Lines.Append('Контрольная сумма MD5 = '+MD5Str+' - ВЕРНА!') - else - RichEdit1.Lines.Append('Контрольная сумма MD5 = '+MD5Str+' - НЕ ВЕРНА!'); - if SizeCorrect then - RichEdit1.Lines.Append('Размер файла = '+IntToStr(IMDownloader_Demo.AcceptedSize)+' - ВЕРНЫЙ!') - else - RichEdit1.Lines.Append('Размер файла = '+IntToStr(IMDownloader_Demo.AcceptedSize)+' - НЕ ВЕРНЫЙ!'); -end; - -procedure TMainForm.IMDownloader_DemoStartDownload(Sender: TObject); -begin - TBDownload.Visible := false; - TBStopDownload.Visible := true; - TBView.Visible := false; - Edit1.ReadOnly := true; - StatusBar1.SimpleText := 'Инициализация скачивания...'; -end; - -procedure TMainForm.ViewAsTestClick(Sender: TObject); -begin - RichEdit1.Lines.LoadFromStream(IMDownloader_Demo.OutStream); -end; - -procedure TMainForm.SaveToFileClick(Sender: TObject); -begin - if Edit1.Text = uURL then - SaveDialog1.FileName := 'HistoryToDBCreateDB.rar'; - if SaveDialog1.Execute then - IMDownloader_Demo.OutStream.SaveToFile(SaveDialog1.FileName); -end; - -procedure TMainForm.TBDownloadClick(Sender: TObject); -begin - IMDownloader_Demo.URL := Edit1.Text; - //IMDownloader_Demo.Proxy := '192.168.42.240:1522'; - IMDownloader_Demo.Proxy := '172.29.72.168:8080'; - IMDownloader_Demo.Download; -end; - -procedure TMainForm.TBStopDownloadClick(Sender: TObject); -begin - StatusBar1.SimpleText := 'Останавливаем скачку'; - TBStopDownload.Enabled := false; - IMDownloader_Demo.BreakDownload; -end; - -procedure TMainForm.TBViewClick(Sender: TObject); -begin - TBView.DropdownMenu.Popup(TBView.ClientOrigin.X, - TBView.ClientOrigin.Y + TBView.Height); -end; - -end. -- cgit v1.2.3