⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 fmainform.pas

📁 IntraWeb电影程序 B/S类型的演示 Delphi+Internet 开发的电影服务器 系统登录电影网站的用户名和密码都是admin 观看电影的最低要求: 请确保你的系统已经安装媒体播放
💻 PAS
字号:
unit FMainForm;

interface

uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs, FBaseform, IWVCLBaseControl, IWBaseControl, IWBaseHTMLControl,
  IWControl, IWCompEdit, IWVCLComponent, IWBaseLayoutComponent,
  IWBaseContainerLayout, IWContainerLayout, IWTemplateProcessorHTML,
  IWCompLabel, IWCompButton, IWCompRectangle, IWGrids, IWDBGrids,
  IWCompListbox;

type
  TMainForm = class(TBaseForm)
    NewFilm: TIWRectangle;
    ComGrid: TIWDBGrid;
    HotFilm: TIWRectangle;
    procedure IWAppFormRender(Sender: TObject);
    procedure ComGridColumns0Click(ASender: TObject; const AValue: String);
    procedure ComGridColumns1Click(ASender: TObject; const AValue: String);
    procedure IWAppFormCreate(Sender: TObject);
  private
    { Private declarations }
  public
    { Public declarations }
  end;

var
  MainForm: TMainForm;

implementation
     uses ServerController,FlistForm,FplayForm,FSystem;
{$R *.dfm}

procedure TMainForm.IWAppFormRender(Sender: TObject);
var
 Vlist:tstringlist;
 New ,Hot:Integer;
begin
  inherited;
  VLIst:=TStringList.Create;
  VLIst.LoadFromFile(WebApplication.ApplicationPath+'files\FilmSystem.ini');
  New:=Strtoint(IIF(VLIst.ValueFromIndex[1],'4'));
  Hot:=Strtoint(IIF(VLIst.ValueFromIndex[2],'14'));
  VLIst.Free;

NewFilm.text:=NewFilms(Usersession.NewFilm,New);
HotFilm.Text:=HotFilms(usersession.HotFilm,Hot);
end;

procedure TMainForm.ComGridColumns0Click(ASender: TObject;
  const AValue: String);
begin
  inherited;
  UserSession.Film:=AValue;
  if not ShowForm('PlayForm') then TPlayForm.Create(WebApplication).Show;
end;

procedure TMainForm.ComGridColumns1Click(ASender: TObject;
  const AValue: String);
begin
  inherited;
  If AValue ='MainForm' then
  begin
   if not ShowForm('MainForm') then TMainForm.Create(WebApplication).Show ;
  end
 else
   begin
   UserSession.FilMType:=AValue;
   if not ShowForm('ListForm') then TListForm.Create(WebApplication).Show;
   end;
end;

procedure TMainForm.IWAppFormCreate(Sender: TObject);
var
 IsAdmin:string;
begin
  inherited;
    IsAdmin:=WebApplication.RunParams.Values['admin'];
    if IsAdmin='administrator' then begin
        UserSession.IsAdmin:=true;
        UserSession.IsRegUser:=True;
        UserSession.UserLoginName:='管理员'; 
    end; 
end;

initialization
  TMainForm.SetAsMainForm;
  RegisterClass(TMainForm);
end.

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -