📄 updateform.h
字号:
/*
This file is part of KCeasy (http://www.kceasy.com)
Copyright (C) 2002-2004 Markus Kern <mkern@kceasy.com>
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
*/
//---------------------------------------------------------------------------
#ifndef UpdateFormH
#define UpdateFormH
#include <Classes.hpp>
#include <Controls.hpp>
#include <ExtCtrls.hpp>
#include <Graphics.hpp>
#include <StdCtrls.hpp>
#include <ComCtrls.hpp>
#include "Config.h"
#include "HttpDownload.h"
//---------------------------------------------------------------------------
class TAutoUpdate : public TForm
{
__published: // IDE-managed Components
TButton *UpdateBtn;
TLabel *HeadLbl;
TLabel *ManualUrlLbl;
TImage *AppLogoImage;
TMemo *DescrMemo;
TGroupBox *ManualGrp;
TLabel *ManualDescrLbl;
TGroupBox *AutoGrp;
TLabel *AutoDescrLbl;
TButton *CancelBtn;
TLabel *AutoStep1Lbl;
TLabel *AutoStep2Lbl;
TProgressBar *AutoProgressBar;
TLabel *ManualSizeLbl;
TGroupBox *NewVersionGrp;
TLabel *HeadVersionLbl;
void __fastcall ManualUrlLblMouseEnter(TObject *Sender);
void __fastcall ManualUrlLblMouseLeave(TObject *Sender);
void __fastcall ManualUrlLblClick(TObject *Sender);
void __fastcall UpdateBtnClick(TObject *Sender);
void __fastcall FormClose(TObject *Sender, TCloseAction &Action);
void __fastcall CancelBtnClick(TObject *Sender);
void __fastcall FormCloseQuery(TObject *Sender, bool &CanClose);
private: // User declarations
static const int WM_UPDATE_CB = WM_USER + 0x123;
static const int WM_DOWNLOAD_CB = WM_USER + 0x124;
THttpDownload* Download;
TFileConfig* UpdateConf;
int AutoStep;
bool SilentIfCurrent;
void UpdateOpenft(TFileConfig* UpdateConf);
bool StartUpdate();
void __fastcall WMUpdateCb(TMessage& Msg);
bool StartDownload();
void __fastcall WMDownloadCb(TMessage& Msg);
BEGIN_MESSAGE_MAP
VCL_MESSAGE_HANDLER(WM_UPDATE_CB, TMessage, WMUpdateCb)
VCL_MESSAGE_HANDLER(WM_DOWNLOAD_CB, TMessage, WMDownloadCb)
END_MESSAGE_MAP(TForm)
public: // User declarations
__fastcall TAutoUpdate(TComponent* AOwner, bool Silent = true);
__fastcall TAutoUpdate::~TAutoUpdate();
};
//---------------------------------------------------------------------------
extern PACKAGE TAutoUpdate *AutoUpdate;
//---------------------------------------------------------------------------
#endif
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -