From: C.Ponapalt Date: Wed, 14 Apr 2004 03:40:09 +0000 (+0000) Subject: 起動時にProxyの有効無効を尋ねるオプションを追加 X-Git-Tag: BOTTLE2-72~16 X-Git-Url: http://git.osdn.net/view?a=commitdiff_plain;h=b5c31b4dcde152197e95f7ced444e7112d435ee1;hp=6d29830b33b7d37c2a858ca4eeb43d9f713ad91b;p=winbottle%2Fwinbottle.git 起動時にProxyの有効無効を尋ねるオプションを追加 サーバ通信系のエラー表示をfrmMessageBox.ShowMessageに切替 --- diff --git a/bottleclient/BottleDef.pas b/bottleclient/BottleDef.pas index cab0f82..1aff740 100755 --- a/bottleclient/BottleDef.pas +++ b/bottleclient/BottleDef.pas @@ -59,6 +59,7 @@ type FLogWindowDividerPos: integer; FHelpPage: String; FUseHttpProxy: boolean; + FAskUseHttpProxy: boolean; FProxyPort: integer; FProxyAddress: String; FConfirmOnExit: boolean; @@ -130,6 +131,7 @@ type procedure SetProxyAddress(const Value: String); procedure SetProxyPort(const Value: integer); procedure SetUseHttpProxy(const Value: boolean); + procedure SetAskUseHttpProxy(const Value: boolean); procedure SetConfirmOnExit(const Value: boolean); procedure SetFixMessySurface(const Value: boolean); procedure SetResetIfGhostAfterSend(const Value: boolean); @@ -235,6 +237,7 @@ type property EditorPreviewWindowPosition: TRect read FEditorPreviewWindowPosition write SetEditorPreviewWindowPosition; //ƒvƒƒLƒVŠÖŒW property UseHttpProxy: boolean read FUseHttpProxy write SetUseHttpProxy; + property AskUseHttpProxy: boolean read FAskUseHttpProxy write SetAskUseHttpProxy; property ProxyAddress: String read FProxyAddress write SetProxyAddress; property ProxyPort: integer read FProxyPort write SetProxyPort; //ÄÚ‘± @@ -651,6 +654,7 @@ begin end; // UseHttpProxy := FIni.ReadBool('System', 'UseHttpProxy', false); + AskUseHttpProxy := FIni.ReadBool('System', 'AskUseHttpProxy', false); ProxyAddress := FIni.ReadString('System', 'ProxyAddress', ''); ProxyPort := FIni.ReadInteger('System', 'ProxyPort', 0); // @@ -892,6 +896,11 @@ begin FUseHttpProxy := Value; end; +procedure TBottlePrefs.SetAskUseHttpProxy(const Value: boolean); +begin + FAskUseHttpProxy := Value; +end; + procedure TBottlePrefs.SetWaitScriptEnd(const Value: integer); begin if Value > 0 then FWaitScriptEnd := Value; @@ -1011,6 +1020,7 @@ begin Format('%d,%d,%d,%d', [Left, Top, Right, Bottom])); // FIni.WriteBool('System', 'UseHttpProxy', UseHttpProxy); + FIni.WriteBool('System', 'AskUseHttpProxy', AskUseHttpProxy); FIni.WriteString('System', 'ProxyAddress', ProxyAddress); FIni.WriteInteger('System', 'ProxyPort', ProxyPort); // diff --git a/bottleclient/MainForm.pas b/bottleclient/MainForm.pas index b00fa73..d885c42 100755 --- a/bottleclient/MainForm.pas +++ b/bottleclient/MainForm.pas @@ -797,7 +797,8 @@ begin try HeadValue := THeadValue.Create(Str); except - ShowMessage('SSTP BottleƒT[ƒo‚ª‰ðÍ‚Å‚«‚È‚¢ƒGƒ‰[‚ð•Ô‚µ‚Ü‚µ‚½B'); + Beep; + frmMessageBox.ShowMessage('SSTP BottleƒT[ƒo‚ª‰ðÍ‚Å‚«‚È‚¢ƒGƒ‰[‚ð•Ô‚µ‚Ü‚µ‚½B'); Exit; end; Command := HeadValue['Command']; @@ -805,11 +806,11 @@ begin if ResStr = 'Err' then begin if HeadValue['ExtraMessage'] <> '' then begin Beep; - ShowMessage('SSTP BottleƒT[ƒo‚ªŽŸ‚̃Gƒ‰[‚ð•Ô‚µ‚Ü‚µ‚½:'#13#10 + + frmMessageBox.ShowMessage('SSTP BottleƒT[ƒo‚ªŽŸ‚̃Gƒ‰[‚ð•Ô‚µ‚Ü‚µ‚½:'#13#10 + HeadValue['ExtraMessage']); end else begin Beep; - ShowMessage('SSTP BottleƒT[ƒo‚ª‰½‚ç‚©‚̃Gƒ‰[‚ð•Ô‚µ‚Ü‚µ‚½B'); + frmMessageBox.ShowMessage('SSTP BottleƒT[ƒo‚ª‰½‚ç‚©‚̃Gƒ‰[‚ð•Ô‚µ‚Ü‚µ‚½B'); end; end; if (Command = 'sendBroadcast') and (ResStr = 'OK') then begin @@ -882,7 +883,7 @@ begin if (Command = 'setChannels') then begin if ResStr <> 'OK' then begin Beep; - ShowMessage('ƒ`ƒƒƒ“ƒlƒ‹Ý’è‚ÉŽ¸”s‚µ‚Ü‚µ‚½B‚à‚¤ˆê“x“o˜^‚µ‚È‚¨‚µ‚Ä‚­‚¾‚³‚¢'); + frmMessageBox.ShowMessage('ƒ`ƒƒƒ“ƒlƒ‹Ý’è‚ÉŽ¸”s‚µ‚Ü‚µ‚½B‚à‚¤ˆê“x“o˜^‚µ‚È‚¨‚µ‚Ä‚­‚¾‚³‚¢'); ShowHintLabel('ƒ`ƒƒƒ“ƒlƒ‹Ý’è‚ÉŽ¸”s‚µ‚Ü‚µ‚½', WarningColor); end; end; @@ -2210,7 +2211,7 @@ begin SysUtils.Beep; Beep; ShowHintLabel('SSTP BottleƒT[ƒo‚Ƃ̐ڑ±‚ÉŽ¸”s‚µ‚Ü‚µ‚½', WarningColor); - ShowMessage('SSTP BottleƒT[ƒo‚Ƃ̐ڑ±‚ÉŽ¸”s‚µ‚Ü‚µ‚½'#13#10 + + frmMessageBox.ShowMessage('SSTP BottleƒT[ƒo‚Ƃ̐ڑ±‚ÉŽ¸”s‚µ‚Ü‚µ‚½'#13#10 + (Sender as THTTPDownloadThread).LastErrorMessage); Connecting := false; end; @@ -3218,11 +3219,11 @@ begin begin Beep; if Pref.UseHttpProxy then - ShowMessage('HTTP Proxy‚ð’Ê‚¶‚ÄSSTP BottleƒT[ƒo‚ɐڑ±‚Å‚«‚Ü‚¹‚ñ‚Å‚µ‚½B'#13#10 + + frmMessageBox.ShowMessage('HTTP Proxy‚ð’Ê‚¶‚ÄSSTP BottleƒT[ƒo‚ɐڑ±‚Å‚«‚Ü‚¹‚ñ‚Å‚µ‚½B'#13#10 + 'ƒlƒbƒgƒ[ƒN‚̏ó‘ԁEProxy‚̏ó‘Ô‚ðŠm”F‚µ‚Ä‚­‚¾‚³‚¢B'#13#10 + '‚ ‚é‚¢‚̓T[ƒo‚ªƒ_ƒEƒ“‚µ‚Ä‚¢‚é‰Â”\«‚ª‚ ‚è‚Ü‚·B') else - ShowMessage('SSTP BottleƒT[ƒo‚ɐڑ±‚Å‚«‚Ü‚¹‚ñ‚Å‚µ‚½B'#13#10 + + frmMessageBox.ShowMessage('SSTP BottleƒT[ƒo‚ɐڑ±‚Å‚«‚Ü‚¹‚ñ‚Å‚µ‚½B'#13#10 + 'ƒlƒbƒgƒ[ƒN‚ÉŒq‚ª‚Á‚Ä‚¢‚é‚©Šm”F‚µ‚Ä‚­‚¾‚³‚¢B'#13#10 + '‚ ‚é‚¢‚̓T[ƒo‚ªƒ_ƒEƒ“‚µ‚Ä‚¢‚é‰Â”\«‚ª‚ ‚è‚Ü‚·B'); end; diff --git a/bottleclient/SettingForm.dfm b/bottleclient/SettingForm.dfm index 7038bfe..e33309d 100755 --- a/bottleclient/SettingForm.dfm +++ b/bottleclient/SettingForm.dfm @@ -1,6 +1,6 @@ object frmSetting: TfrmSetting - Left = 282 - Top = 289 + Left = 447 + Top = 154 Anchors = [akLeft, akTop, akRight, akBottom] BorderStyle = bsDialog Caption = #35373#23450 @@ -36,7 +36,7 @@ object frmSetting: TfrmSetting Top = 32 Width = 440 Height = 291 - ActivePage = tstPresetReplace + ActivePage = tstConnection Anchors = [akLeft, akTop, akRight, akBottom] MultiLine = True TabOrder = 0 @@ -459,9 +459,6 @@ object frmSetting: TfrmSetting Width = 423 Height = 265 TabOrder = 0 - DesignSize = ( - 423 - 265) end end object tstPlayTime: TTabSheet @@ -638,7 +635,7 @@ object frmSetting: TfrmSetting Height = 20 Hint = #20104#28204#12497#12521#12513#12540#12479#12398#12463#12452#12483#12463#35373#23450 Style = csDropDownList - ItemHeight = 12 + ItemHeight = 0 TabOrder = 0 OnChange = cbxPlayTimeProfileChange end @@ -729,7 +726,7 @@ object frmSetting: TfrmSetting TabVisible = False object lblReconnectWait: TLabel Left = 8 - Top = 144 + Top = 168 Width = 156 Height = 12 Caption = #20877#25509#32154#12434#35430#12415#12427#12414#12391#12398#20998#25968'(&R):' @@ -739,12 +736,12 @@ object frmSetting: TfrmSetting Left = 8 Top = 8 Width = 417 - Height = 121 + Height = 145 Caption = 'HTTP Proxy'#35373#23450 TabOrder = 0 object lblProxyAddress: TLabel Left = 16 - Top = 68 + Top = 92 Width = 56 Height = 12 Caption = #12450#12489#12524#12473'(&D)' @@ -752,7 +749,7 @@ object frmSetting: TfrmSetting end object lblProxyPort: TLabel Left = 16 - Top = 92 + Top = 116 Width = 47 Height = 12 Caption = #12509#12540#12488'(&O)' @@ -773,7 +770,7 @@ object frmSetting: TfrmSetting end object edtProxyAddress: TEdit Left = 80 - Top = 64 + Top = 88 Width = 257 Height = 20 Hint = 'Proxy'#12469#12540#12496#12398#12450#12489#12524#12473 @@ -781,7 +778,7 @@ object frmSetting: TfrmSetting end object edtProxyPort: TEdit Left = 80 - Top = 88 + Top = 112 Width = 81 Height = 20 Hint = 'Proxy'#12469#12540#12496#12398#12509#12540#12488#30058#21495 @@ -797,10 +794,19 @@ object frmSetting: TfrmSetting Caption = 'HTTP Proxy'#12434#20351#29992#12377#12427'(&E)' TabOrder = 0 end + object cbxAskUseHttpProxy: TCheckBox + Left = 16 + Top = 64 + Width = 305 + Height = 17 + Hint = 'Windows(IE)'#12395#35373#23450#12373#12428#12390#12356#12427'Proxy'#12434#20351#12387#12390#25509#32154#12375#12414#12377#12290 + Caption = #36215#21205#26178#12395'Proxy'#12434#21033#29992#12377#12427#12363#12393#12358#12363#12383#12378#12397#12427'(&A)' + TabOrder = 3 + end end object spnReconnectWait: TSpinEdit Left = 168 - Top = 140 + Top = 164 Width = 57 Height = 21 Hint = #28961#36890#20449#29366#24907#12391#20877#25509#32154#12434#35430#12415#12427#12414#12391#12398#20998#25968#12290#36890#24120#12399#22793#26356#12377#12427#24517#35201#12399#12394#12356 diff --git a/bottleclient/SettingForm.pas b/bottleclient/SettingForm.pas index 80305f3..bf98de0 100755 --- a/bottleclient/SettingForm.pas +++ b/bottleclient/SettingForm.pas @@ -107,6 +107,7 @@ type btnBrowserLocate: TButton; tstPresetReplace: TTabSheet; ReplacePresetList: TfrmReplacePresetList; + cbxAskUseHttpProxy: TCheckBox; procedure FormClose(Sender: TObject; var Action: TCloseAction); procedure edtProxyPortKeyPress(Sender: TObject; var Key: Char); procedure ctvBottleNodeChecked(Sender: TObject; @@ -231,6 +232,7 @@ begin rgpWhenCtrlReturn.ItemIndex := Ord(Pref.WhenCtrlReturn); // cbxUseHttpProxy.Checked := Pref.UseHttpProxy; + cbxAskUseHttpProxy.Checked := Pref.AskUseHttpProxy; edtProxyAddress.Text := Pref.ProxyAddress; edtProxyPort.Text := IntToStr(Pref.ProxyPort); // @@ -323,6 +325,7 @@ begin Pref.WhenCtrlReturn := TReturnKeyFunction(rgpWhenCtrlReturn.ItemIndex); // Pref.UseHttpProxy := cbxUseHttpProxy.Checked; + Pref.AskUseHttpProxy := cbxAskUseHttpProxy.Checked; Pref.ProxyAddress := edtProxyAddress.Text; Pref.ProxyPort := StrToInt(edtProxyPort.Text); // diff --git a/bottleclient/SstpBottle.dpr b/bottleclient/SstpBottle.dpr index 0fd2d3a..4bff0ad 100755 --- a/bottleclient/SstpBottle.dpr +++ b/bottleclient/SstpBottle.dpr @@ -99,6 +99,16 @@ begin end; {$ENDIF} + if Pref.AskUseHttpProxy then begin + if Application.MessageBox('Proxy‚ð—˜—p‚µ‚Ü‚·‚©H','BottleClient',MB_YESNO) = IDYES then begin + if Length(Pref.ProxyAddress) > 0 then begin + Pref.UseHttpProxy := true; + end; + end else begin + Pref.UseHttpProxy := false; + end; + end; + Application.Initialize; Application.Title := 'SSTP Bottle Client'; Application.ShowMainForm := true;