Rev 103 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 103 | Rev 104 | ||
---|---|---|---|
Line 33... | Line 33... | ||
33 | // - dark theme full screen: doubleclick to desktop pixel "0,0" cannot be used to close the app |
33 | // - dark theme full screen: doubleclick to desktop pixel "0,0" cannot be used to close the app |
34 | 34 | ||
35 | // Future ideas |
35 | // Future ideas |
36 | // - code insight |
36 | // - code insight |
37 | // - verschiedene php versionen? |
37 | // - verschiedene php versionen? |
38 | // - webbrowser1 nur laden, wenn man den tab anw�hlt? |
38 | // - webbrowser1 nur laden, wenn man den tab anwaehlt? |
39 | // - doppelklick auf tab soll diesen schlie�en |
39 | // - doppelklick auf tab soll diesen schliessen |
40 | // - Onlinehelp (www) aufrufen oder CHM datei |
40 | // - Onlinehelp (www) aufrufen oder CHM datei |
41 | // - Let all colors be adjustable |
41 | // - Let all colors be adjustable |
42 | // - code in bildschirmmitte (horizontal)? |
42 | // - code in bildschirmmitte (horizontal)? |
43 | // - search in files of a directory |
43 | // - search in files of a directory |
44 | // - Files in multiple tabs? |
44 | // - Files in multiple tabs? |
Line 1154... | Line 1154... | ||
1154 | SFileAlreadyOpen = 'File "%s" is alrady open!'; |
1154 | SFileAlreadyOpen = 'File "%s" is alrady open!'; |
1155 | begin |
1155 | begin |
1156 | if FormShowRanOnce then exit; // If the theme is changed from normal to dark, OnShow will be called another time |
1156 | if FormShowRanOnce then exit; // If the theme is changed from normal to dark, OnShow will be called another time |
1157 | FormShowRanOnce := true; |
1157 | FormShowRanOnce := true; |
1158 | 1158 | ||
- | 1159 | DoubleBuffered := true; |
|
- | 1160 | ||
1159 | ScrapFile := GetScrapFile; |
1161 | ScrapFile := GetScrapFile; |
1160 | if ScrapFile = '' then |
1162 | if ScrapFile = '' then |
1161 | begin |
1163 | begin |
1162 | Application.Terminate; // Close; |
1164 | Application.Terminate; // Close; |
1163 | exit; |
1165 | exit; |
Line 1174... | Line 1176... | ||
1174 | BtnSpecialChars.Picture.Assign(BtnSpecialCharsOff.Picture); |
1176 | BtnSpecialChars.Picture.Assign(BtnSpecialCharsOff.Picture); |
1175 | Exclude(opts, eoShowSpecialChars); |
1177 | Exclude(opts, eoShowSpecialChars); |
1176 | end; |
1178 | end; |
1177 | SynEdit1.Options := opts; |
1179 | SynEdit1.Options := opts; |
1178 | 1180 | ||
- | 1181 | PageControl1.ActivePage := PlaintextTabSheet; |
|
- | 1182 | ||
- | 1183 | PageControl2.ActivePage := CodeTabsheet; |
|
- | 1184 | HelpTabsheet.TabVisible := false; |
|
- | 1185 | ||
- | 1186 | tmpFontSize := TFastPHPConfig.FontSize; |
|
- | 1187 | if tmpFontSize <> -1 then SynEdit1.Font.Size := tmpFontSize; |
|
- | 1188 | ||
1179 | if FileExists(ScrapFile) then |
1189 | if FileExists(ScrapFile) then |
1180 | begin |
1190 | begin |
1181 | if hMutex = 0 then |
1191 | if hMutex = 0 then |
1182 | begin |
1192 | begin |
1183 | hMutex := CreateMutex(nil, True, PChar('FastPHP'+md5(UpperCase(ScrapFile)))); |
1193 | hMutex := CreateMutex(nil, True, PChar('FastPHP'+md5(UpperCase(ScrapFile)))); // do not translate |
1184 | if GetLastError = ERROR_ALREADY_EXISTS then |
1194 | if GetLastError = ERROR_ALREADY_EXISTS then |
1185 | begin |
1195 | begin |
1186 | // TODO: It would be great if the window of that FastPHP instance would switched to foreground |
1196 | // TODO: It would be great if the window of that FastPHP instance would switched to foreground |
1187 | ShowMessageFmt(SFileAlreadyOpen, [ScrapFile]); |
1197 | ShowMessageFmt(SFileAlreadyOpen, [ScrapFile]); |
- | 1198 | Application.Terminate; // Close; |
|
1188 | Close; |
1199 | exit; |
1189 | end; |
1200 | end; |
1190 | 1201 | ||
1191 | SynEdit1.Lines.LoadFromFile(ScrapFile); |
1202 | SynEdit1.Lines.LoadFromFile(ScrapFile); |
1192 | end; |
1203 | end; |
1193 | end |
1204 | end |
1194 | else |
1205 | else |
1195 | SynEdit1.Lines.Clear; |
1206 | SynEdit1.Lines.Clear; |
1196 | 1207 | ||
1197 | PageControl1.ActivePage := PlaintextTabSheet; |
- | |
1198 | - | ||
1199 | PageControl2.ActivePage := CodeTabsheet; |
- | |
1200 | HelpTabsheet.TabVisible := false; |
- | |
1201 | - | ||
1202 | tmpFontSize := TFastPHPConfig.FontSize; |
- | |
1203 | if tmpFontSize <> -1 then SynEdit1.Font.Size := tmpFontSize; |
- | |
1204 | SynEdit1.SetFocus; |
1208 | SynEdit1.SetFocus; |
1205 | 1209 | ||
1206 | DoubleBuffered := true; |
- | |
1207 | StartCodeExplorer; |
1210 | StartCodeExplorer; |
1208 | 1211 | ||
1209 | DragAcceptFiles(Handle, True); |
1212 | DragAcceptFiles(Handle, True); |
1210 | 1213 | ||
1211 | StartupTimer.Enabled := true; |
1214 | StartupTimer.Enabled := true; |