FOriginalCaption := Self.Caption;
- {$IFDEF NOMUTEX}
- ShowMessage('\93ñ\8fd\8bN\93®\8b\96\89Â\83o\81[\83W\83\87\83\93\82Å\82·\81B'#13#10 + VersionString);
- {$ELSE}
- FMutex := CreateMutex(nil, true, 'SSTPBottleClient2');
- if GetLastError = ERROR_ALREADY_EXISTS then begin
- Beep;
- ShowMessage('SSTP Bottle Client\82Í\93ñ\8fd\8bN\93®\82Å\82«\82Ü\82¹\82ñ');
- CloseHandle(FMutex);
- Application.Terminate;
- Application.ProcessMessages; //WM_QUIT\82ð\97¬\82·
- Exit;
- end;
- {$ENDIF}
-
UpdateLayout;
mnShowToolBar.Checked := Pref.ShowToolBar;
mnShowConstBar.Checked := Pref.ShowConstBar;
SaveChainRuleList;
BottleChainRuleList.Free;
- {$IFDEF BOTTLEMUTEX}
- if FMutex > 0 then
- CloseHandle(FMutex);
- {$ENDIF}
end;
uses
Forms,
+ Dialogs,
+ Windows,
MainForm in 'MainForm.pas' {frmSender},
BRegExp in 'BRegExp.pas',
BottleDef in 'BottleDef.pas',
StrReplace in 'StrReplace.pas',
RegexUtils in 'RegexUtils.pas',
StrReplaceFrame in 'StrReplaceFrame.pas' {frmStrReplaceFrame: TFrame},
- StrReplaceDialog in 'StrReplaceDialog.pas' {frmStrReplaceDialog};
+ StrReplaceDialog in 'StrReplaceDialog.pas' {frmStrReplaceDialog},
+ ReplacePresetEditor in 'ReplacePresetEditor.pas' {frmReplacePresetEditor: TFrame};
// \8c^\95t\82«\92è\90\94\82ð\95Ï\8dX\82Å\82«\82é\82æ\82¤\82É\82·\82é\83R\83\93\83p\83C\83\89\83I\83v\83V\83\87\83\93
// \88ê\95\94\82Ì\83R\83\93\83|\81[\83l\83\93\83g\82É\82±\82ê\82ª\95K\97v
{$IFEND}
{$ENDIF}
+var
+ Mutex: THandle;
+
begin
- // MemChk;
+ {$IFDEF NOMUTEX}
+ ShowMessage('\93ñ\8fd\8bN\93®\8b\96\89Â\83o\81[\83W\83\87\83\93\82Å\82·\81B'#13#10 + VersionString);
+ {$ELSE}
+ Mutex := CreateMutex(nil, true, 'SSTPBottleClient2');
+ if GetLastError = ERROR_ALREADY_EXISTS then begin
+ ShowMessage('SSTP Bottle Client\82Í\93ñ\8fd\8bN\93®\82Å\82«\82Ü\82¹\82ñ');
+ CloseHandle(Mutex);
+ Exit;
+ end;
+ {$ENDIF}
+
Application.Initialize;
Application.Title := 'SSTP Bottle Client';
Application.ShowMainForm := true;
Application.CreateForm(TfrmLog, frmLog);
Application.CreateForm(TfrmMessageBox, frmMessageBox);
Application.CreateForm(TfrmSurfacePreview, frmSurfacePreview);
- Application.CreateForm(TfrmStrReplaceDialog, frmStrReplaceDialog);
if not Application.Terminated then frmSender.Show;
Application.Run;
+
+ {$IFDEF BOTTLEMUTEX}
+ if Mutex > 0 then
+ CloseHandle(Mutex);
+ {$ENDIF}
+
end.