【delphi开源代码栏目提醒】:本文主要为网学会员提供frmChapters.pas,希望对需要frmChapters.pas网友有所帮助,学习一下!
unit frmChapters;
interface
uses
Classes, SysUtils, IWAppForm, IWApplication, IWColor, IWTypes, IWCompEdit,
IWDBStdCtrls, jpeg, IWExtCtrls, IWGrids, IWDBGrids, Controls,
IWVCLBaseControl, IWBaseControl, IWBaseHTMLControl, IWControl, IWCompLabel,
IWCompMemo, IWHTMLControls;
type
TiwfmChapters = class(TIWAppForm)
iwlChapter: TIWLabel;
IWDBNavigator1: TIWDBNavigator;
dgrdChapters: TIWDBGrid;
IWImage1: TIWImage;
IWLabel4: TIWLabel;
IWLabel2: TIWLabel;
IWDBEdit1: TIWDBEdit;
IWDBMemo1: TIWDBMemo;
iwdbfDemo: TIWDBFile;
IWLabel1: TIWLabel;
IWLink1: TIWLink;
IWLabel3: TIWLabel;
iwedtSize: TIWEdit;
procedure IWDBNavigator1First(Sender: TObject);
procedure dgrdChaptersRenderCell(ACell: TIWGridCell; const ARow,
AColumn: Integer);
procedure IWLink1Click(Sender: TObject);
private
procedure ShowDemoSize;
public
procedure SetTitle(const sChapter : string);
end;
implementation
uses Graphics, ServerController, UserSessionUnit;
{$R *.dfm}
{ TiwfmChapters }
procedure TiwfmChapters.dgrdChaptersRenderCell(ACell: TIWGridCell; const ARow,
AColumn: Integer);
begin
// -1 is Footer Row
if ARow = -1 then
begin
ACell.BGColor := clSilver;
if AColumn = 0 then
begin
ACell.Font.Color := clRed;
ACell.Text := ' 一共有 : ' + IntToStr(dgrdChapters.RecordCount) + '章节';
end;
end
else
begin
if dgrdChapters.RowIsCurrent then begin
ACell.BGColor := clYellow;
end;
end;
end;
procedure TiwfmChapters.IWDBNavigator1First(Sender: TObject);
begin
ShowDemoSize;
end;
procedure TiwfmChapters.IWLink1Click(Sender: TObject);
begin
Hide;
end;
procedure TiwfmChapters.SetTitle(const sChapter: string);
begin
Self.iwlChapter.Caption := sChapter;
UserSession.OpenDemoTable;
end;
procedure TiwfmChapters.ShowDemoSize;
begin
Self.iwedtSize.Text := IntToStr(UserSession.getDemoSize);
end;
end.
上一篇:
FrmChangePW.pas
下一篇:
秋天是疼痛的