DevMode.pas

File name
C:\Users\Andreas Rejbrand\Documents\Dev\AlgoSim\Client\DevMode.pas
Date exported
Time exported
Formatting processor
TPascalFormattingProcessor
unit DevMode;

interface

uses
  Windows, SysUtils, Types, Classes, Registry;

function IsDevMode: Boolean;

implementation

function IsDevMode: Boolean;
begin

  var Reg := TRegistry.Create;
  try
    Reg.RootKey := HKEY_CURRENT_USER;
    if Reg.OpenKey('\Software\Rejbrand', False) then
      try
        if Reg.ValueExists('DevMode') and Reg.ReadBool('DevMode') then
          Exit(True);
      finally
        Reg.CloseKey;
      end;
  finally
    Reg.Free;
  end;

  Result := False;

end;

end.