Rev 57 | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 57 | Rev 62 | ||
---|---|---|---|
Line 13... | Line 13... | ||
13 | class procedure SetHelpIndex(const Value: string); static; |
13 | class procedure SetHelpIndex(const Value: string); static; |
14 | class function GetPhpInterpreter: string; static; |
14 | class function GetPhpInterpreter: string; static; |
15 | class procedure SetPhpInterpreter(const Value: string); static; |
15 | class procedure SetPhpInterpreter(const Value: string); static; |
16 | class function GetSpecialChars: boolean; static; |
16 | class function GetSpecialChars: boolean; static; |
17 | class procedure SetSpecialChars(const Value: boolean); static; |
17 | class procedure SetSpecialChars(const Value: boolean); static; |
- | 18 | class function GetDarkTheme: boolean; static; |
|
- | 19 | class procedure SetDarkTheme(const Value: boolean); static; |
|
18 | public |
20 | public |
19 | class property FontSize: integer read GetFontSize write SetFontSize; |
21 | class property FontSize: integer read GetFontSize write SetFontSize; |
20 | class property ScrapFile: string read GetScrapFile write SetScrapFile; |
22 | class property ScrapFile: string read GetScrapFile write SetScrapFile; |
21 | class property HelpIndex: string read GetHelpIndex write SetHelpIndex; |
23 | class property HelpIndex: string read GetHelpIndex write SetHelpIndex; |
22 | class property PhpInterpreter: string read GetPhpInterpreter write SetPhpInterpreter; |
24 | class property PhpInterpreter: string read GetPhpInterpreter write SetPhpInterpreter; |
23 | class property SpecialChars: boolean read GetSpecialChars write SetSpecialChars; |
25 | class property SpecialChars: boolean read GetSpecialChars write SetSpecialChars; |
- | 26 | class property DarkTheme: boolean read GetDarkTheme write SetDarkTheme; |
|
24 | end; |
27 | end; |
25 | 28 | ||
26 | implementation |
29 | implementation |
27 | 30 | ||
28 | uses |
31 | uses |
Line 102... | Line 105... | ||
102 | finally |
105 | finally |
103 | reg.Free; |
106 | reg.Free; |
104 | end; |
107 | end; |
105 | end; |
108 | end; |
106 | 109 | ||
- | 110 | class function TFastPHPConfig.GetDarkTheme: boolean; |
|
- | 111 | var |
|
- | 112 | reg: TRegistry; |
|
- | 113 | begin |
|
- | 114 | result := false; |
|
- | 115 | reg := TRegistry.Create; |
|
- | 116 | try |
|
- | 117 | reg.RootKey := HKEY_CURRENT_USER; |
|
- | 118 | if reg.OpenKey('Software\ViaThinkSoft\FastPHP\Editor', false) then |
|
- | 119 | begin |
|
- | 120 | if reg.ValueExists('DarkTheme') then |
|
- | 121 | result := reg.ReadBool('DarkTheme'); |
|
- | 122 | reg.CloseKey; |
|
- | 123 | end; |
|
- | 124 | finally |
|
- | 125 | reg.Free; |
|
- | 126 | end; |
|
- | 127 | end; |
|
- | 128 | ||
107 | class function TFastPHPConfig.GetFontSize: integer; |
129 | class function TFastPHPConfig.GetFontSize: integer; |
108 | var |
130 | var |
109 | reg: TRegistry; |
131 | reg: TRegistry; |
110 | begin |
132 | begin |
111 | result := -1; |
133 | result := -1; |
Line 119... | Line 141... | ||
119 | reg.CloseKey; |
141 | reg.CloseKey; |
120 | end; |
142 | end; |
121 | finally |
143 | finally |
122 | reg.Free; |
144 | reg.Free; |
123 | end; |
145 | end; |
- | 146 | end; |
|
- | 147 | ||
- | 148 | class procedure TFastPHPConfig.SetDarkTheme(const Value: boolean); |
|
- | 149 | var |
|
- | 150 | reg: TRegistry; |
|
- | 151 | begin |
|
- | 152 | reg := TRegistry.Create; |
|
- | 153 | try |
|
- | 154 | reg.RootKey := HKEY_CURRENT_USER; |
|
- | 155 | if reg.OpenKey('Software\ViaThinkSoft\FastPHP\Editor', true) then |
|
- | 156 | begin |
|
- | 157 | reg.WriteBool('DarkTheme', Value); |
|
- | 158 | reg.CloseKey; |
|
- | 159 | end; |
|
- | 160 | finally |
|
- | 161 | reg.Free; |
|
- | 162 | end; |
|
124 | end; |
163 | end; |
125 | 164 | ||
126 | class procedure TFastPHPConfig.SetFontSize(Value: integer); |
165 | class procedure TFastPHPConfig.SetFontSize(Value: integer); |
127 | var |
166 | var |
128 | reg: TRegistry; |
167 | reg: TRegistry; |