From f9a6066e146e12d8cba350db9cb150a730b622b9 Mon Sep 17 00:00:00 2001 From: Nekopanda Date: Sat, 25 Apr 2015 16:08:23 +0900 Subject: [PATCH 1/5] =?UTF-8?q?KCRDB=E4=BD=B5=E7=94=A8=E6=99=82=E3=81=AB?= =?UTF-8?q?=E3=82=AD=E3=83=A3=E3=83=97=E3=83=81=E3=83=A3=E3=81=A7=E3=81=8D?= =?UTF-8?q?=E3=81=AA=E3=81=84=E3=81=93=E3=81=A8=E3=81=8C=E3=81=82=E3=82=8B?= =?UTF-8?q?=E3=81=AE=E3=82=92=E4=BF=AE=E6=AD=A3=20=E3=83=96=E3=83=A9?= =?UTF-8?q?=E3=82=A6=E3=82=B6=E3=82=92=E3=82=A6=E3=82=A3=E3=83=B3=E3=83=89?= =?UTF-8?q?=E3=82=A6=E3=82=B5=E3=82=A4=E3=82=BA=E3=81=AB=E5=90=88=E3=82=8F?= =?UTF-8?q?=E3=81=9B=E3=82=8B=E8=A8=AD=E5=AE=9A=E3=82=92=E8=BF=BD=E5=8A=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Browser/Browser.csproj | 3 +- Browser/Dpi.cs | 27 --- Browser/FormBrowser.Designer.cs | 19 ++ Browser/FormBrowser.cs | 179 ++++++++++--------- Browser/Properties/Resources.Designer.cs | 85 ++++++--- Browser/Properties/Resources.resx | 65 ++++++- Browser/ScreenHelper.cs | 39 ---- BrowserLib/IBrowser.cs | 2 +- BrowserLib/IBrowserHost.cs | 6 + ElectronicObserver/Utility/Configuration.cs | 6 + ElectronicObserver/Window/FormBrowserHost.cs | 13 +- 11 files changed, 244 insertions(+), 200 deletions(-) delete mode 100644 Browser/Dpi.cs delete mode 100644 Browser/ScreenHelper.cs diff --git a/Browser/Browser.csproj b/Browser/Browser.csproj index 12f1d025c..0d76cc21e 100644 --- a/Browser/Browser.csproj +++ b/Browser/Browser.csproj @@ -72,7 +72,6 @@ - Form @@ -81,7 +80,6 @@ - FormBrowser.cs @@ -94,6 +92,7 @@ True Resources.resx + True diff --git a/Browser/Dpi.cs b/Browser/Dpi.cs deleted file mode 100644 index 1d0a427e0..000000000 --- a/Browser/Dpi.cs +++ /dev/null @@ -1,27 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; - -namespace Browser { - class Dpi { - public static readonly Dpi Default = new Dpi( 96, 96 ); - - public uint X { get; private set; } - public uint Y { get; private set; } - - public Dpi( uint x, uint y ) { - this.X = x; - this.Y = y; - } - - public double ScaleX { - get { return this.X / (double)Default.X; } - } - - public double ScaleY { - get { return this.Y / (double)Default.Y; } - } - } -} diff --git a/Browser/FormBrowser.Designer.cs b/Browser/FormBrowser.Designer.cs index eac3c1165..0f199faa6 100644 --- a/Browser/FormBrowser.Designer.cs +++ b/Browser/FormBrowser.Designer.cs @@ -63,6 +63,8 @@ private void InitializeComponent() this.ToolMenu_Other_Zoom_250 = new System.Windows.Forms.ToolStripMenuItem(); this.ToolMenu_Other_Zoom_300 = new System.Windows.Forms.ToolStripMenuItem(); this.ToolMenu_Other_Zoom_400 = new System.Windows.Forms.ToolStripMenuItem(); + this.toolStripSeparator14 = new System.Windows.Forms.ToolStripSeparator(); + this.ToolMenu_Other_Zoom_Fit = new System.Windows.Forms.ToolStripMenuItem(); this.toolStripSeparator3 = new System.Windows.Forms.ToolStripSeparator(); this.ToolMenu_Other_Mute = new System.Windows.Forms.ToolStripMenuItem(); this.toolStripSeparator7 = new System.Windows.Forms.ToolStripSeparator(); @@ -246,6 +248,8 @@ private void InitializeComponent() this.ToolMenu_Other_Zoom.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { this.ToolMenu_Other_Zoom_Current, this.toolStripSeparator9, + this.ToolMenu_Other_Zoom_Fit, + this.toolStripSeparator14, this.ToolMenu_Other_Zoom_Decrement, this.ToolMenu_Other_Zoom_Increment, this.toolStripSeparator10, @@ -368,6 +372,19 @@ private void InitializeComponent() this.ToolMenu_Other_Zoom_400.Text = "400%"; this.ToolMenu_Other_Zoom_400.Click += new System.EventHandler(this.ToolMenu_Other_Zoom_Click); // + // toolStripSeparator14 + // + this.toolStripSeparator14.Name = "toolStripSeparator14"; + this.toolStripSeparator14.Size = new System.Drawing.Size(149, 6); + // + // ToolMenu_Other_Zoom_Fit + // + this.ToolMenu_Other_Zoom_Fit.CheckOnClick = true; + this.ToolMenu_Other_Zoom_Fit.Name = "ToolMenu_Other_Zoom_Fit"; + this.ToolMenu_Other_Zoom_Fit.Size = new System.Drawing.Size(152, 22); + this.ToolMenu_Other_Zoom_Fit.Text = "ぴったり"; + this.ToolMenu_Other_Zoom_Fit.Click += new System.EventHandler(this.ToolMenu_Other_Zoom_Fit_Click); + // // toolStripSeparator3 // this.toolStripSeparator3.Name = "toolStripSeparator3"; @@ -554,6 +571,8 @@ private void InitializeComponent() private System.Windows.Forms.ToolStripSeparator toolStripSeparator13; private System.Windows.Forms.ContextMenuStrip ContextMenuTool; private System.Windows.Forms.ToolStripMenuItem ContextMenuTool_ShowToolMenu; + private System.Windows.Forms.ToolStripSeparator toolStripSeparator14; + private System.Windows.Forms.ToolStripMenuItem ToolMenu_Other_Zoom_Fit; } } diff --git a/Browser/FormBrowser.cs b/Browser/FormBrowser.cs index 290acdcbd..54fd1a7e5 100644 --- a/Browser/FormBrowser.cs +++ b/Browser/FormBrowser.cs @@ -8,6 +8,7 @@ using System.Drawing; using System.Drawing.Imaging; using System.Linq; +using System.Reflection; using System.Runtime.InteropServices; using System.ServiceModel; using System.Text; @@ -136,6 +137,7 @@ public void ConfigurationChanged( BrowserLib.BrowserConfiguration conf ) { Configuration = conf; SizeAdjuster.AutoScroll = Configuration.IsScrollable; + ToolMenu_Other_Zoom_Fit.Checked = Configuration.ZoomFit; ApplyZoom(); ToolMenu_Other_AppliesStyleSheet.Checked = Configuration.AppliesStyleSheet; ToolMenu.Dock = (DockStyle)Configuration.ToolMenuDockStyle; @@ -178,8 +180,7 @@ private void SizeAdjuster_SizeChanged( object sender, EventArgs e ) { Browser.Location.X, Browser.Location.Y, Browser.Width, Browser.Height, SizeAdjuster.Width, SizeAdjuster.Height, ClientSize.Width, ClientSize.Height ) ); //*/ - //スタイルシート適用時はセンタリング - CenteringBrowser(); + ApplyZoom(); } private void CenteringBrowser() { @@ -225,27 +226,21 @@ public void ApplyStyleSheet() { var document = Browser.Document; if ( document == null ) return; - var gameframe = document.GetElementById( "game_frame" ); - if ( gameframe == null ) { - if ( document.Url.AbsolutePath.Contains( ".swf?" ) ) - gameframe = document.Body; - } - - if ( gameframe == null ) return; - - - var target = gameframe.Document; - - if ( target != null ) { - mshtml.IHTMLStyleSheet ss = ( (mshtml.IHTMLDocument2)target.DomDocument ).createStyleSheet( "", 0 ); + if ( document.Url.AbsolutePath.Contains( ".swf?" ) ) { - ss.cssText = Configuration.StyleSheet; + document.Body.SetAttribute( "width", "100%" ); + document.Body.SetAttribute( "height", "100%" ); + } else { + var swf = getFrameElementById( document, "externalswf" ); + if ( swf == null ) return; - StyleSheetApplied = true; + // InvokeScriptは関数しか呼べないようなので、スクリプトをevalで渡す + document.InvokeScript( "eval", new object[] { Properties.Resources.PageScript } ); + swf.Document.InvokeScript( "eval", new object[] { Properties.Resources.FrameScript } ); } - - + + StyleSheetApplied = true; } catch ( Exception ex ) { @@ -274,43 +269,43 @@ public void RefreshBrowser() { /// ズームを適用します。 /// public void ApplyZoom() { - ApplyZoom( Configuration.ZoomRate ); - } - - /// - /// ズームを適用します。 - /// - /// 拡大率。%指定で 10-1000 - public void ApplyZoom( int zoomRate ) { + int zoomRate = Configuration.ZoomRate; + bool fit = Configuration.ZoomFit; try { - - if ( zoomRate < 10 ) - zoomRate = 10; - if ( zoomRate > 1000 ) - zoomRate = 1000; - var wb = Browser.ActiveXInstance as SHDocVw.IWebBrowser2; if ( wb == null || wb.ReadyState == SHDocVw.tagREADYSTATE.READYSTATE_UNINITIALIZED || wb.Busy ) return; - var dpi = ScreenHelper.GetSystemDpi(); - var zoomFactor = dpi.ScaleX + ( zoomRate / 100.0 - 1.0 ); - var percentage = (int)( zoomFactor * 100 ); + double zoomFactor; + + if ( fit ) { + double rateX = (double)SizeAdjuster.Width / KanColleSize.Width; + double rateY = (double)SizeAdjuster.Height / KanColleSize.Height; + zoomFactor = Math.Min( rateX, rateY ); - object pin = percentage; - object pout = null; + } else { + if ( zoomRate < 10 ) + zoomRate = 10; + if ( zoomRate > 1000 ) + zoomRate = 1000; - wb.ExecWB( SHDocVw.OLECMDID.OLECMDID_OPTICAL_ZOOM, SHDocVw.OLECMDEXECOPT.OLECMDEXECOPT_DODEFAULT, ref pin, ref pout ); + zoomFactor = zoomRate / 100.0; + } if ( StyleSheetApplied ) { Browser.Size = Browser.MinimumSize = new Size( - (int)( KanColleSize.Width * ( zoomFactor / dpi.ScaleX ) ), - (int)( KanColleSize.Height * ( zoomFactor / dpi.ScaleY ) ) + (int)( KanColleSize.Width * zoomFactor ), + (int)( KanColleSize.Height * zoomFactor ) ); CenteringBrowser(); } - ToolMenu_Other_Zoom_Current.Text = string.Format( "現在: {0}%", zoomRate ); + if ( fit ) { + ToolMenu_Other_Zoom_Current.Text = string.Format( "現在: ぴったり" ); + } else { + ToolMenu_Other_Zoom_Current.Text = string.Format( "現在: {0}%", zoomRate ); + } + } catch ( Exception ex ) { AddLog( 3, "ズームの適用に失敗しました。" + ex.Message ); @@ -354,6 +349,33 @@ public void SaveScreenShot( string folderPath, int screenShotFormat ) { } + // ラッパークラスに戻す + private static HtmlDocument WrapHTMLDocument( IHTMLDocument2 document ) { + ConstructorInfo[] constructor = typeof( HtmlDocument ).GetConstructors( + BindingFlags.NonPublic | BindingFlags.Instance ); + return (HtmlDocument)constructor[0].Invoke( new object[] { null, document } ); + } + + // 中のフレームからidにマッチする要素を返す + private static HtmlElement getFrameElementById( HtmlDocument document, String id ) { + foreach (HtmlWindow frame in document.Window.Frames) { + + // frameが別ドメインだとセキュリティ上の問題(クロスフレームスクリプティング) + // からアクセスができないのでアクセスできるドキュメントに変換する + IServiceProvider provider = (IServiceProvider)frame.DomWindow; + object ppvobj; + provider.QueryService( typeof( SHDocVw.IWebBrowserApp ).GUID, typeof( SHDocVw.IWebBrowser2 ).GUID, out ppvobj ); + var htmlDocument = WrapHTMLDocument( (IHTMLDocument2)((SHDocVw.IWebBrowser2)ppvobj).Document ); + var htmlElement = htmlDocument.GetElementById( id ); + if ( htmlElement == null ) + continue; + + return htmlElement; + } + + return null; + } + /// /// スクリーンショットを保存します。 @@ -378,7 +400,7 @@ private void SaveScreenShot( string path, System.Drawing.Imaging.ImageFormat for IViewObject viewobj = null; - int width = 0, height = 0; + //int width = 0, height = 0; if ( document.url.Contains( ".swf?" ) ) { @@ -388,67 +410,37 @@ private void SaveScreenShot( string path, System.Drawing.Imaging.ImageFormat for throw new InvalidOperationException( "embed 要素の取得に失敗しました。" ); } - width = ( (HTMLEmbed)viewobj ).clientWidth; - height = ( (HTMLEmbed)viewobj ).clientHeight; + //width = ( (HTMLEmbed)viewobj ).clientWidth; + //height = ( (HTMLEmbed)viewobj ).clientHeight; } else { - var gameFrame = document.getElementById( "game_frame" ).document as HTMLDocument; - if ( gameFrame == null ) { - throw new InvalidOperationException( "game_frame 要素の取得に失敗しました。" ); + var swf = getFrameElementById( wb.Document, "externalswf" ); + if ( swf == null ) { + throw new InvalidOperationException( "対象の swf が見つかりませんでした。" ); } - bool foundflag = false; - - for ( int i = 0; i < document.frames.length; i++ ) { - - var provider = document.frames.item( i ) as IServiceProvider; - if ( provider == null ) continue; - - object ppvobj; - provider.QueryService( typeof( SHDocVw.IWebBrowserApp ).GUID, typeof( SHDocVw.IWebBrowser2 ).GUID, out ppvobj ); - - var _wb = ppvobj as SHDocVw.IWebBrowser2; - if ( _wb == null ) continue; - - var iframe = _wb.Document as HTMLDocument; - if ( iframe == null ) continue; - + Func isvalid = target => { - var swf = iframe.getElementById( "externalswf" ); - if ( swf == null ) continue; + if ( target == null ) return false; + viewobj = target as IViewObject; + if ( viewobj == null ) return false; + //if ( !int.TryParse( target.width, out width ) ) return false; + //if ( !int.TryParse( target.height, out height ) ) return false; + return true; + }; - Func isvalid = target => { - - if ( target == null ) return false; - viewobj = target as IViewObject; - if ( viewobj == null ) return false; - if ( !int.TryParse( target.width, out width ) ) return false; - if ( !int.TryParse( target.height, out height ) ) return false; - return true; - }; - - if ( !isvalid( swf as HTMLEmbed ) && !isvalid( swf as HTMLObjectElement ) ) - continue; - - foundflag = true; - - break; - } - - - if ( !foundflag ) { + if ( !isvalid( swf.DomElement as HTMLEmbed ) && !isvalid( swf.DomElement as HTMLObjectElement ) ) { throw new InvalidOperationException( "対象の swf が見つかりませんでした。" ); } } if ( viewobj != null ) { + var rect = new RECT { left = 0, top = 0, width = KanColleSize.Width, height = KanColleSize.Height }; - using ( var image = new Bitmap( width, height, System.Drawing.Imaging.PixelFormat.Format24bppRgb ) ) { - + using ( var image = new Bitmap( rect.width, rect.height, System.Drawing.Imaging.PixelFormat.Format24bppRgb ) ) { - var rect = new RECT { left = 0, top = 0, width = width, height = height }; var device = new DVTARGETDEVICE { tdSize = 0 }; using ( var g = Graphics.FromImage( image ) ) { @@ -556,12 +548,14 @@ private void ToolMenu_Other_ScreenShot_Click( object sender, EventArgs e ) { private void ToolMenu_Other_Zoom_Decrement_Click( object sender, EventArgs e ) { Configuration.ZoomRate = Math.Max( Configuration.ZoomRate - 20, 10 ); + Configuration.ZoomFit = ToolMenu_Other_Zoom_Fit.Checked = false; ApplyZoom(); ConfigurationUpdated(); } private void ToolMenu_Other_Zoom_Increment_Click( object sender, EventArgs e ) { Configuration.ZoomRate = Math.Min( Configuration.ZoomRate + 20, 1000 ); + Configuration.ZoomFit = ToolMenu_Other_Zoom_Fit.Checked = false; ApplyZoom(); ConfigurationUpdated(); } @@ -592,6 +586,13 @@ private void ToolMenu_Other_Zoom_Click( object sender, EventArgs e ) { zoom = 100; Configuration.ZoomRate = zoom; + Configuration.ZoomFit = ToolMenu_Other_Zoom_Fit.Checked = false; + ApplyZoom(); + ConfigurationUpdated(); + } + + private void ToolMenu_Other_Zoom_Fit_Click( object sender, EventArgs e ) { + Configuration.ZoomFit = ToolMenu_Other_Zoom_Fit.Checked; ApplyZoom(); ConfigurationUpdated(); } diff --git a/Browser/Properties/Resources.Designer.cs b/Browser/Properties/Resources.Designer.cs index c20709970..cd45e6db2 100644 --- a/Browser/Properties/Resources.Designer.cs +++ b/Browser/Properties/Resources.Designer.cs @@ -4,14 +4,14 @@ // ランタイム バージョン:4.0.30319.34014 // // このファイルへの変更は、以下の状況下で不正な動作の原因になったり、 -// コードが再生成されるときに損失したりします +// コードが再生成されるときに損失したりします。 // //------------------------------------------------------------------------------ -namespace Browser.Properties -{ - - +namespace Browser.Properties { + using System; + + /// /// ローカライズされた文字列などを検索するための、厳密に型指定されたリソース クラスです。 /// @@ -22,50 +22,81 @@ namespace Browser.Properties [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] - internal class Resources - { - + internal class Resources { + private static global::System.Resources.ResourceManager resourceMan; - + private static global::System.Globalization.CultureInfo resourceCulture; - + [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] - internal Resources() - { + internal Resources() { } - + /// - /// このクラスに使用される、キャッシュされた ResourceManager のインスタンスを返します。 + /// このクラスで使用されているキャッシュされた ResourceManager インスタンスを返します。 /// [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] - internal static global::System.Resources.ResourceManager ResourceManager - { - get - { - if ((resourceMan == null)) - { + internal static global::System.Resources.ResourceManager ResourceManager { + get { + if (object.ReferenceEquals(resourceMan, null)) { global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("Browser.Properties.Resources", typeof(Resources).Assembly); resourceMan = temp; } return resourceMan; } } - + /// /// 厳密に型指定されたこのリソース クラスを使用して、すべての検索リソースに対し、 /// 現在のスレッドの CurrentUICulture プロパティをオーバーライドします。 /// [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] - internal static global::System.Globalization.CultureInfo Culture - { - get - { + internal static global::System.Globalization.CultureInfo Culture { + get { return resourceCulture; } - set - { + set { resourceCulture = value; } } + + /// + /// // KCRDBと競合しないように同じように処理 + ///try { + /// var hideStyle = {width:"0px",height:"0px",visibility:"hidden",display:"none"}; + /// var fillStyle = {margin:"0px",padding:"0px",position:"fixed",left:"0px",top:"0px",width:"100%",height:"100%",overflow:"hidden"}; + /// var jqBody=document.body; + /// $(jqBody).css("zoom","normal"); + /// $(jqBody).css({margin:"0px",padding:"0px",overflow:"hidden"}); + /// $("#spacing_top").css(hideStyle); + /// $("#adFlashWrap").css(fillStyle); + /// $("#wsFlashWrap").css(fillStyle); + /// $("#flashWrap").css(fillStyle); [残りの文字列は切り詰められました]"; に類似しているローカライズされた文字列を検索します。 + /// + internal static string FrameScript { + get { + return ResourceManager.GetString("FrameScript", resourceCulture); + } + } + + /// + /// // KCRDBと競合しないように同じように処理 + ///try { + /// var hideStyle = {width:"0px",height:"0px",visibility:"hidden",display:"none"}; + /// var fillStyle = {margin:"0px",padding:"0px",position:"fixed",left:"0px",top:"0px",width:"100%",height:"100%",overflow:"hidden"}; + /// $(document.body).css({margin:"0px",padding:"0px",overflow:"hidden"}); + /// $("img").css(hideStyle); + /// $("#dmm_ntgnavi").css(hideStyle); + /// $("#w").css(fillStyle); + /// $("#main-ntg").css(fillStyle); + /// $("#page").css(fillStyle); + /// $("#area-game").css(fillStyle); + /// var jqGam [残りの文字列は切り詰められました]"; に類似しているローカライズされた文字列を検索します。 + /// + internal static string PageScript { + get { + return ResourceManager.GetString("PageScript", resourceCulture); + } + } } } diff --git a/Browser/Properties/Resources.resx b/Browser/Properties/Resources.resx index af7dbebba..c50230451 100644 --- a/Browser/Properties/Resources.resx +++ b/Browser/Properties/Resources.resx @@ -46,7 +46,7 @@ mimetype: application/x-microsoft.net.object.binary.base64 value : The object must be serialized with - : System.Serialization.Formatters.Binary.BinaryFormatter + : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter : and then encoded with base64 encoding. mimetype: application/x-microsoft.net.object.soap.base64 @@ -60,6 +60,7 @@ : and then encoded with base64 encoding. --> + @@ -68,9 +69,10 @@ - + + @@ -85,9 +87,10 @@ - + + @@ -109,9 +112,61 @@ 2.0 - System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + // KCRDBと競合しないように同じように処理 +try { + var hideStyle = {width:"0px",height:"0px",visibility:"hidden",display:"none"}; + var fillStyle = {margin:"0px",padding:"0px",position:"fixed",left:"0px",top:"0px",width:"100%",height:"100%",overflow:"hidden"}; + var jqBody=document.body; + $(jqBody).css("zoom","normal"); + $(jqBody).css({margin:"0px",padding:"0px",overflow:"hidden"}); + $("#spacing_top").css(hideStyle); + $("#adFlashWrap").css(fillStyle); + $("#wsFlashWrap").css(fillStyle); + $("#flashWrap").css(fillStyle); + var elmExternalSwf=document.getElementById("externalswf"); + if(elmExternalSwf != null) { + elmExternalSwf.setAttribute("width","100%"); + elmExternalSwf.setAttribute("height","100%"); + } + $("#sectionWrap").css(hideStyle); + $("#globalNavi").css(hideStyle); + $(".rollover").css(hideStyle); + $("img").css(hideStyle); + $(".badge").css(hideStyle); + $("#contentsWrap").css(hideStyle); +} +catch(e) { + alert("フレームCSS適用に失敗しました: "+e); +} + + + // KCRDBと競合しないように同じように処理 +try { + var hideStyle = {width:"0px",height:"0px",visibility:"hidden",display:"none"}; + var fillStyle = {margin:"0px",padding:"0px",position:"fixed",left:"0px",top:"0px",width:"100%",height:"100%",overflow:"hidden"}; + $(document.body).css({margin:"0px",padding:"0px",overflow:"hidden"}); + $("img").css(hideStyle); + $("#dmm_ntgnavi").css(hideStyle); + $("#w").css(fillStyle); + $("#main-ntg").css(fillStyle); + $("#page").css(fillStyle); + $("#area-game").css(fillStyle); + var jqGameFrame=$("#game_frame"); + jqGameFrame.css(fillStyle); + jqGameFrame.attr("scrolling","no"); + jqGameFrame.attr("width","100%"); + jqGameFrame.attr("height","100%"); + $("[class^=area-naviapp]").css(hideStyle); + $("#foot").css(hideStyle); +} +catch(e) { + alert("ページCSS適用に失敗しました: "+e); +} + \ No newline at end of file diff --git a/Browser/ScreenHelper.cs b/Browser/ScreenHelper.cs deleted file mode 100644 index 3d89f955a..000000000 --- a/Browser/ScreenHelper.cs +++ /dev/null @@ -1,39 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Runtime.InteropServices; -using System.Text; -using System.Threading.Tasks; - -namespace Browser { - static class ScreenHelper { - - [DllImport( "user32.dll" )] - static extern IntPtr GetDC( IntPtr ptr ); - [DllImport( "user32.dll" )] - static extern IntPtr ReleaseDC( IntPtr hWnd, IntPtr hDc ); - [DllImport( "gdi32.dll" )] - static extern uint GetDeviceCaps( - IntPtr hdc, // handle to DC - int nIndex // index of capability - ); - [DllImport( "user32.dll" )] - static extern bool SetProcessDPIAware(); - - const int LOGPIXELSX = 88; - const int LOGPIXELSY = 90; - - static Dpi _dpi; - public static Dpi GetSystemDpi() { - if ( _dpi == null ) { - SetProcessDPIAware(); //重要 - IntPtr screenDC = GetDC( IntPtr.Zero ); - uint dpi_x = GetDeviceCaps( screenDC, LOGPIXELSX ); - uint dpi_y = GetDeviceCaps( screenDC, LOGPIXELSY ); - _dpi = new Dpi( dpi_x, dpi_y ); - ReleaseDC( IntPtr.Zero, screenDC ); - } - return _dpi; - } - } -} diff --git a/BrowserLib/IBrowser.cs b/BrowserLib/IBrowser.cs index f8254a2a3..621e3d422 100644 --- a/BrowserLib/IBrowser.cs +++ b/BrowserLib/IBrowser.cs @@ -25,7 +25,7 @@ public interface IBrowser { void RefreshBrowser(); [OperationContract] - void ApplyZoom( int zoomRate ); + void ApplyZoom(); [OperationContract] void Navigate( string url ); diff --git a/BrowserLib/IBrowserHost.cs b/BrowserLib/IBrowserHost.cs index 841991831..7c1b3d39f 100644 --- a/BrowserLib/IBrowserHost.cs +++ b/BrowserLib/IBrowserHost.cs @@ -72,6 +72,12 @@ public class BrowserConfiguration { [DataMember] public int ZoomRate { get; set; } + /// + /// ブラウザをウィンドウサイズに合わせる + /// + [DataMember] + public bool ZoomFit { get; set; } + /// /// ログインページのURL /// diff --git a/ElectronicObserver/Utility/Configuration.cs b/ElectronicObserver/Utility/Configuration.cs index 9206ac6e8..bd21e4070 100644 --- a/ElectronicObserver/Utility/Configuration.cs +++ b/ElectronicObserver/Utility/Configuration.cs @@ -479,6 +479,12 @@ public class ConfigFormBrowser : ConfigPartBase { /// public int ZoomRate { get; set; } + /// + /// ブラウザをウィンドウサイズに合わせる + /// + [DataMember] + public bool ZoomFit { get; set; } + /// /// ログインページのURL /// diff --git a/ElectronicObserver/Window/FormBrowserHost.cs b/ElectronicObserver/Window/FormBrowserHost.cs index 156a32ff4..ac9e4406d 100644 --- a/ElectronicObserver/Window/FormBrowserHost.cs +++ b/ElectronicObserver/Window/FormBrowserHost.cs @@ -134,16 +134,7 @@ public void RefreshBrowser() { /// ズームを適用します。 /// public void ApplyZoom() { - ApplyZoom( Utility.Configuration.Config.FormBrowser.ZoomRate ); - } - - - /// - /// ズームを適用します。 - /// - /// 拡大率。%指定で 10-1000 - public void ApplyZoom( int zoomRate ) { - Browser.AsyncRemoteRun( () => Browser.Proxy.ApplyZoom( zoomRate ) ); + Browser.AsyncRemoteRun( () => Browser.Proxy.ApplyZoom() ); } /// @@ -178,6 +169,7 @@ public BrowserLib.BrowserConfiguration Configuration { var c = Utility.Configuration.Config.FormBrowser; config.ZoomRate = c.ZoomRate; + config.ZoomFit = c.ZoomFit; config.LogInPageURL = c.LogInPageURL; config.IsEnabled = c.IsEnabled; config.ScreenShotPath = c.ScreenShotPath; @@ -198,6 +190,7 @@ public void ConfigurationUpdated( BrowserLib.BrowserConfiguration config ) { var c = Utility.Configuration.Config.FormBrowser; c.ZoomRate = config.ZoomRate; + c.ZoomFit = config.ZoomFit; c.LogInPageURL = config.LogInPageURL; c.IsEnabled = config.IsEnabled; c.ScreenShotPath = config.ScreenShotPath; From 663fcd656a12276e14e6798f7e5cad5081cd6779 Mon Sep 17 00:00:00 2001 From: Nekopanda Date: Mon, 27 Apr 2015 01:03:42 +0900 Subject: [PATCH 2/5] =?UTF-8?q?=E3=82=B9=E3=82=BF=E3=82=A4=E3=83=AB?= =?UTF-8?q?=E3=82=B7=E3=83=BC=E3=83=88=E3=82=92=E9=81=A9=E7=94=A8=E3=81=97?= =?UTF-8?q?=E3=81=A6=E3=81=84=E3=81=AA=E3=81=84=E3=81=A8=E3=81=8D=E3=81=AB?= =?UTF-8?q?=E3=82=BA=E3=83=BC=E3=83=A0=E3=81=8C=E9=81=A9=E7=94=A8=E3=81=95?= =?UTF-8?q?=E3=82=8C=E3=81=A6=E3=81=84=E3=81=AA=E3=81=8B=E3=81=A3=E3=81=9F?= =?UTF-8?q?=E3=81=AE=E3=82=92=E4=BF=AE=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Browser/FormBrowser.cs | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/Browser/FormBrowser.cs b/Browser/FormBrowser.cs index 54fd1a7e5..126106633 100644 --- a/Browser/FormBrowser.cs +++ b/Browser/FormBrowser.cs @@ -270,28 +270,33 @@ public void RefreshBrowser() { /// public void ApplyZoom() { int zoomRate = Configuration.ZoomRate; - bool fit = Configuration.ZoomFit; + bool fit = Configuration.ZoomFit && StyleSheetApplied; try { var wb = Browser.ActiveXInstance as SHDocVw.IWebBrowser2; if ( wb == null || wb.ReadyState == SHDocVw.tagREADYSTATE.READYSTATE_UNINITIALIZED || wb.Busy ) return; double zoomFactor; + object pin; if ( fit ) { + pin = 100; double rateX = (double)SizeAdjuster.Width / KanColleSize.Width; double rateY = (double)SizeAdjuster.Height / KanColleSize.Height; zoomFactor = Math.Min( rateX, rateY ); - } else { if ( zoomRate < 10 ) zoomRate = 10; if ( zoomRate > 1000 ) zoomRate = 1000; + pin = zoomRate; zoomFactor = zoomRate / 100.0; } + object pout = null; + wb.ExecWB( SHDocVw.OLECMDID.OLECMDID_OPTICAL_ZOOM, SHDocVw.OLECMDEXECOPT.OLECMDEXECOPT_DODEFAULT, ref pin, ref pout ); + if ( StyleSheetApplied ) { Browser.Size = Browser.MinimumSize = new Size( (int)( KanColleSize.Width * zoomFactor ), From 7490aba728f23817067f0bcd1bfd93aee9f6c66d Mon Sep 17 00:00:00 2001 From: andanteyk Date: Mon, 27 Apr 2015 10:59:02 +0900 Subject: [PATCH 3/5] =?UTF-8?q?=E3=83=95=E3=82=A9=E3=83=BC=E3=83=9E?= =?UTF-8?q?=E3=83=83=E3=83=88=E3=83=BB=E8=A8=AD=E5=AE=9A=E3=81=AE=E8=BF=BD?= =?UTF-8?q?=E5=8A=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Browser/FormBrowser.cs | 8 +-- ElectronicObserver/Utility/Configuration.cs | 1 + .../Dialog/DialogConfiguration.Designer.cs | 70 +++++++++++-------- .../Window/Dialog/DialogConfiguration.cs | 8 ++- .../Window/Dialog/DialogConfiguration.resx | 3 + ElectronicObserver/Window/FormBrowserHost.cs | 6 +- 6 files changed, 58 insertions(+), 38 deletions(-) diff --git a/Browser/FormBrowser.cs b/Browser/FormBrowser.cs index 126106633..2fd198f33 100644 --- a/Browser/FormBrowser.cs +++ b/Browser/FormBrowser.cs @@ -239,7 +239,7 @@ public void ApplyStyleSheet() { document.InvokeScript( "eval", new object[] { Properties.Resources.PageScript } ); swf.Document.InvokeScript( "eval", new object[] { Properties.Resources.FrameScript } ); } - + StyleSheetApplied = true; } catch ( Exception ex ) { @@ -363,14 +363,14 @@ private static HtmlDocument WrapHTMLDocument( IHTMLDocument2 document ) { // 中のフレームからidにマッチする要素を返す private static HtmlElement getFrameElementById( HtmlDocument document, String id ) { - foreach (HtmlWindow frame in document.Window.Frames) { + foreach ( HtmlWindow frame in document.Window.Frames ) { // frameが別ドメインだとセキュリティ上の問題(クロスフレームスクリプティング) // からアクセスができないのでアクセスできるドキュメントに変換する IServiceProvider provider = (IServiceProvider)frame.DomWindow; object ppvobj; provider.QueryService( typeof( SHDocVw.IWebBrowserApp ).GUID, typeof( SHDocVw.IWebBrowser2 ).GUID, out ppvobj ); - var htmlDocument = WrapHTMLDocument( (IHTMLDocument2)((SHDocVw.IWebBrowser2)ppvobj).Document ); + var htmlDocument = WrapHTMLDocument( (IHTMLDocument2)( (SHDocVw.IWebBrowser2)ppvobj ).Document ); var htmlElement = htmlDocument.GetElementById( id ); if ( htmlElement == null ) continue; @@ -379,7 +379,7 @@ private static HtmlElement getFrameElementById( HtmlDocument document, String id } return null; - } + } /// diff --git a/ElectronicObserver/Utility/Configuration.cs b/ElectronicObserver/Utility/Configuration.cs index bd21e4070..4d5579820 100644 --- a/ElectronicObserver/Utility/Configuration.cs +++ b/ElectronicObserver/Utility/Configuration.cs @@ -539,6 +539,7 @@ public class ConfigFormBrowser : ConfigPartBase { public ConfigFormBrowser() { ZoomRate = 100; + ZoomFit = false; LogInPageURL = @"http://www.dmm.com/netgame_s/kancolle/"; IsEnabled = true; ScreenShotPath = "ScreenShot"; diff --git a/ElectronicObserver/Window/Dialog/DialogConfiguration.Designer.cs b/ElectronicObserver/Window/Dialog/DialogConfiguration.Designer.cs index 2d6e310c3..8c5fdb302 100644 --- a/ElectronicObserver/Window/Dialog/DialogConfiguration.Designer.cs +++ b/ElectronicObserver/Window/Dialog/DialogConfiguration.Designer.cs @@ -74,6 +74,7 @@ private void InitializeComponent() { this.Debug_APIListPathSearch = new System.Windows.Forms.Button(); this.Debug_EnableDebugMenu = new System.Windows.Forms.CheckBox(); this.tabPage6 = new System.Windows.Forms.TabPage(); + this.Life_ShowStatusBar = new System.Windows.Forms.CheckBox(); this.Life_CheckUpdateInformation = new System.Windows.Forms.CheckBox(); this.Life_LayoutFilePathSearch = new System.Windows.Forms.Button(); this.Life_LayoutFilePath = new System.Windows.Forms.TextBox(); @@ -137,7 +138,7 @@ private void InitializeComponent() { this.FontSelector = new System.Windows.Forms.FontDialog(); this.LayoutFileBrowser = new System.Windows.Forms.OpenFileDialog(); this.APIListBrowser = new System.Windows.Forms.OpenFileDialog(); - this.Life_ShowStatusBar = new System.Windows.Forms.CheckBox(); + this.FormBrowser_ZoomFit = new System.Windows.Forms.CheckBox(); this.tabControl1.SuspendLayout(); this.tabPage1.SuspendLayout(); ((System.ComponentModel.ISupportInitialize)(this.Connection_UpstreamProxyPort)).BeginInit(); @@ -758,6 +759,16 @@ private void InitializeComponent() { this.tabPage6.Text = "ウィンドウ"; this.tabPage6.UseVisualStyleBackColor = true; // + // Life_ShowStatusBar + // + this.Life_ShowStatusBar.AutoSize = true; + this.Life_ShowStatusBar.Location = new System.Drawing.Point(11, 110); + this.Life_ShowStatusBar.Name = "Life_ShowStatusBar"; + this.Life_ShowStatusBar.Size = new System.Drawing.Size(143, 19); + this.Life_ShowStatusBar.TabIndex = 6; + this.Life_ShowStatusBar.Text = "ステータスバーを表示する"; + this.Life_ShowStatusBar.UseVisualStyleBackColor = true; + // // Life_CheckUpdateInformation // this.Life_CheckUpdateInformation.AutoSize = true; @@ -1067,6 +1078,7 @@ private void InitializeComponent() { // // tabPage12 // + this.tabPage12.Controls.Add(this.FormBrowser_ZoomFit); this.tabPage12.Controls.Add(this.groupBox3); this.tabPage12.Controls.Add(this.FormBrowser_AppliesStyleSheet); this.tabPage12.Controls.Add(this.FormBrowser_ConfirmAtRefresh); @@ -1077,10 +1089,10 @@ private void InitializeComponent() { this.tabPage12.Controls.Add(this.FormBrowser_LogInPageURL); this.tabPage12.Controls.Add(this.FormBrowser_ZoomRate); this.tabPage12.Controls.Add(this.label15); - this.tabPage12.Location = new System.Drawing.Point(4, 22); + this.tabPage12.Location = new System.Drawing.Point(4, 24); this.tabPage12.Name = "tabPage12"; this.tabPage12.Padding = new System.Windows.Forms.Padding(3); - this.tabPage12.Size = new System.Drawing.Size(442, 221); + this.tabPage12.Size = new System.Drawing.Size(442, 219); this.tabPage12.TabIndex = 3; this.tabPage12.Text = "ブラウザ"; this.tabPage12.UseVisualStyleBackColor = true; @@ -1095,7 +1107,7 @@ private void InitializeComponent() { this.groupBox3.Location = new System.Drawing.Point(6, 165); this.groupBox3.Name = "groupBox3"; this.groupBox3.Size = new System.Drawing.Size(430, 46); - this.groupBox3.TabIndex = 5; + this.groupBox3.TabIndex = 10; this.groupBox3.TabStop = false; this.groupBox3.Text = "レジストリ"; // @@ -1115,7 +1127,7 @@ private void InitializeComponent() { this.FormBrowser_BrowserVersion.Location = new System.Drawing.Point(112, 16); this.FormBrowser_BrowserVersion.Name = "FormBrowser_BrowserVersion"; this.FormBrowser_BrowserVersion.Size = new System.Drawing.Size(60, 23); - this.FormBrowser_BrowserVersion.TabIndex = 9; + this.FormBrowser_BrowserVersion.TabIndex = 1; this.FormBrowser_BrowserVersion.Text = "7000"; this.ToolTipInfo.SetToolTip(this.FormBrowser_BrowserVersion, "内蔵ブラウザのバージョンを指定します。\r\n7000がIE7相当、8000がIE8相当、11000がIE11相当です。\r\nバージョンによって動作が変わる可能性があり" + "ます。"); @@ -1126,7 +1138,7 @@ private void InitializeComponent() { this.FormBrowser_DeleteRegistry.Location = new System.Drawing.Point(374, 15); this.FormBrowser_DeleteRegistry.Name = "FormBrowser_DeleteRegistry"; this.FormBrowser_DeleteRegistry.Size = new System.Drawing.Size(50, 23); - this.FormBrowser_DeleteRegistry.TabIndex = 13; + this.FormBrowser_DeleteRegistry.TabIndex = 4; this.FormBrowser_DeleteRegistry.Text = "削除"; this.ToolTipInfo.SetToolTip(this.FormBrowser_DeleteRegistry, "レジストリを削除します。"); this.FormBrowser_DeleteRegistry.UseVisualStyleBackColor = true; @@ -1138,7 +1150,7 @@ private void InitializeComponent() { this.FormBrowser_GPURendering.Location = new System.Drawing.Point(180, 18); this.FormBrowser_GPURendering.Name = "FormBrowser_GPURendering"; this.FormBrowser_GPURendering.Size = new System.Drawing.Size(103, 19); - this.FormBrowser_GPURendering.TabIndex = 10; + this.FormBrowser_GPURendering.TabIndex = 2; this.FormBrowser_GPURendering.Text = "GPUレンダリング"; this.ToolTipInfo.SetToolTip(this.FormBrowser_GPURendering, "内蔵ブラウザでGPUレンダリングを使用するかを指定します。\r\n環境によっては処理が高速化します。"); this.FormBrowser_GPURendering.UseVisualStyleBackColor = true; @@ -1149,7 +1161,7 @@ private void InitializeComponent() { this.FormBrowser_ApplyRegistry.Location = new System.Drawing.Point(318, 15); this.FormBrowser_ApplyRegistry.Name = "FormBrowser_ApplyRegistry"; this.FormBrowser_ApplyRegistry.Size = new System.Drawing.Size(50, 23); - this.FormBrowser_ApplyRegistry.TabIndex = 12; + this.FormBrowser_ApplyRegistry.TabIndex = 3; this.FormBrowser_ApplyRegistry.Text = "適用"; this.ToolTipInfo.SetToolTip(this.FormBrowser_ApplyRegistry, "レジストリに対して設定を適用します。\r\n下の[OK]ボタンでは反映されないのでご注意ください。"); this.FormBrowser_ApplyRegistry.UseVisualStyleBackColor = true; @@ -1161,16 +1173,16 @@ private void InitializeComponent() { this.label19.Location = new System.Drawing.Point(6, 19); this.label19.Name = "label19"; this.label19.Size = new System.Drawing.Size(100, 15); - this.label19.TabIndex = 11; + this.label19.TabIndex = 0; this.label19.Text = "ブラウザバージョン:"; // // FormBrowser_AppliesStyleSheet // this.FormBrowser_AppliesStyleSheet.AutoSize = true; - this.FormBrowser_AppliesStyleSheet.Location = new System.Drawing.Point(180, 31); + this.FormBrowser_AppliesStyleSheet.Location = new System.Drawing.Point(282, 31); this.FormBrowser_AppliesStyleSheet.Name = "FormBrowser_AppliesStyleSheet"; this.FormBrowser_AppliesStyleSheet.Size = new System.Drawing.Size(142, 19); - this.FormBrowser_AppliesStyleSheet.TabIndex = 8; + this.FormBrowser_AppliesStyleSheet.TabIndex = 6; this.FormBrowser_AppliesStyleSheet.Text = "スタイルシートを適用する"; this.ToolTipInfo.SetToolTip(this.FormBrowser_AppliesStyleSheet, "艦これ画面のみを表示できるようにします。\r\n環境によっては表示が乱れます、その場合は無効にしてください。"); this.FormBrowser_AppliesStyleSheet.UseVisualStyleBackColor = true; @@ -1178,10 +1190,10 @@ private void InitializeComponent() { // FormBrowser_ConfirmAtRefresh // this.FormBrowser_ConfirmAtRefresh.AutoSize = true; - this.FormBrowser_ConfirmAtRefresh.Location = new System.Drawing.Point(180, 6); + this.FormBrowser_ConfirmAtRefresh.Location = new System.Drawing.Point(282, 6); this.FormBrowser_ConfirmAtRefresh.Name = "FormBrowser_ConfirmAtRefresh"; this.FormBrowser_ConfirmAtRefresh.Size = new System.Drawing.Size(148, 19); - this.FormBrowser_ConfirmAtRefresh.TabIndex = 7; + this.FormBrowser_ConfirmAtRefresh.TabIndex = 5; this.FormBrowser_ConfirmAtRefresh.Text = "再読み込み時に確認する"; this.ToolTipInfo.SetToolTip(this.FormBrowser_ConfirmAtRefresh, "有効な場合再読み込みするときに確認ダイアログを表示します。\r\n誤爆防止にご利用ください。"); this.FormBrowser_ConfirmAtRefresh.UseVisualStyleBackColor = true; @@ -1198,7 +1210,7 @@ private void InitializeComponent() { this.groupBox2.Location = new System.Drawing.Point(6, 88); this.groupBox2.Name = "groupBox2"; this.groupBox2.Size = new System.Drawing.Size(430, 77); - this.groupBox2.TabIndex = 6; + this.groupBox2.TabIndex = 9; this.groupBox2.TabStop = false; this.groupBox2.Text = "スクリーンショット"; // @@ -1259,7 +1271,7 @@ private void InitializeComponent() { this.label17.Location = new System.Drawing.Point(6, 62); this.label17.Name = "label17"; this.label17.Size = new System.Drawing.Size(72, 15); - this.label17.TabIndex = 5; + this.label17.TabIndex = 7; this.label17.Text = "ログインURL:"; // // label16 @@ -1268,7 +1280,7 @@ private void InitializeComponent() { this.label16.Location = new System.Drawing.Point(148, 32); this.label16.Name = "label16"; this.label16.Size = new System.Drawing.Size(19, 15); - this.label16.TabIndex = 4; + this.label16.TabIndex = 3; this.label16.Text = "%"; // // FormBrowser_IsEnabled @@ -1277,7 +1289,7 @@ private void InitializeComponent() { this.FormBrowser_IsEnabled.Location = new System.Drawing.Point(6, 6); this.FormBrowser_IsEnabled.Name = "FormBrowser_IsEnabled"; this.FormBrowser_IsEnabled.Size = new System.Drawing.Size(116, 19); - this.FormBrowser_IsEnabled.TabIndex = 3; + this.FormBrowser_IsEnabled.TabIndex = 0; this.FormBrowser_IsEnabled.Text = "起動時に読み込む"; this.FormBrowser_IsEnabled.UseVisualStyleBackColor = true; // @@ -1288,7 +1300,7 @@ private void InitializeComponent() { this.FormBrowser_LogInPageURL.Location = new System.Drawing.Point(82, 59); this.FormBrowser_LogInPageURL.Name = "FormBrowser_LogInPageURL"; this.FormBrowser_LogInPageURL.Size = new System.Drawing.Size(354, 23); - this.FormBrowser_LogInPageURL.TabIndex = 2; + this.FormBrowser_LogInPageURL.TabIndex = 8; // // FormBrowser_ZoomRate // @@ -1305,7 +1317,7 @@ private void InitializeComponent() { 0}); this.FormBrowser_ZoomRate.Name = "FormBrowser_ZoomRate"; this.FormBrowser_ZoomRate.Size = new System.Drawing.Size(60, 23); - this.FormBrowser_ZoomRate.TabIndex = 1; + this.FormBrowser_ZoomRate.TabIndex = 2; this.FormBrowser_ZoomRate.TextAlign = System.Windows.Forms.HorizontalAlignment.Right; this.FormBrowser_ZoomRate.Value = new decimal(new int[] { 10, @@ -1319,7 +1331,7 @@ private void InitializeComponent() { this.label15.Location = new System.Drawing.Point(6, 32); this.label15.Name = "label15"; this.label15.Size = new System.Drawing.Size(73, 15); - this.label15.TabIndex = 0; + this.label15.TabIndex = 1; this.label15.Text = "ズーム倍率:"; // // tabPage11 @@ -1444,15 +1456,16 @@ private void InitializeComponent() { this.APIListBrowser.Filter = "Text File|*.txt|File|*"; this.APIListBrowser.Title = "API リストを開く"; // - // Life_ShowStatusBar + // FormBrowser_ZoomFit // - this.Life_ShowStatusBar.AutoSize = true; - this.Life_ShowStatusBar.Location = new System.Drawing.Point(11, 110); - this.Life_ShowStatusBar.Name = "Life_ShowStatusBar"; - this.Life_ShowStatusBar.Size = new System.Drawing.Size(143, 19); - this.Life_ShowStatusBar.TabIndex = 6; - this.Life_ShowStatusBar.Text = "ステータスバーを表示する"; - this.Life_ShowStatusBar.UseVisualStyleBackColor = true; + this.FormBrowser_ZoomFit.AutoSize = true; + this.FormBrowser_ZoomFit.Location = new System.Drawing.Point(173, 31); + this.FormBrowser_ZoomFit.Name = "FormBrowser_ZoomFit"; + this.FormBrowser_ZoomFit.Size = new System.Drawing.Size(61, 19); + this.FormBrowser_ZoomFit.TabIndex = 4; + this.FormBrowser_ZoomFit.Text = "ぴったり"; + this.ToolTipInfo.SetToolTip(this.FormBrowser_ZoomFit, "有効な場合、画面に合わせて自動的に拡大・縮小します。"); + this.FormBrowser_ZoomFit.UseVisualStyleBackColor = true; // // DialogConfiguration // @@ -1634,5 +1647,6 @@ private void InitializeComponent() { private System.Windows.Forms.Button FormBrowser_ApplyRegistry; private System.Windows.Forms.Label label19; private System.Windows.Forms.CheckBox Life_ShowStatusBar; + private System.Windows.Forms.CheckBox FormBrowser_ZoomFit; } } \ No newline at end of file diff --git a/ElectronicObserver/Window/Dialog/DialogConfiguration.cs b/ElectronicObserver/Window/Dialog/DialogConfiguration.cs index 5bd5091c5..0132f52b0 100644 --- a/ElectronicObserver/Window/Dialog/DialogConfiguration.cs +++ b/ElectronicObserver/Window/Dialog/DialogConfiguration.cs @@ -318,6 +318,7 @@ public void FromConfiguration( Configuration.ConfigurationData config ) { FormBrowser_IsEnabled.Checked = config.FormBrowser.IsEnabled; FormBrowser_ZoomRate.Value = config.FormBrowser.ZoomRate; + FormBrowser_ZoomFit.Checked = config.FormBrowser.ZoomFit; FormBrowser_LogInPageURL.Text = config.FormBrowser.LogInPageURL; FormBrowser_ScreenShotFormat_JPEG.Checked = config.FormBrowser.ScreenShotFormat == 1; FormBrowser_ScreenShotFormat_PNG.Checked = config.FormBrowser.ScreenShotFormat == 2; @@ -447,6 +448,7 @@ public void ToConfiguration( Configuration.ConfigurationData config ) { config.FormBrowser.IsEnabled = FormBrowser_IsEnabled.Checked; config.FormBrowser.ZoomRate = (int)FormBrowser_ZoomRate.Value; + config.FormBrowser.ZoomFit = FormBrowser_ZoomFit.Checked; config.FormBrowser.LogInPageURL = FormBrowser_LogInPageURL.Text; if ( FormBrowser_ScreenShotFormat_JPEG.Checked ) config.FormBrowser.ScreenShotFormat = 1; @@ -478,9 +480,9 @@ private void FormBrowser_ApplyRegistry_Click( object sender, EventArgs e ) { } catch ( Exception ex ) { Utility.ErrorReporter.SendErrorReport( ex, "レジストリへの書き込みに失敗しました。" ); - MessageBox.Show( "レジストリへの書き込みに失敗しました。\r\n" + ex.Message, "エラー", + MessageBox.Show( "レジストリへの書き込みに失敗しました。\r\n" + ex.Message, "エラー", MessageBoxButtons.OK, MessageBoxIcon.Error ); - + } finally { if ( reg != null ) reg.Close(); @@ -494,7 +496,7 @@ private void FormBrowser_DeleteRegistry_Click( object sender, EventArgs e ) { if ( MessageBox.Show( "レジストリを削除します。よろしいですか?\r\n*完全に適用するには再起動が必要です。", "確認", MessageBoxButtons.YesNo, MessageBoxIcon.Question, MessageBoxDefaultButton.Button2 ) == System.Windows.Forms.DialogResult.Yes ) { - + Microsoft.Win32.RegistryKey reg = null; try { diff --git a/ElectronicObserver/Window/Dialog/DialogConfiguration.resx b/ElectronicObserver/Window/Dialog/DialogConfiguration.resx index 5087138c2..9bb7c496e 100644 --- a/ElectronicObserver/Window/Dialog/DialogConfiguration.resx +++ b/ElectronicObserver/Window/Dialog/DialogConfiguration.resx @@ -120,6 +120,9 @@ 17, 17 + + 17, 17 + 137, 17 diff --git a/ElectronicObserver/Window/FormBrowserHost.cs b/ElectronicObserver/Window/FormBrowserHost.cs index ac9e4406d..12637903e 100644 --- a/ElectronicObserver/Window/FormBrowserHost.cs +++ b/ElectronicObserver/Window/FormBrowserHost.cs @@ -153,7 +153,7 @@ public void SaveScreenShot() { Utility.Configuration.Config.FormBrowser.ScreenShotFormat ) ); } - + public void SendErrorReport( string exceptionName, string message ) { Utility.ErrorReporter.SendErrorReport( new Exception( exceptionName ), message ); } @@ -252,7 +252,7 @@ public void RequestNavigation( string baseurl ) { } - + public void ConnectToBrowser( IntPtr hwnd ) { BrowserWnd = hwnd; @@ -364,7 +364,7 @@ protected override string GetPersistString() { [DllImport( "user32.dll", SetLastError = true )] private static extern bool MoveWindow( IntPtr hwnd, int x, int y, int cx, int cy, bool repaint ); - + #endregion } From eb5fef49e944a72fc003d01b3d3884f0218fff78 Mon Sep 17 00:00:00 2001 From: Nekopanda Date: Mon, 27 Apr 2015 17:04:16 +0900 Subject: [PATCH 4/5] =?UTF-8?q?=E8=89=A6=E3=81=93=E3=82=8C=E3=82=B5?= =?UTF-8?q?=E3=82=A4=E3=83=88=E3=81=8C=E5=B0=91=E3=81=97=E5=A4=89=E6=9B=B4?= =?UTF-8?q?=E3=81=95=E3=82=8C=E3=81=9F=E3=81=AE=E3=81=A7=E9=81=A9=E7=94=A8?= =?UTF-8?q?=E3=81=99=E3=82=8B=E3=82=B9=E3=82=AF=E3=83=AA=E3=83=97=E3=83=88?= =?UTF-8?q?=E3=82=92=E4=BF=AE=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Browser/Properties/Resources.Designer.cs | 6 +++--- Browser/Properties/Resources.resx | 3 ++- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/Browser/Properties/Resources.Designer.cs b/Browser/Properties/Resources.Designer.cs index cd45e6db2..38f39abd9 100644 --- a/Browser/Properties/Resources.Designer.cs +++ b/Browser/Properties/Resources.Designer.cs @@ -86,12 +86,12 @@ internal static string FrameScript { /// var fillStyle = {margin:"0px",padding:"0px",position:"fixed",left:"0px",top:"0px",width:"100%",height:"100%",overflow:"hidden"}; /// $(document.body).css({margin:"0px",padding:"0px",overflow:"hidden"}); /// $("img").css(hideStyle); - /// $("#dmm_ntgnavi").css(hideStyle); + /// //$("#dmm_ntgnavi").css(hideStyle); + /// $("#dmm-ntgnavi-renew").css(hideStyle); /// $("#w").css(fillStyle); /// $("#main-ntg").css(fillStyle); /// $("#page").css(fillStyle); - /// $("#area-game").css(fillStyle); - /// var jqGam [残りの文字列は切り詰められました]"; に類似しているローカライズされた文字列を検索します。 + /// [残りの文字列は切り詰められました]"; に類似しているローカライズされた文字列を検索します。 /// internal static string PageScript { get { diff --git a/Browser/Properties/Resources.resx b/Browser/Properties/Resources.resx index c50230451..2b90971b9 100644 --- a/Browser/Properties/Resources.resx +++ b/Browser/Properties/Resources.resx @@ -152,7 +152,8 @@ try { var fillStyle = {margin:"0px",padding:"0px",position:"fixed",left:"0px",top:"0px",width:"100%",height:"100%",overflow:"hidden"}; $(document.body).css({margin:"0px",padding:"0px",overflow:"hidden"}); $("img").css(hideStyle); - $("#dmm_ntgnavi").css(hideStyle); + //$("#dmm_ntgnavi").css(hideStyle); + $("#dmm-ntgnavi-renew").css(hideStyle); $("#w").css(fillStyle); $("#main-ntg").css(fillStyle); $("#page").css(fillStyle); From cd4d87646e6403289ef2539847d305a8e69e131f Mon Sep 17 00:00:00 2001 From: andanteyk Date: Tue, 28 Apr 2015 11:07:15 +0900 Subject: [PATCH 5/5] Version 1.2.1 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ・通知:画像未設定時に落ちる不具合を修正 ・ログ:解体追加、建造調整 --- .../kcsapi/api_req_kousyou/destroyship.cs | 4 +- .../kcsapi/api_req_kousyou/getship.cs | 2 +- .../Utility/SoftwareInformation.cs | 6 +- .../Window/Dialog/DialogNotifier.cs | 9 +- .../Window/FormMain.Designer.cs | 124 +++++++++--------- ElectronicObserver/Window/FormMain.cs | 1 + README.md | 2 +- 7 files changed, 78 insertions(+), 70 deletions(-) diff --git a/ElectronicObserver/Observer/kcsapi/api_req_kousyou/destroyship.cs b/ElectronicObserver/Observer/kcsapi/api_req_kousyou/destroyship.cs index a2e0fc1b5..701895881 100644 --- a/ElectronicObserver/Observer/kcsapi/api_req_kousyou/destroyship.cs +++ b/ElectronicObserver/Observer/kcsapi/api_req_kousyou/destroyship.cs @@ -21,8 +21,10 @@ public override void OnRequestReceived( Dictionary data ) { db.Fleet.LoadFromRequest( APIName, data ); - ShipData ship = db.Ships[shipID]; + + Utility.Logger.Add( 2, ship.NameWithLevel + " を解体しました。" ); + for ( int i = 0; i < ship.Slot.Count; i++ ) { if ( ship.Slot[i] != -1 ) db.Equipments.Remove( ship.Slot[i] ); diff --git a/ElectronicObserver/Observer/kcsapi/api_req_kousyou/getship.cs b/ElectronicObserver/Observer/kcsapi/api_req_kousyou/getship.cs index af2a9fc6f..96bfdb1b8 100644 --- a/ElectronicObserver/Observer/kcsapi/api_req_kousyou/getship.cs +++ b/ElectronicObserver/Observer/kcsapi/api_req_kousyou/getship.cs @@ -46,7 +46,7 @@ public override void OnResponseReceived( dynamic data ) { ship.LoadFromResponse( APIName, data.api_ship ); db.Ships.Add( ship ); - Utility.Logger.Add( 2, string.Format( "{0}「{1}」の建造が完了、戦列に加わりました。", ship.MasterShip.ShipTypeName, ship.MasterShip.NameWithClass ) ); + Utility.Logger.Add( 2, string.Format( "{0}「{1}」の建造が完了しました。", ship.MasterShip.ShipTypeName, ship.MasterShip.NameWithClass ) ); } diff --git a/ElectronicObserver/Utility/SoftwareInformation.cs b/ElectronicObserver/Utility/SoftwareInformation.cs index 3f4933a21..2c1257202 100644 --- a/ElectronicObserver/Utility/SoftwareInformation.cs +++ b/ElectronicObserver/Utility/SoftwareInformation.cs @@ -35,7 +35,7 @@ public static string SoftwareNameEnglish { /// public static string VersionJapanese { get { - return SoftwareNameJapanese + "一二型"; + return SoftwareNameJapanese + "一二型改"; } } @@ -44,7 +44,7 @@ public static string VersionJapanese { /// public static string VersionEnglish { get { - return "1.2.0"; + return "1.2.1"; } } @@ -54,7 +54,7 @@ public static string VersionEnglish { /// public static DateTime UpdateTime { get { - return DateTimeHelper.CSVStringToTime( "2015/04/24 23:00:00" ); + return DateTimeHelper.CSVStringToTime( "2015/04/27 22:00:00" ); } } diff --git a/ElectronicObserver/Window/Dialog/DialogNotifier.cs b/ElectronicObserver/Window/Dialog/DialogNotifier.cs index 98898e06b..310e7099f 100644 --- a/ElectronicObserver/Window/Dialog/DialogNotifier.cs +++ b/ElectronicObserver/Window/Dialog/DialogNotifier.cs @@ -91,8 +91,10 @@ private void DialogNotifier_Load( object sender, EventArgs e ) { if ( IsLayeredWindow ) { + Size size = DialogData.Image != null ? DialogData.Image.Size : new Size( 300, 100 ); + // メッセージを書き込んだうえでレイヤードウィンドウ化する - using ( var bmp = new Bitmap( DialogData.Image.Width, DialogData.Image.Height, System.Drawing.Imaging.PixelFormat.Format32bppArgb ) ) { + using ( var bmp = new Bitmap( size.Width, size.Height, System.Drawing.Imaging.PixelFormat.Format32bppArgb ) ) { using ( var g = Graphics.FromImage( bmp ) ) { @@ -100,7 +102,10 @@ private void DialogNotifier_Load( object sender, EventArgs e ) { g.SmoothingMode = System.Drawing.Drawing2D.SmoothingMode.HighQuality; g.PixelOffsetMode = System.Drawing.Drawing2D.PixelOffsetMode.HighQuality; - g.DrawImage( DialogData.Image, new Rectangle( 0, 0, bmp.Width, bmp.Height ) ); + if ( DialogData.Image != null ) + g.DrawImage( DialogData.Image, new Rectangle( 0, 0, bmp.Width, bmp.Height ) ); + else + g.Clear( DialogData.BackColor ); //DrawMessage( g ); //*/ diff --git a/ElectronicObserver/Window/FormMain.Designer.cs b/ElectronicObserver/Window/FormMain.Designer.cs index 0860b3eb1..c293b0449 100644 --- a/ElectronicObserver/Window/FormMain.Designer.cs +++ b/ElectronicObserver/Window/FormMain.Designer.cs @@ -24,21 +24,21 @@ protected override void Dispose( bool disposing ) { /// private void InitializeComponent() { this.components = new System.ComponentModel.Container(); - WeifenLuo.WinFormsUI.Docking.DockPanelSkin dockPanelSkin1 = new WeifenLuo.WinFormsUI.Docking.DockPanelSkin(); - WeifenLuo.WinFormsUI.Docking.AutoHideStripSkin autoHideStripSkin1 = new WeifenLuo.WinFormsUI.Docking.AutoHideStripSkin(); - WeifenLuo.WinFormsUI.Docking.DockPanelGradient dockPanelGradient1 = new WeifenLuo.WinFormsUI.Docking.DockPanelGradient(); - WeifenLuo.WinFormsUI.Docking.TabGradient tabGradient1 = new WeifenLuo.WinFormsUI.Docking.TabGradient(); - WeifenLuo.WinFormsUI.Docking.DockPaneStripSkin dockPaneStripSkin1 = new WeifenLuo.WinFormsUI.Docking.DockPaneStripSkin(); - WeifenLuo.WinFormsUI.Docking.DockPaneStripGradient dockPaneStripGradient1 = new WeifenLuo.WinFormsUI.Docking.DockPaneStripGradient(); - WeifenLuo.WinFormsUI.Docking.TabGradient tabGradient2 = new WeifenLuo.WinFormsUI.Docking.TabGradient(); - WeifenLuo.WinFormsUI.Docking.DockPanelGradient dockPanelGradient2 = new WeifenLuo.WinFormsUI.Docking.DockPanelGradient(); - WeifenLuo.WinFormsUI.Docking.TabGradient tabGradient3 = new WeifenLuo.WinFormsUI.Docking.TabGradient(); - WeifenLuo.WinFormsUI.Docking.DockPaneStripToolWindowGradient dockPaneStripToolWindowGradient1 = new WeifenLuo.WinFormsUI.Docking.DockPaneStripToolWindowGradient(); - WeifenLuo.WinFormsUI.Docking.TabGradient tabGradient4 = new WeifenLuo.WinFormsUI.Docking.TabGradient(); - WeifenLuo.WinFormsUI.Docking.TabGradient tabGradient5 = new WeifenLuo.WinFormsUI.Docking.TabGradient(); - WeifenLuo.WinFormsUI.Docking.DockPanelGradient dockPanelGradient3 = new WeifenLuo.WinFormsUI.Docking.DockPanelGradient(); - WeifenLuo.WinFormsUI.Docking.TabGradient tabGradient6 = new WeifenLuo.WinFormsUI.Docking.TabGradient(); - WeifenLuo.WinFormsUI.Docking.TabGradient tabGradient7 = new WeifenLuo.WinFormsUI.Docking.TabGradient(); + WeifenLuo.WinFormsUI.Docking.DockPanelSkin dockPanelSkin2 = new WeifenLuo.WinFormsUI.Docking.DockPanelSkin(); + WeifenLuo.WinFormsUI.Docking.AutoHideStripSkin autoHideStripSkin2 = new WeifenLuo.WinFormsUI.Docking.AutoHideStripSkin(); + WeifenLuo.WinFormsUI.Docking.DockPanelGradient dockPanelGradient4 = new WeifenLuo.WinFormsUI.Docking.DockPanelGradient(); + WeifenLuo.WinFormsUI.Docking.TabGradient tabGradient8 = new WeifenLuo.WinFormsUI.Docking.TabGradient(); + WeifenLuo.WinFormsUI.Docking.DockPaneStripSkin dockPaneStripSkin2 = new WeifenLuo.WinFormsUI.Docking.DockPaneStripSkin(); + WeifenLuo.WinFormsUI.Docking.DockPaneStripGradient dockPaneStripGradient2 = new WeifenLuo.WinFormsUI.Docking.DockPaneStripGradient(); + WeifenLuo.WinFormsUI.Docking.TabGradient tabGradient9 = new WeifenLuo.WinFormsUI.Docking.TabGradient(); + WeifenLuo.WinFormsUI.Docking.DockPanelGradient dockPanelGradient5 = new WeifenLuo.WinFormsUI.Docking.DockPanelGradient(); + WeifenLuo.WinFormsUI.Docking.TabGradient tabGradient10 = new WeifenLuo.WinFormsUI.Docking.TabGradient(); + WeifenLuo.WinFormsUI.Docking.DockPaneStripToolWindowGradient dockPaneStripToolWindowGradient2 = new WeifenLuo.WinFormsUI.Docking.DockPaneStripToolWindowGradient(); + WeifenLuo.WinFormsUI.Docking.TabGradient tabGradient11 = new WeifenLuo.WinFormsUI.Docking.TabGradient(); + WeifenLuo.WinFormsUI.Docking.TabGradient tabGradient12 = new WeifenLuo.WinFormsUI.Docking.TabGradient(); + WeifenLuo.WinFormsUI.Docking.DockPanelGradient dockPanelGradient6 = new WeifenLuo.WinFormsUI.Docking.DockPanelGradient(); + WeifenLuo.WinFormsUI.Docking.TabGradient tabGradient13 = new WeifenLuo.WinFormsUI.Docking.TabGradient(); + WeifenLuo.WinFormsUI.Docking.TabGradient tabGradient14 = new WeifenLuo.WinFormsUI.Docking.TabGradient(); this.StripMenu = new System.Windows.Forms.MenuStrip(); this.StripMenu_File = new System.Windows.Forms.ToolStripMenuItem(); this.StripMenu_File_Record = new System.Windows.Forms.ToolStripMenuItem(); @@ -761,7 +761,7 @@ private void InitializeComponent() { // StripStatus_Padding // this.StripStatus_Padding.Name = "StripStatus_Padding"; - this.StripStatus_Padding.Size = new System.Drawing.Size(481, 18); + this.StripStatus_Padding.Size = new System.Drawing.Size(450, 18); this.StripStatus_Padding.Spring = true; // // StripStatus_Clock @@ -788,52 +788,52 @@ private void InitializeComponent() { this.MainDockPanel.Name = "MainDockPanel"; this.MainDockPanel.ShowDocumentIcon = true; this.MainDockPanel.Size = new System.Drawing.Size(640, 431); - dockPanelGradient1.EndColor = System.Drawing.SystemColors.ControlLight; - dockPanelGradient1.StartColor = System.Drawing.SystemColors.ControlLight; - autoHideStripSkin1.DockStripGradient = dockPanelGradient1; - tabGradient1.EndColor = System.Drawing.SystemColors.Control; - tabGradient1.StartColor = System.Drawing.SystemColors.Control; - tabGradient1.TextColor = System.Drawing.SystemColors.ControlDarkDark; - autoHideStripSkin1.TabGradient = tabGradient1; - autoHideStripSkin1.TextFont = new System.Drawing.Font("メイリオ", 9F); - dockPanelSkin1.AutoHideStripSkin = autoHideStripSkin1; - tabGradient2.EndColor = System.Drawing.SystemColors.ControlLightLight; - tabGradient2.StartColor = System.Drawing.SystemColors.ControlLightLight; - tabGradient2.TextColor = System.Drawing.SystemColors.ControlText; - dockPaneStripGradient1.ActiveTabGradient = tabGradient2; - dockPanelGradient2.EndColor = System.Drawing.SystemColors.Control; - dockPanelGradient2.StartColor = System.Drawing.SystemColors.Control; - dockPaneStripGradient1.DockStripGradient = dockPanelGradient2; - tabGradient3.EndColor = System.Drawing.SystemColors.ControlLight; - tabGradient3.StartColor = System.Drawing.SystemColors.ControlLight; - tabGradient3.TextColor = System.Drawing.SystemColors.ControlText; - dockPaneStripGradient1.InactiveTabGradient = tabGradient3; - dockPaneStripSkin1.DocumentGradient = dockPaneStripGradient1; - dockPaneStripSkin1.TextFont = new System.Drawing.Font("メイリオ", 9F); - tabGradient4.EndColor = System.Drawing.SystemColors.ActiveCaption; - tabGradient4.LinearGradientMode = System.Drawing.Drawing2D.LinearGradientMode.Vertical; - tabGradient4.StartColor = System.Drawing.SystemColors.GradientActiveCaption; - tabGradient4.TextColor = System.Drawing.SystemColors.ActiveCaptionText; - dockPaneStripToolWindowGradient1.ActiveCaptionGradient = tabGradient4; - tabGradient5.EndColor = System.Drawing.SystemColors.Control; - tabGradient5.StartColor = System.Drawing.SystemColors.Control; - tabGradient5.TextColor = System.Drawing.SystemColors.ControlText; - dockPaneStripToolWindowGradient1.ActiveTabGradient = tabGradient5; - dockPanelGradient3.EndColor = System.Drawing.SystemColors.ControlLight; - dockPanelGradient3.StartColor = System.Drawing.SystemColors.ControlLight; - dockPaneStripToolWindowGradient1.DockStripGradient = dockPanelGradient3; - tabGradient6.EndColor = System.Drawing.SystemColors.InactiveCaption; - tabGradient6.LinearGradientMode = System.Drawing.Drawing2D.LinearGradientMode.Vertical; - tabGradient6.StartColor = System.Drawing.SystemColors.GradientInactiveCaption; - tabGradient6.TextColor = System.Drawing.SystemColors.InactiveCaptionText; - dockPaneStripToolWindowGradient1.InactiveCaptionGradient = tabGradient6; - tabGradient7.EndColor = System.Drawing.Color.Transparent; - tabGradient7.StartColor = System.Drawing.Color.Transparent; - tabGradient7.TextColor = System.Drawing.SystemColors.ControlDarkDark; - dockPaneStripToolWindowGradient1.InactiveTabGradient = tabGradient7; - dockPaneStripSkin1.ToolWindowGradient = dockPaneStripToolWindowGradient1; - dockPanelSkin1.DockPaneStripSkin = dockPaneStripSkin1; - this.MainDockPanel.Skin = dockPanelSkin1; + dockPanelGradient4.EndColor = System.Drawing.SystemColors.ControlLight; + dockPanelGradient4.StartColor = System.Drawing.SystemColors.ControlLight; + autoHideStripSkin2.DockStripGradient = dockPanelGradient4; + tabGradient8.EndColor = System.Drawing.SystemColors.Control; + tabGradient8.StartColor = System.Drawing.SystemColors.Control; + tabGradient8.TextColor = System.Drawing.SystemColors.ControlDarkDark; + autoHideStripSkin2.TabGradient = tabGradient8; + autoHideStripSkin2.TextFont = new System.Drawing.Font("メイリオ", 9F); + dockPanelSkin2.AutoHideStripSkin = autoHideStripSkin2; + tabGradient9.EndColor = System.Drawing.SystemColors.ControlLightLight; + tabGradient9.StartColor = System.Drawing.SystemColors.ControlLightLight; + tabGradient9.TextColor = System.Drawing.SystemColors.ControlText; + dockPaneStripGradient2.ActiveTabGradient = tabGradient9; + dockPanelGradient5.EndColor = System.Drawing.SystemColors.Control; + dockPanelGradient5.StartColor = System.Drawing.SystemColors.Control; + dockPaneStripGradient2.DockStripGradient = dockPanelGradient5; + tabGradient10.EndColor = System.Drawing.SystemColors.ControlLight; + tabGradient10.StartColor = System.Drawing.SystemColors.ControlLight; + tabGradient10.TextColor = System.Drawing.SystemColors.ControlText; + dockPaneStripGradient2.InactiveTabGradient = tabGradient10; + dockPaneStripSkin2.DocumentGradient = dockPaneStripGradient2; + dockPaneStripSkin2.TextFont = new System.Drawing.Font("メイリオ", 9F); + tabGradient11.EndColor = System.Drawing.SystemColors.ActiveCaption; + tabGradient11.LinearGradientMode = System.Drawing.Drawing2D.LinearGradientMode.Vertical; + tabGradient11.StartColor = System.Drawing.SystemColors.GradientActiveCaption; + tabGradient11.TextColor = System.Drawing.SystemColors.ActiveCaptionText; + dockPaneStripToolWindowGradient2.ActiveCaptionGradient = tabGradient11; + tabGradient12.EndColor = System.Drawing.SystemColors.Control; + tabGradient12.StartColor = System.Drawing.SystemColors.Control; + tabGradient12.TextColor = System.Drawing.SystemColors.ControlText; + dockPaneStripToolWindowGradient2.ActiveTabGradient = tabGradient12; + dockPanelGradient6.EndColor = System.Drawing.SystemColors.ControlLight; + dockPanelGradient6.StartColor = System.Drawing.SystemColors.ControlLight; + dockPaneStripToolWindowGradient2.DockStripGradient = dockPanelGradient6; + tabGradient13.EndColor = System.Drawing.SystemColors.InactiveCaption; + tabGradient13.LinearGradientMode = System.Drawing.Drawing2D.LinearGradientMode.Vertical; + tabGradient13.StartColor = System.Drawing.SystemColors.GradientInactiveCaption; + tabGradient13.TextColor = System.Drawing.SystemColors.InactiveCaptionText; + dockPaneStripToolWindowGradient2.InactiveCaptionGradient = tabGradient13; + tabGradient14.EndColor = System.Drawing.Color.Transparent; + tabGradient14.StartColor = System.Drawing.Color.Transparent; + tabGradient14.TextColor = System.Drawing.SystemColors.ControlDarkDark; + dockPaneStripToolWindowGradient2.InactiveTabGradient = tabGradient14; + dockPaneStripSkin2.ToolWindowGradient = dockPaneStripToolWindowGradient2; + dockPanelSkin2.DockPaneStripSkin = dockPaneStripSkin2; + this.MainDockPanel.Skin = dockPanelSkin2; this.MainDockPanel.TabIndex = 0; // // FormMain diff --git a/ElectronicObserver/Window/FormMain.cs b/ElectronicObserver/Window/FormMain.cs index 909774531..fb8832df2 100644 --- a/ElectronicObserver/Window/FormMain.cs +++ b/ElectronicObserver/Window/FormMain.cs @@ -196,6 +196,7 @@ private void UIUpdateTimer_Tick( object sender, EventArgs e ) { StripStatus_Clock.Text = DateTime.Now.ToString( "HH:mm:ss" ); + StripStatus_Clock.ToolTipText = DateTime.Now.ToString( "yyyy/MM/dd (ddd)" ); } diff --git a/README.md b/README.md index d060d1d0b..147129ac9 100644 --- a/README.md +++ b/README.md @@ -37,7 +37,7 @@ *このリンクの更新は遅れる可能性があります。最新版は[こちら](http://electronicobserver.blog.fc2.com/)で確認してください。* -[ver. 1.2.0 (2015/04/24)](http://bit.ly/1DrrPT6) +[ver. 1.2.1 (2015/04/27)](http://bit.ly/1EcLMzu) 更新内容・履歴は[こちら](https://github.com/andanteyk/ElectronicObserver/wiki/ChangeLog)で確認できます。