zoukankan      html  css  js  c++  java
  • 使用 IntraWeb (36)


    每个应用须有且只有一个 Server Controller.

    TIWServerControllerBase 所在单元及继承链:
    IWServerControllerBase.TIWServerControllerBase < TIWDataModule < TDataModule < TComponent < TPersistent < TObject

    主要成员:
    property ContentPath: string      //网站静态内容全路径: ...wwwroot
    property Locked: Boolean          //only read, 无用.
    property StartDateTime: TDateTime //开始时间
    property StartUID: string         //其内部资源提取后命名时缀有这个 ID, 可能只是强调其唯一性
    property GUIActive: Boolean       //是否在 GUI 模式下; only read
    property LicenseTracking: Boolean //
    property MachineName: string      //计算机名
    property ProcessID: string        //进程 ID, 内部用于目录的唯一性
    property Rendering: TIWRendering  //两个取值: rnInFile、rnInMemory(默认)
    property CacheFiles: TStrings     //缓存文件列表
    property ServerVariables: TStringList  //可以通过它设置全局变量
    property RewriteURL: string	       //是配合 IIS 使用的
    property AuthBeforeNewSession: Boolean //是否在创建 Session 之前验证, 默认 False; 这和代码写法也有关系
    property AppName: string      //应用名称
    property BoundIP: string      //绑定 IP
    property CacheDir: string     //缓存全路径
    property CharSet: string      //默认 UTF8
    property CacheExpiry: Integer //缓存文件保留的分钟数
    property ComInitialization: TComInitialization //COM 初始化选项; 其默认值 ciNone 表示不需要 COM
    property Compression: TIWCompressionOptions    //压缩相关设置
    property Description: string	     //程序描述
    property DebugHTML: Boolean	     //默认 False; True 时, 最终的 Html 代码会更易读
    property DisplayName: string	     //程序的显示名称
    property Log: TLogOptions	     //两个选项: loNone(默认)、loFile(将会在程序目录保存日志)
    property EnableImageToolbar: Boolean //当鼠标在图片上时, 是否启用图像工具栏; 只对个别浏览器有效
    property ExceptionDisplayMode: TIWShowMessageType //异常显示模式: smAlert(默认)、smNewWindow、smSameWindow、smSameWindowFrame
    property FilesDir: TIWDirectoryName  //? 应该没用了
    property HistoryEnabled: Boolean	          //是否记忆页面历史, 允许后可使用"前进、后退"按钮(仅在非异步状态下)
    property InternalFilesDir: TIWDirectoryName //用于 ISAPI 模式, 指定内部文件目录
    property InternalFilesURL: string           //用于 ISAPI 模式
    property JavascriptDebug: Boolean      //是否启用 js 调试, JavaScriptOptions 中也有
    property HTMLHeaders: TStringList      //添加到 Html Head 中的内容
    property ContentFiles: TStringList     //添加 js 或 css 链接
    property MasterTemplate: string	       //指定主模板
    property PageTransitions: Boolean      //是否使用页面过渡效果, 只用于个别浏览器
    property Port: Integer		       //端口; 一般是随机分配的, 设置只对独立服务器程序有效, 不影响 ISAPI
    property RedirectMsgDelay: Integer     //重定向延迟(秒)
    property ServerResizeTimeout: Integer  //响应 OnResize 事件延迟(毫秒); 默认 0 表示立即执行
    property Auther: TIWAutherBase         //指定验证控件
    property ShowLoadingAnimation: Boolean //是否显示载入动画
    property SessionTimeout: Integer       //Session 超时分钟数; 默认 20 分钟, 有些版本限制修改
    property StyleSheet: TIWFileReference  //指定 *.css 文件
    property SSLOptions: TIWSSLOptions     //SSL 安全选项; 只用于独立服务器程序
    property TemplateDir: string	       //模板文件夹全路径
    property Theme: string		       //? 今后 IW 会使用主题吗? 和模板如何协调?
    property URLBase: string	       //IW 版本
    property Version: string	       //IntraWeb 版本号
    property AllowMultipleSessionsPerUser: Boolean //允许多进程访问?
    property DocType: string	       //指定 Html 的 DocType
    property IECompatibilityMode: string   //IE 兼容模式
    property ShowStartParams: Boolean      //开始参数是否显示在 Url 中
    property ExceptionLogger: TIWExceptionLogger    //异常日志记录器; 这也是 IW.14 新增的; 参考: http://ww2.atozed.com/docs/IW/Classes/TIWExceptionLogger.html
    property CookieOptions: TIWSessionCookieOptions	//Cookie 选项
    property SearchEngineOptions: TIWSearchEngineOptions //
    property JavaScriptOptions: TIWJavaScriptOptions     //js 调试与压缩选项
    property HttpKeepAlive: Boolean	//是否保存连接, 默认 False; IW.14.0.11 新增
    property SecurityOptions: TIWSecurityOptions    //安全选项
    property UseInternalFiles: Boolean              //only write; 暂未见内部有用它的地方
    
    property OnAfterDispatch: TOnDispatch	      //
    property OnBeforeDispatch: TOnDispatch	      //
    property OnCloseSession: TOnCloseSessionEvent //
    property OnConfig: TNotifyEvent		      //初始化; 常用
    property OnException: TOnExceptionEvent	      //
    property OnGetSessionID: TOnGetSessionID      //
    property OnNewSession: TOnNewSessionEvent     //ServerController 单元已默认使用
    property OnGetMainForm: TOnGetMainFormEvent   //
    property OnBackButton: TOnBackButtonEvent     //点后退按钮时
    property OnBeforeRender: TOnBeforeRenderEvent //
    property OnAfterRender: TOnAfterRenderEvent   //
    property OnUserTag: TOnUserTag		      //
    property OnSessionTag: TOnSessionTag	      //
    property OnBrowserCheck: TOnBrowserCheckEvent //浏览器判断
    property OnCreate: TNotifyEvent               //常用
    
    {在初始化阶段几个事件的执行顺序: OnConfig、OnCreate、OnBrowserCheck、OnGetSessionID、OnNewSession、OnGetMainForm、OnBeforeRender、OnAfterRender}
    
    function AuthActive: Boolean
    class procedure SetServerControllerClass      //ServerController 单元 initialization ...
    class function NewCacheFile(const AContentType: string): string	//建立临时文件
    


    //它有点复杂, 随时补充...
    


  • 相关阅读:
    集合模拟斗地主
    泛型
    Iterator迭代器
    嵌入式应用开发过程中用到的函数
    Keil ,source insight使用技巧等
    Socket应用demo 获取IP
    tftp安装、配置,ubuntu联网设置
    C++基础三——类、结构体、联合体
    C++基础二——清华
    STM32笔记
  • 原文地址:https://www.cnblogs.com/del/p/3808447.html
Copyright © 2011-2022 走看看