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

📄 jclmsdossys.pas

📁 East make Tray Icon in delphi
💻 PAS
📖 第 1 页 / 共 2 页
字号:
{**************************************************************************************************}
{                                                                                                  }
{ Project JEDI Code Library (JCL)                                                                  }
{                                                                                                  }
{ The contents of this file are subject to the Mozilla Public License Version 1.1 (the "License"); }
{ you may not use this file except in compliance with the License. You may obtain a copy of the    }
{ License at http://www.mozilla.org/MPL/                                                           }
{                                                                                                  }
{ Software distributed under the License is distributed on an "AS IS" basis, WITHOUT WARRANTY OF   }
{ ANY KIND, either express or implied. See the License for the specific language governing rights  }
{ and limitations under the License.                                                               }
{                                                                                                  }
{ The Original Code is JclMsdosSys.pas.                                                            }
{                                                                                                  }
{ The Initial Developer of the Original Code is Robert Marquardt                                   }
{ Portions created by Robert Marquardt are Copyright (C) 2001 Robert Marquardt                     }
{ All Rights Reserved.                                                                             }
{                                                                                                  }
{ Contributor(s): Robert Rossmair (IJclMsdosSys interface)                                         }
{                                                                                                  }
{ You may retrieve the latest version of this file at the Project JEDI's Code Library home page,   }
{ located at http://sourceforge.net/projects/jcl/                                                  }
{                                                                                                  }
{ Known Issues: None                                                                               }
{                                                                                                  }
{**************************************************************************************************}

// Last modified: $Date: 2005/02/25 07:20:16 $
// For history see end of file

unit JclMsdosSys;

{$I jcl.inc}
{$I windowsonly.inc}

interface

uses
  Classes, SysUtils;

type
  IJclMsdosSys = interface
  ['{3E1C7E48-49E5-408B-86D2-9924D223B5C5}']
    // Property access methods
    function GetAutoScan: Boolean;
    function GetBootDelay: Cardinal;
    function GetBootGUI: Boolean;
    function GetBootKeys: Boolean;
    function GetBootMenu: Boolean;
    function GetBootMenuDefault: Cardinal;
    function GetBootMenuDelay: Cardinal;
    function GetBootMulti: Boolean;
    function GetBootSafe: Boolean;
    function GetBootWarn: Boolean;
    function GetBootWin: Boolean;
    function GetDBLSpace: Boolean;
    function GetDoubleBuffer: Boolean;
    function GetDRVSpace: Boolean;
    function GetHostWinBootDrv: Char;
    function GetLoadTop: Boolean;
    function GetLogo: Boolean;
    function GetNetwork: Boolean;
    function GetUninstallDir: Char;
    function GetWinBootDir: string;
    function GetWinDir: string;
    function GetWinVer: string;
    procedure SetUninstallDir(AUninstallDir: Char);
    procedure SetWinDir(AWinDir: string);
    procedure SetWinBootDir(AWinBootDir: string);
    procedure SetHostWinBootDrv(AHostWinBootDrv: Char);
    procedure SetAutoScan(AAutoScan: Boolean);
    procedure SetBootDelay(ABootDelay: Cardinal);
    procedure SetBootGUI(ABootGUI: Boolean);
    procedure SetBootKeys(ABootKeys: Boolean);
    procedure SetBootMenu(ABootMenu: Boolean);
    procedure SetBootMenuDefault(ABootMenuDefault: Cardinal);
    procedure SetBootMenuDelay(ABootMenuDelay: Cardinal);
    procedure SetBootMulti(ABootMulti: Boolean);
    procedure SetBootSafe(ABootSafe: Boolean);
    procedure SetBootWarn(ABootWarn: Boolean);
    procedure SetBootWin(ABootWin: Boolean);
    procedure SetDBLSpace(ADBLSpace: Boolean);
    procedure SetDRVSpace(ADRVSpace: Boolean);
    procedure SetDoubleBuffer(ADoubleBuffer: Boolean);
    procedure SetLoadTop(ALoadTop: Boolean);
    procedure SetLogo(ALogo: Boolean);
    procedure SetNetwork(ANetwork: Boolean);
    procedure SetWinVer(AWinVer: string);
    procedure SetBool(var ANew: Boolean; AOld: Boolean);
    procedure SetString(var ANew: string; AOld: string);
    // Properties
    property UninstallDir: Char read GetUninstallDir write SetUninstallDir;
    property WinDir: string read GetWinDir write SetWinDir;
    property WinBootDir: string read GetWinBootDir write SetWinBootDir;
    property HostWinBootDrv: Char read GetHostWinBootDrv write SetHostWinBootDrv;
    property AutoScan: Boolean read GetAutoScan write SetAutoScan;
    property BootDelay: Cardinal read GetBootDelay write SetBootDelay;
    property BootGUI: Boolean read GetBootGUI write SetBootGUI;
    property BootKeys: Boolean read GetBootKeys write SetBootKeys;
    property BootMenu: Boolean read GetBootMenu write SetBootMenu;
    property BootMenuDefault: Cardinal read GetBootMenuDefault write SetBootMenuDefault;
    property BootMenuDelay: Cardinal read GetBootMenuDelay write SetBootMenuDelay;
    property BootMulti: Boolean read GetBootMulti write SetBootMulti;
    property BootSafe: Boolean read GetBootSafe write SetBootSafe;
    property BootWarn: Boolean read GetBootWarn write SetBootWarn;
    property BootWin: Boolean read GetBootWin write SetBootWin;
    property DBLSpace: Boolean read GetDBLSpace write SetDBLSpace;
    property DRVSpace: Boolean read GetDRVSpace write SetDRVSpace;
    property DoubleBuffer: Boolean read GetDoubleBuffer write SetDoubleBuffer;
    property LoadTop: Boolean read GetLoadTop write SetLoadTop;
    property Logo: Boolean read GetLogo write SetLogo;
    property Network: Boolean read GetNetwork write SetNetwork;
    property WinVer: string read GetWinVer write SetWinVer;
  end;

function GetMsdosSys: IJclMsdosSys;

implementation

const
  cMsdosSys = 'C:\MSDOS.SYS';

type
  TJclMsdosSys = class(TInterfacedObject, IJclMsdosSys)
  private
    FUninstallDir: Char;
    FWinDir: string;
    FWinBootDir: string;
    FHostWinBootDrv: Char;
    FAutoScan: Boolean;
    FBootDelay: Cardinal;
    FBootGUI: Boolean;
    FBootKeys: Boolean;
    FBootMenu: Boolean;
    FBootMenuDefault: Cardinal;
    FBootMenuDelay: Cardinal;
    FBootMulti: Boolean;
    FBootSafe: Boolean;
    FBootWarn: Boolean;
    FBootWin: Boolean;
    FDBLSpace: Boolean;
    FDRVSpace: Boolean;
    FDoubleBuffer: Boolean;
    FLoadTop: Boolean;
    FLogo: Boolean;
    FNetwork: Boolean;
    FWinVer: string;
    function GetAutoScan: Boolean;
    function GetBootDelay: Cardinal;
    function GetBootGUI: Boolean;
    function GetBootKeys: Boolean;
    function GetBootMenu: Boolean;
    function GetBootMenuDefault: Cardinal;
    function GetBootMenuDelay: Cardinal;
    function GetBootMulti: Boolean;
    function GetBootSafe: Boolean;
    function GetBootWarn: Boolean;
    function GetBootWin: Boolean;
    function GetDBLSpace: Boolean;
    function GetDoubleBuffer: Boolean;
    function GetDRVSpace: Boolean;
    function GetHostWinBootDrv: Char;
    function GetLoadTop: Boolean;
    function GetLogo: Boolean;
    function GetNetwork: Boolean;
    function GetUninstallDir: Char;
    function GetWinBootDir: string;
    function GetWinDir: string;
    function GetWinVer: string;
    procedure SetUninstallDir(AUninstallDir: Char);
    procedure SetWinDir(AWinDir: string);
    procedure SetWinBootDir(AWinBootDir: string);
    procedure SetHostWinBootDrv(AHostWinBootDrv: Char);
    procedure SetAutoScan(AAutoScan: Boolean);
    procedure SetBootDelay(ABootDelay: Cardinal);
    procedure SetBootGUI(ABootGUI: Boolean);
    procedure SetBootKeys(ABootKeys: Boolean);
    procedure SetBootMenu(ABootMenu: Boolean);
    procedure SetBootMenuDefault(ABootMenuDefault: Cardinal);
    procedure SetBootMenuDelay(ABootMenuDelay: Cardinal);
    procedure SetBootMulti(ABootMulti: Boolean);
    procedure SetBootSafe(ABootSafe: Boolean);
    procedure SetBootWarn(ABootWarn: Boolean);
    procedure SetBootWin(ABootWin: Boolean);
    procedure SetDBLSpace(ADBLSpace: Boolean);
    procedure SetDRVSpace(ADRVSpace: Boolean);
    procedure SetDoubleBuffer(ADoubleBuffer: Boolean);
    procedure SetLoadTop(ALoadTop: Boolean);
    procedure SetLogo(ALogo: Boolean);
    procedure SetNetwork(ANetwork: Boolean);
    procedure SetWinVer(AWinVer: string);
    procedure SetBool(var ANew: Boolean; AOld: Boolean);
    procedure SetString(var ANew: string; AOld: string);
    procedure ReadMsdosSys;
    procedure WriteMsdosSys;
  public
    constructor Create;
    destructor Destroy; override;
    property UninstallDir: Char read GetUninstallDir write SetUninstallDir;
    property WinDir: string read GetWinDir write SetWinDir;
    property WinBootDir: string read GetWinBootDir write SetWinBootDir;
    property HostWinBootDrv: Char read GetHostWinBootDrv write SetHostWinBootDrv;
    property AutoScan: Boolean read GetAutoScan write SetAutoScan;
    property BootDelay: Cardinal read GetBootDelay write SetBootDelay;
    property BootGUI: Boolean read GetBootGUI write SetBootGUI;
    property BootKeys: Boolean read GetBootKeys write SetBootKeys;
    property BootMenu: Boolean read GetBootMenu write SetBootMenu;
    property BootMenuDefault: Cardinal read GetBootMenuDefault write SetBootMenuDefault;
    property BootMenuDelay: Cardinal read GetBootMenuDelay write SetBootMenuDelay;
    property BootMulti: Boolean read GetBootMulti write SetBootMulti;
    property BootSafe: Boolean read GetBootSafe write SetBootSafe;
    property BootWarn: Boolean read GetBootWarn write SetBootWarn;
    property BootWin: Boolean read GetBootWin write SetBootWin;
    property DBLSpace: Boolean read GetDBLSpace write SetDBLSpace;
    property DRVSpace: Boolean read GetDRVSpace write SetDRVSpace;
    property DoubleBuffer: Boolean read GetDoubleBuffer write SetDoubleBuffer;
    property LoadTop: Boolean read GetLoadTop write SetLoadTop;
    property Logo: Boolean read GetLogo write SetLogo;
    property Network: Boolean read GetNetwork write SetNetwork;
    property WinVer: string read GetWinVer write SetWinVer;
  end;

function GetMsdosSys: IJclMsdosSys;
begin
  Result := TJclMsdosSys.Create;
end;

constructor TJclMsdosSys.Create;
begin
  inherited Create;
  ReadMsdosSys;
end;

destructor TJclMsdosSys.Destroy;
begin
  WriteMsdosSys;
  inherited Destroy;
end;

function TJclMsdosSys.GetAutoScan: Boolean;
begin
  Result := FAutoScan;
end;

function TJclMsdosSys.GetBootDelay: Cardinal;
begin
  Result := FBootDelay;
end;

function TJclMsdosSys.GetBootGUI: Boolean;
begin
  Result := FBootGUI;
end;

function TJclMsdosSys.GetBootMenu: Boolean;
begin
  Result := FBootMenu;
end;

function TJclMsdosSys.GetBootKeys: Boolean;
begin
  Result := FBootKeys;
end;

function TJclMsdosSys.GetBootMenuDefault: Cardinal;
begin
  Result := FBootMenuDefault;
end;

function TJclMsdosSys.GetBootMenuDelay: Cardinal;
begin
  Result := FBootMenuDelay;
end;

function TJclMsdosSys.GetBootMulti: Boolean;
begin
  Result := FBootMulti;
end;

function TJclMsdosSys.GetBootSafe: Boolean;
begin
  Result := FBootSafe;
end;

function TJclMsdosSys.GetBootWarn: Boolean;
begin
  Result := FBootWarn;
end;

function TJclMsdosSys.GetBootWin: Boolean;
begin
  Result := FBootWin;
end;

function TJclMsdosSys.GetDBLSpace: Boolean;
begin
  Result := FDBLSpace;
end;

function TJclMsdosSys.GetDoubleBuffer: Boolean;
begin
  Result := FDoubleBuffer;
end;

function TJclMsdosSys.GetDRVSpace: Boolean;
begin
  Result := FDRVSpace;
end;

function TJclMsdosSys.GetHostWinBootDrv: Char;
begin
  Result := FHostWinBootDrv;
end;

function TJclMsdosSys.GetLoadTop: Boolean;
begin
  Result := FLoadTop;
end;

function TJclMsdosSys.GetLogo: Boolean;
begin
  Result := FLogo;
end;

function TJclMsdosSys.GetNetwork: Boolean;
begin

⌨️ 快捷键说明

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