diff --git a/Configuration/GlobalAssemblyInfo.cs b/Configuration/GlobalAssemblyInfo.cs index 008cca7ec..e94b0425e 100644 --- a/Configuration/GlobalAssemblyInfo.cs +++ b/Configuration/GlobalAssemblyInfo.cs @@ -15,7 +15,7 @@ internal static class RevisionClass public const string Major = "3"; public const string Minor = "6"; public const string Build = "2"; - public const string Revision = "2414"; + public const string Revision = "2427"; public const string MainVersion = Major + "." + Minor; public const string FullVersion = Major + "." + Minor + "." + Build + "." + Revision; diff --git a/Configuration/Version.defs b/Configuration/Version.defs index 0a285f104..e67680884 100644 --- a/Configuration/Version.defs +++ b/Configuration/Version.defs @@ -1,4 +1,4 @@ -%COREVERSION%=2 -%REVISION%=2414 %MINOR%=6 +%REVISION%=2427 +%COREVERSION%=2 %MAJOR%=3 diff --git a/InstallerSamples/Graph3D/SunSystem/PlanetsRotateAlgAnim.pas b/InstallerSamples/Graph3D/SunSystem/PlanetsRotateAlgAnim.pas new file mode 100644 index 000000000..dc5a7e019 --- /dev/null +++ b/InstallerSamples/Graph3D/SunSystem/PlanetsRotateAlgAnim.pas @@ -0,0 +1,23 @@ +uses Graph3D; + +begin + Window.Title := 'Вращение планет'; + View3D.HideAll; + View3D.BackgroundColor := Colors.Black; + + var s := Sphere(0,0,0,30); + s.BackMaterial := ImageMaterial('skymap.jpg'); + + var Sun := Sphere(0,0,0,2,ImageMaterial('sunmap.jpg')); + var Earth := Sphere(-7,0,0,1,ImageMaterial('earthmap.jpg')); + var Moon := Sphere(2,0,0,0.5,ImageMaterial('moonmap.jpg')); + Earth.AddChild(Moon); + + var tr := ParametricTrajectory(0,2*Pi,100,t->P3D(7*cos(t),7*sin(t),0)); + Polyline3D(tr,1.2,GrayColor(70)); + + Moon.AnimRotateAt(OrtZ,360,P3D(-2,0,0),2.sec).Forever.Begin; + Earth.AnimRotateAtAbsolute(OrtZ,360,Origin,20.sec).Forever.Begin; + Earth.AnimRotate(OrtZ,-360,5.sec).Forever.Begin; + Sun.AnimRotate(OrtZ,-360,20.sec).Forever.Begin; +end. \ No newline at end of file diff --git a/InstallerSamples/Graph3D/SunSystem/PlanetsRotateFrBased.pas b/InstallerSamples/Graph3D/SunSystem/PlanetsRotateFrBased.pas new file mode 100644 index 000000000..b46eb6928 --- /dev/null +++ b/InstallerSamples/Graph3D/SunSystem/PlanetsRotateFrBased.pas @@ -0,0 +1,27 @@ +uses Graph3D; + +begin + Window.Title := 'Вращение планет'; + View3D.HideAll; + + var s := Sphere(0,0,0,30); + s.BackMaterial := ImageMaterial('skymap.jpg'); + + var earth := Sphere(-7,0,0,1,ImageMaterial('earthmap.jpg')); + var moon := Sphere(2,0,0,0.5,ImageMaterial('moonmap.jpg')); + earth.AddChild(moon); + var Sun := Sphere(0,0,0,2,ImageMaterial('sunmap.jpg')); + Sun.AnimRotate(OrtZ,-360,20.sec).Forever.Begin; + + var tr := ParametricTrajectory(0,2*Pi,100,t->P3D(7*cos(t),7*sin(t),0)); + Polyline3D(tr,1.2,GrayColor(80)); + + var tr1 := ParametricTrajectory(0,2*Pi,100,t->P3D(2*cos(t),2*sin(t),0)); + var pl1 := Polyline3D(tr1,1.2,GrayColor(80)); + earth.AddChild(pl1); + + OnDrawFrame := dt -> begin + moon.RotateAt(OrtZ,360*dt/3,P3D(-2,0,0)); + earth.RotateAtAbsolute(OrtZ,360*dt/6,Origin); + end; +end. \ No newline at end of file diff --git a/InstallerSamples/Graph3D/SunSystem/earthmap.jpg b/InstallerSamples/Graph3D/SunSystem/earthmap.jpg new file mode 100644 index 000000000..9efef1690 Binary files /dev/null and b/InstallerSamples/Graph3D/SunSystem/earthmap.jpg differ diff --git a/InstallerSamples/Graph3D/SunSystem/moonmap.jpg b/InstallerSamples/Graph3D/SunSystem/moonmap.jpg new file mode 100644 index 000000000..52b199bb8 Binary files /dev/null and b/InstallerSamples/Graph3D/SunSystem/moonmap.jpg differ diff --git a/InstallerSamples/Graph3D/SunSystem/skymap.jpg b/InstallerSamples/Graph3D/SunSystem/skymap.jpg new file mode 100644 index 000000000..10ba8efd7 Binary files /dev/null and b/InstallerSamples/Graph3D/SunSystem/skymap.jpg differ diff --git a/InstallerSamples/Graph3D/SunSystem/sunmap.jpg b/InstallerSamples/Graph3D/SunSystem/sunmap.jpg new file mode 100644 index 000000000..aa448cca7 Binary files /dev/null and b/InstallerSamples/Graph3D/SunSystem/sunmap.jpg differ diff --git a/Libraries/ICSharpCode.TextEditor.dll b/Libraries/ICSharpCode.TextEditor.dll index 168215936..043542db3 100644 Binary files a/Libraries/ICSharpCode.TextEditor.dll and b/Libraries/ICSharpCode.TextEditor.dll differ diff --git a/Libraries/WeifenLuo.WinFormsUI.Docking.dll b/Libraries/WeifenLuo.WinFormsUI.Docking.dll index 959e5fdbf..f7aacf57a 100644 Binary files a/Libraries/WeifenLuo.WinFormsUI.Docking.dll and b/Libraries/WeifenLuo.WinFormsUI.Docking.dll differ diff --git a/Release/pabcversion.txt b/Release/pabcversion.txt index 814282acf..338392c68 100644 --- a/Release/pabcversion.txt +++ b/Release/pabcversion.txt @@ -1 +1 @@ -3.6.2.2414 +3.6.2.2427 diff --git a/ReleaseGenerators/PascalABCNET_version.nsh b/ReleaseGenerators/PascalABCNET_version.nsh index 983a01b35..dfc54334a 100644 --- a/ReleaseGenerators/PascalABCNET_version.nsh +++ b/ReleaseGenerators/PascalABCNET_version.nsh @@ -1 +1 @@ -!define VERSION '3.6.2.2414' +!define VERSION '3.6.2.2427' diff --git a/TestSuite/CompilationSamples/GraphWPF.pas b/TestSuite/CompilationSamples/GraphWPF.pas index 6a7ad2570..48795a62e 100644 --- a/TestSuite/CompilationSamples/GraphWPF.pas +++ b/TestSuite/CompilationSamples/GraphWPF.pas @@ -54,18 +54,21 @@ type Alignment = (LeftTop,CenterTop,RightTop,LeftCenter,Center,RightCenter,LeftBottom,CenterBottom,RightBottom); //{{{--doc: Конец секции 1 }}} + +function GetBrush(c: Color): GBrush; //{{{doc: Начало секции 2 }}} // ----------------------------------------------------- //>> Класс BrushType # BrushType class // ----------------------------------------------------- +type ///!# /// Тип кисти BrushType = class private c := Colors.White; - function BrushConstruct := new SolidColorBrush(c); + function BrushConstruct := GetBrush(c); public /// Цвет кисти property Color: GColor read c write c; @@ -84,7 +87,7 @@ type rc: boolean := false; function PenConstruct: GPen; begin - Result := new GPen(new SolidColorBrush(c),th); + Result := new GPen(GetBrush(c),th); Result.LineJoin := PenLineJoin.Round; if rc then begin @@ -136,7 +139,7 @@ type end; procedure SetFS(fs: FontStyle) := Invoke(SetFSP,fs); function TypefaceClone := tf; - function BrushConstruct := new SolidColorBrush(c); + function BrushConstruct := GetBrush(c); public /// Цвет шрифта property Color: GColor read c write c; @@ -513,6 +516,20 @@ procedure __FinalizeModule__; implementation +var BrushesDict := new Dictionary; + +function GetBrush(c: Color): GBrush; +begin + if not (c in BrushesDict) then + begin + var b := new SolidColorBrush(c); + BrushesDict[c] := b; + Result := b + end + else Result := BrushesDict[c]; +end; + + procedure Redraw(d: ()->()) := app.Dispatcher.Invoke(d); function getApp: Application := app; @@ -524,8 +541,8 @@ function EmptyColor: Color := ARGB(0,0,0,0); function clRandom := RandomColor(); function Pnt(x,y: real) := new Point(x,y); function Rect(x,y,w,h: real) := new System.Windows.Rect(x,y,w,h); -function ColorBrush(c: Color) := new SolidColorBrush(c); -function ColorPen(c: Color) := new GPen(ColorBrush(c),Pen.Width); +function ColorBrush(c: Color) := GetBrush(c); +function ColorPen(c: Color) := new GPen(GetBrush(c),Pen.Width); procedure InvokeVisual(d: System.Delegate; params args: array of object); begin @@ -662,7 +679,7 @@ end; procedure SetPixelP(x,y: real; c: Color); begin var dc := GetDC(); - dc.DrawRectangle(new SolidColorBrush(c), nil, Rect(x,y,1,1)); + dc.DrawRectangle(GetBrush(c), nil, Rect(x,y,1,1)); ReleaseDC(dc); end; @@ -673,7 +690,7 @@ begin for var ix:=0 to w-1 do for var iy:=0 to h-1 do begin - dc.DrawRectangle(ColorBrush(f(ix,iy)), nil, Rect(x+ix,y+iy,1,1)); + dc.DrawRectangle(GetBrush(f(ix,iy)), nil, Rect(x+ix,y+iy,1,1)); end; ReleaseDC(dc); end; @@ -691,7 +708,7 @@ function FormText(text: string) := function FormTextC(text: string; c: GColor): FormattedText := new FormattedText(text,new System.Globalization.CultureInfo('ru-ru'), FlowDirection.LeftToRight, - Font.TypefaceClone, Font.Size, ColorBrush(c)); + Font.TypefaceClone, Font.Size, GetBrush(c)); function TextWidthP(text: string) := FormText(text).Width; function TextHeightP(text: string) := FormText(text).Height; @@ -952,16 +969,16 @@ procedure SectorPFull(x, y, r, angle1, angle2: real; b: GBrush; p: GPen) := ArcS procedure EllipseP(x,y,r1,r2: real) := EllipsePFull(x,y,r1,r2,Brush.BrushConstruct,Pen.PenConstruct); procedure DrawEllipseP(x,y,r1,r2: real) := EllipsePFull(x,y,r1,r2,nil,Pen.PenConstruct); procedure FillEllipseP(x,y,r1,r2: real) := EllipsePFull(x,y,r1,r2,Brush.BrushConstruct,nil); -procedure EllipsePC(x,y,r1,r2: real; c: GColor) := EllipsePFull(x,y,r1,r2,ColorBrush(c),Pen.PenConstruct); +procedure EllipsePC(x,y,r1,r2: real; c: GColor) := EllipsePFull(x,y,r1,r2,GetBrush(c),Pen.PenConstruct); procedure DrawEllipsePC(x,y,r1,r2: real; c: GColor) := EllipsePFull(x,y,r1,r2,nil,ColorPen(c)); -procedure FillEllipsePC(x,y,r1,r2: real; c: GColor) := EllipsePFull(x,y,r1,r2,ColorBrush(c),nil); +procedure FillEllipsePC(x,y,r1,r2: real; c: GColor) := EllipsePFull(x,y,r1,r2,GetBrush(c),nil); procedure RectangleP(x,y,w,h: real) := RectanglePFull(x,y,w,h,Brush.BrushConstruct,Pen.PenConstruct); procedure DrawRectangleP(x,y,w,h: real) := RectanglePFull(x,y,w,h,nil,Pen.PenConstruct); procedure FillRectangleP(x,y,w,h: real) := RectanglePFull(x,y,w,h,Brush.BrushConstruct,nil); -procedure RectanglePC(x,y,r1,r2: real; c: GColor) := RectanglePFull(x,y,r1,r2,ColorBrush(c),Pen.PenConstruct); +procedure RectanglePC(x,y,r1,r2: real; c: GColor) := RectanglePFull(x,y,r1,r2,GetBrush(c),Pen.PenConstruct); procedure DrawRectanglePC(x,y,r1,r2: real; c: GColor) := RectanglePFull(x,y,r1,r2,nil,ColorPen(c)); -procedure FillRectanglePC(x,y,r1,r2: real; c: GColor) := RectanglePFull(x,y,r1,r2,ColorBrush(c),nil); +procedure FillRectanglePC(x,y,r1,r2: real; c: GColor) := RectanglePFull(x,y,r1,r2,GetBrush(c),nil); procedure ArcP(x, y, r, angle1, angle2: real) := ArcPFull(x, y, r, angle1, angle2, Pen.PenConstruct); procedure ArcPC(x, y, r, angle1, angle2: real; c: GColor) := ArcPFull(x, y, r, angle1, angle2, ColorPen(c)); @@ -969,9 +986,9 @@ procedure ArcPC(x, y, r, angle1, angle2: real; c: GColor) := ArcPFull(x, y, r, a procedure SectorP(x, y, r, angle1, angle2: real) := SectorPFull(x, y, r, angle1, angle2, Brush.BrushConstruct, Pen.PenConstruct); procedure DrawSectorP(x, y, r, angle1, angle2: real) := SectorPFull(x, y, r, angle1, angle2, nil, Pen.PenConstruct); procedure FillSectorP(x, y, r, angle1, angle2: real) := SectorPFull(x, y, r, angle1, angle2, Brush.BrushConstruct, nil); -procedure SectorPC(x, y, r, angle1, angle2: real; c: GColor) := SectorPFull(x, y, r, angle1, angle2, ColorBrush(c), Pen.PenConstruct); +procedure SectorPC(x, y, r, angle1, angle2: real; c: GColor) := SectorPFull(x, y, r, angle1, angle2, GetBrush(c), Pen.PenConstruct); procedure DrawSectorPC(x, y, r, angle1, angle2: real; c: GColor) := SectorPFull(x, y, r, angle1, angle2, nil, ColorPen(c)); -procedure FillSectorPC(x, y, r, angle1, angle2: real; c: GColor) := SectorPFull(x, y, r, angle1, angle2, ColorBrush(c), nil); +procedure FillSectorPC(x, y, r, angle1, angle2: real; c: GColor) := SectorPFull(x, y, r, angle1, angle2, GetBrush(c), nil); procedure LineP(x,y,x1,y1: real) := LinePFull(x,y,x1,y1,Pen.PenConstruct); procedure LinePC(x,y,x1,y1: real; c: GColor) := LinePFull(x,y,x1,y1,ColorPen(c)); @@ -996,7 +1013,7 @@ procedure DrawEllipse(x,y,rx,ry: real) := InvokeVisual(DrawEllipseP,x,y,rx,ry); procedure FillEllipse(x,y,rx,ry: real) := InvokeVisual(FillEllipseP,x,y,rx,ry); procedure Ellipse(x,y,rx,ry: real; c: GColor) := InvokeVisual(EllipsePC,x,y,rx,ry,c); procedure DrawEllipse(x,y,rx,ry: real; c: GColor) := InvokeVisual(DrawEllipsePC,x,y,rx,ry,c); -procedure FillEllipse(x,y,rx,ry: real; c: GColor) := app.Dispatcher.Invoke(()->FillEllipsePC(x,y,rx,ry,c)); +procedure FillEllipse(x,y,rx,ry: real; c: GColor) := InvokeVisual(FillEllipsePC,x,y,rx,ry,c); procedure Circle(x,y,r: real) := InvokeVisual(EllipseP,x,y,r,r); procedure DrawCircle(x,y,r: real) := InvokeVisual(DrawEllipseP,x,y,r,r); diff --git a/TestSuite/CompilationSamples/GraphWPFBase.pas b/TestSuite/CompilationSamples/GraphWPFBase.pas index 7241766c6..b4b8d4426 100644 --- a/TestSuite/CompilationSamples/GraphWPFBase.pas +++ b/TestSuite/CompilationSamples/GraphWPFBase.pas @@ -133,8 +133,22 @@ type //{{{--doc: Конец секции 1 }}} -function wplus := SystemParameters.WindowResizeBorderThickness.Left + SystemParameters.WindowResizeBorderThickness.Right; -function hplus := SystemParameters.WindowCaptionHeight + SystemParameters.WindowResizeBorderThickness.Top + SystemParameters.WindowResizeBorderThickness.Bottom; +var wp: real := -1; +var hp: real := -1; + +function wplus: real; +begin + if wp = -1 then + wp := (SystemParameters.BorderWidth + SystemParameters.FixedFrameVerticalBorderWidth) * 2; + Result := wp; +end; + +function hplus: real; +begin + if hp = -1 then + hp := SystemParameters.WindowCaptionHeight + (SystemParameters.BorderWidth + SystemParameters.FixedFrameHorizontalBorderHeight) * 2; + Result := hp; +end; ///---- Window ----- diff --git a/TestSuite/CompilationSamples/PABCSystem.pas b/TestSuite/CompilationSamples/PABCSystem.pas index 4f45dfd32..7f503a0e3 100644 --- a/TestSuite/CompilationSamples/PABCSystem.pas +++ b/TestSuite/CompilationSamples/PABCSystem.pas @@ -4842,9 +4842,9 @@ function HSet(a: sequence of T): HashSet := new HashSet(a); function SSet(a: sequence of T): SortedSet := new SortedSet(a); -function HSet(a: IntRange): HashSet := a.ToHashSet&; +function HSet(a: IntRange): HashSet := a.ToHashSet; -function HSet(a: CharRange): HashSet := a.ToHashSet&; +function HSet(a: CharRange): HashSet := a.ToHashSet; function SSet(a: IntRange): SortedSet := a.ToSortedSet; diff --git a/VisualPascalABCNET/Resources/copy.bmp b/VisualPascalABCNET/Resources/copy.bmp index 3340fe037..8a12f3bc4 100644 Binary files a/VisualPascalABCNET/Resources/copy.bmp and b/VisualPascalABCNET/Resources/copy.bmp differ diff --git a/VisualPlugins/CodeTemplatesPlugin/CodeTemplatesForm.cs b/VisualPlugins/CodeTemplatesPlugin/CodeTemplatesForm.cs index 2c5fd615b..5b9e4ad2b 100644 --- a/VisualPlugins/CodeTemplatesPlugin/CodeTemplatesForm.cs +++ b/VisualPlugins/CodeTemplatesPlugin/CodeTemplatesForm.cs @@ -59,7 +59,7 @@ namespace CodeTemplatesPlugin public CodeTemplatesForm() { InitializeComponent(); - var scale = ScreenScale.Calc(); + var scale = VisualPascalABC.ScreenScale.Calc(); listBox1.TileSize = new Size(listBox1.TileSize.Width, System.Convert.ToInt32(16 * scale)); LoadTemplates(); } diff --git a/VisualPlugins/CodeTemplatesPlugin/CodeTemplatesPlugin.csproj b/VisualPlugins/CodeTemplatesPlugin/CodeTemplatesPlugin.csproj index c7a6d9bb2..8c857085e 100644 --- a/VisualPlugins/CodeTemplatesPlugin/CodeTemplatesPlugin.csproj +++ b/VisualPlugins/CodeTemplatesPlugin/CodeTemplatesPlugin.csproj @@ -23,6 +23,7 @@ prompt 4 false + false pdbonly diff --git a/WeifenLuo/WinFormsUI/Docking/Resources.Designer.cs b/WeifenLuo/WinFormsUI/Docking/Resources.Designer.cs index 076e5ddf6..d57fa610b 100644 --- a/WeifenLuo/WinFormsUI/Docking/Resources.Designer.cs +++ b/WeifenLuo/WinFormsUI/Docking/Resources.Designer.cs @@ -1,10 +1,10 @@ //------------------------------------------------------------------------------ // -// This code was generated by a tool. -// Runtime Version:2.0.50727.42 +// Этот код создан программой. +// Исполняемая версия:4.0.30319.42000 // -// Changes to this file may cause incorrect behavior and will be lost if -// the code is regenerated. +// Изменения в этом файле могут привести к неправильной работе и будут потеряны в случае +// повторной генерации кода. // //------------------------------------------------------------------------------ @@ -13,13 +13,13 @@ namespace WeifenLuo.WinFormsUI.Docking { /// - /// A strongly-typed resource class, for looking up localized strings, etc. + /// Класс ресурса со строгой типизацией для поиска локализованных строк и т.д. /// - // This class was auto-generated by the StronglyTypedResourceBuilder - // class via a tool like ResGen or Visual Studio. - // To add or remove a member, edit your .ResX file then rerun ResGen - // with the /str option, or rebuild your VS project. - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "2.0.0.0")] + // Этот класс создан автоматически классом StronglyTypedResourceBuilder + // с помощью такого средства, как ResGen или Visual Studio. + // Чтобы добавить или удалить член, измените файл .ResX и снова запустите ResGen + // с параметром /str или перестройте свой проект VS. + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "15.0.0.0")] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] internal class Resources { @@ -33,7 +33,7 @@ namespace WeifenLuo.WinFormsUI.Docking { } /// - /// Returns the cached ResourceManager instance used by this class. + /// Возвращает кэшированный экземпляр ResourceManager, использованный этим классом. /// [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] internal static global::System.Resources.ResourceManager ResourceManager { @@ -47,8 +47,8 @@ namespace WeifenLuo.WinFormsUI.Docking { } /// - /// Overrides the current thread's CurrentUICulture property for all - /// resource lookups using this strongly typed resource class. + /// Перезаписывает свойство CurrentUICulture текущего потока для всех + /// обращений к ресурсу с помощью этого класса ресурса со строгой типизацией. /// [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] internal static global::System.Globalization.CultureInfo Culture { @@ -60,6 +60,9 @@ namespace WeifenLuo.WinFormsUI.Docking { } } + /// + /// Поиск локализованного ресурса типа System.Drawing.Bitmap. + /// internal static System.Drawing.Bitmap DockIndicator_PaneDiamond { get { object obj = ResourceManager.GetObject("DockIndicator_PaneDiamond", resourceCulture); @@ -67,6 +70,9 @@ namespace WeifenLuo.WinFormsUI.Docking { } } + /// + /// Поиск локализованного ресурса типа System.Drawing.Bitmap. + /// internal static System.Drawing.Bitmap DockIndicator_PaneDiamond_Bottom { get { object obj = ResourceManager.GetObject("DockIndicator_PaneDiamond_Bottom", resourceCulture); @@ -74,6 +80,9 @@ namespace WeifenLuo.WinFormsUI.Docking { } } + /// + /// Поиск локализованного ресурса типа System.Drawing.Bitmap. + /// internal static System.Drawing.Bitmap DockIndicator_PaneDiamond_Fill { get { object obj = ResourceManager.GetObject("DockIndicator_PaneDiamond_Fill", resourceCulture); @@ -81,6 +90,9 @@ namespace WeifenLuo.WinFormsUI.Docking { } } + /// + /// Поиск локализованного ресурса типа System.Drawing.Bitmap. + /// internal static System.Drawing.Bitmap DockIndicator_PaneDiamond_HotSpot { get { object obj = ResourceManager.GetObject("DockIndicator_PaneDiamond_HotSpot", resourceCulture); @@ -88,6 +100,9 @@ namespace WeifenLuo.WinFormsUI.Docking { } } + /// + /// Поиск локализованного ресурса типа System.Drawing.Bitmap. + /// internal static System.Drawing.Bitmap DockIndicator_PaneDiamond_HotSpotIndex { get { object obj = ResourceManager.GetObject("DockIndicator_PaneDiamond_HotSpotIndex", resourceCulture); @@ -95,6 +110,9 @@ namespace WeifenLuo.WinFormsUI.Docking { } } + /// + /// Поиск локализованного ресурса типа System.Drawing.Bitmap. + /// internal static System.Drawing.Bitmap DockIndicator_PaneDiamond_Left { get { object obj = ResourceManager.GetObject("DockIndicator_PaneDiamond_Left", resourceCulture); @@ -102,6 +120,9 @@ namespace WeifenLuo.WinFormsUI.Docking { } } + /// + /// Поиск локализованного ресурса типа System.Drawing.Bitmap. + /// internal static System.Drawing.Bitmap DockIndicator_PaneDiamond_Right { get { object obj = ResourceManager.GetObject("DockIndicator_PaneDiamond_Right", resourceCulture); @@ -109,6 +130,9 @@ namespace WeifenLuo.WinFormsUI.Docking { } } + /// + /// Поиск локализованного ресурса типа System.Drawing.Bitmap. + /// internal static System.Drawing.Bitmap DockIndicator_PaneDiamond_Top { get { object obj = ResourceManager.GetObject("DockIndicator_PaneDiamond_Top", resourceCulture); @@ -116,6 +140,9 @@ namespace WeifenLuo.WinFormsUI.Docking { } } + /// + /// Поиск локализованного ресурса типа System.Drawing.Bitmap. + /// internal static System.Drawing.Bitmap DockIndicator_PanelBottom { get { object obj = ResourceManager.GetObject("DockIndicator_PanelBottom", resourceCulture); @@ -123,6 +150,9 @@ namespace WeifenLuo.WinFormsUI.Docking { } } + /// + /// Поиск локализованного ресурса типа System.Drawing.Bitmap. + /// internal static System.Drawing.Bitmap DockIndicator_PanelBottom_Active { get { object obj = ResourceManager.GetObject("DockIndicator_PanelBottom_Active", resourceCulture); @@ -130,6 +160,9 @@ namespace WeifenLuo.WinFormsUI.Docking { } } + /// + /// Поиск локализованного ресурса типа System.Drawing.Bitmap. + /// internal static System.Drawing.Bitmap DockIndicator_PanelFill { get { object obj = ResourceManager.GetObject("DockIndicator_PanelFill", resourceCulture); @@ -137,6 +170,9 @@ namespace WeifenLuo.WinFormsUI.Docking { } } + /// + /// Поиск локализованного ресурса типа System.Drawing.Bitmap. + /// internal static System.Drawing.Bitmap DockIndicator_PanelFill_Active { get { object obj = ResourceManager.GetObject("DockIndicator_PanelFill_Active", resourceCulture); @@ -144,6 +180,9 @@ namespace WeifenLuo.WinFormsUI.Docking { } } + /// + /// Поиск локализованного ресурса типа System.Drawing.Bitmap. + /// internal static System.Drawing.Bitmap DockIndicator_PanelLeft { get { object obj = ResourceManager.GetObject("DockIndicator_PanelLeft", resourceCulture); @@ -151,6 +190,9 @@ namespace WeifenLuo.WinFormsUI.Docking { } } + /// + /// Поиск локализованного ресурса типа System.Drawing.Bitmap. + /// internal static System.Drawing.Bitmap DockIndicator_PanelLeft_Active { get { object obj = ResourceManager.GetObject("DockIndicator_PanelLeft_Active", resourceCulture); @@ -158,6 +200,9 @@ namespace WeifenLuo.WinFormsUI.Docking { } } + /// + /// Поиск локализованного ресурса типа System.Drawing.Bitmap. + /// internal static System.Drawing.Bitmap DockIndicator_PanelRight { get { object obj = ResourceManager.GetObject("DockIndicator_PanelRight", resourceCulture); @@ -165,6 +210,9 @@ namespace WeifenLuo.WinFormsUI.Docking { } } + /// + /// Поиск локализованного ресурса типа System.Drawing.Bitmap. + /// internal static System.Drawing.Bitmap DockIndicator_PanelRight_Active { get { object obj = ResourceManager.GetObject("DockIndicator_PanelRight_Active", resourceCulture); @@ -172,6 +220,9 @@ namespace WeifenLuo.WinFormsUI.Docking { } } + /// + /// Поиск локализованного ресурса типа System.Drawing.Bitmap. + /// internal static System.Drawing.Bitmap DockIndicator_PanelTop { get { object obj = ResourceManager.GetObject("DockIndicator_PanelTop", resourceCulture); @@ -179,6 +230,9 @@ namespace WeifenLuo.WinFormsUI.Docking { } } + /// + /// Поиск локализованного ресурса типа System.Drawing.Bitmap. + /// internal static System.Drawing.Bitmap DockIndicator_PanelTop_Active { get { object obj = ResourceManager.GetObject("DockIndicator_PanelTop_Active", resourceCulture); @@ -186,6 +240,9 @@ namespace WeifenLuo.WinFormsUI.Docking { } } + /// + /// Поиск локализованного ресурса типа System.Drawing.Bitmap. + /// internal static System.Drawing.Bitmap DockPane_AutoHide { get { object obj = ResourceManager.GetObject("DockPane_AutoHide", resourceCulture); @@ -193,6 +250,9 @@ namespace WeifenLuo.WinFormsUI.Docking { } } + /// + /// Поиск локализованного ресурса типа System.Drawing.Bitmap. + /// internal static System.Drawing.Bitmap DockPane_Close { get { object obj = ResourceManager.GetObject("DockPane_Close", resourceCulture); @@ -200,6 +260,19 @@ namespace WeifenLuo.WinFormsUI.Docking { } } + /// + /// Поиск локализованного ресурса типа System.Drawing.Bitmap. + /// + internal static System.Drawing.Bitmap DockPane_Close32 { + get { + object obj = ResourceManager.GetObject("DockPane_Close32", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + + /// + /// Поиск локализованного ресурса типа System.Drawing.Bitmap. + /// internal static System.Drawing.Bitmap DockPane_Dock { get { object obj = ResourceManager.GetObject("DockPane_Dock", resourceCulture); @@ -207,6 +280,9 @@ namespace WeifenLuo.WinFormsUI.Docking { } } + /// + /// Поиск локализованного ресурса типа System.Drawing.Bitmap. + /// internal static System.Drawing.Bitmap DockPane_Option { get { object obj = ResourceManager.GetObject("DockPane_Option", resourceCulture); @@ -214,6 +290,19 @@ namespace WeifenLuo.WinFormsUI.Docking { } } + /// + /// Поиск локализованного ресурса типа System.Drawing.Bitmap. + /// + internal static System.Drawing.Bitmap DockPane_Option32 { + get { + object obj = ResourceManager.GetObject("DockPane_Option32", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + + /// + /// Поиск локализованного ресурса типа System.Drawing.Bitmap. + /// internal static System.Drawing.Bitmap DockPane_OptionOverflow { get { object obj = ResourceManager.GetObject("DockPane_OptionOverflow", resourceCulture); diff --git a/WeifenLuo/WinFormsUI/Docking/Resources.resx b/WeifenLuo/WinFormsUI/Docking/Resources.resx index 0f8b14629..cd51b8f0a 100644 --- a/WeifenLuo/WinFormsUI/Docking/Resources.resx +++ b/WeifenLuo/WinFormsUI/Docking/Resources.resx @@ -112,12 +112,12 @@ 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 - + Resources\DockIndicator_PaneDiamond.bmp;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a @@ -178,12 +178,18 @@ Resources\DockPane_Close.bmp;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + Resources\Close_32.bmp;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + Resources\DockPane_Dock.bmp;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a Resources\DockPane_Option.bmp;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + Resources\DockPane_Option32.bmp;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + Resources\DockPane_OptionOverflow.bmp;System.Drawing.Bitmap, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a diff --git a/WeifenLuo/WinFormsUI/Docking/Resources/DockPane_Close.bmp b/WeifenLuo/WinFormsUI/Docking/Resources/DockPane_Close.bmp index a7748a672..af4bf59f1 100644 Binary files a/WeifenLuo/WinFormsUI/Docking/Resources/DockPane_Close.bmp and b/WeifenLuo/WinFormsUI/Docking/Resources/DockPane_Close.bmp differ diff --git a/WeifenLuo/WinFormsUI/Docking/VS2005DockPaneCaption.cs b/WeifenLuo/WinFormsUI/Docking/VS2005DockPaneCaption.cs index 72510ad47..2f965e600 100644 --- a/WeifenLuo/WinFormsUI/Docking/VS2005DockPaneCaption.cs +++ b/WeifenLuo/WinFormsUI/Docking/VS2005DockPaneCaption.cs @@ -7,7 +7,21 @@ using System.Windows.Forms.VisualStyles; namespace WeifenLuo.WinFormsUI.Docking { - internal class VS2005DockPaneCaption : DockPaneCaptionBase + public static class ScreenScale + { + private static double scale = -1; + public static double Calc() + { + if (scale > 0) + return scale; + var dpiXProperty = typeof(System.Windows.SystemParameters).GetProperty("DpiX", System.Reflection.BindingFlags.NonPublic | System.Reflection.BindingFlags.Static); + var dpiX = (int)dpiXProperty.GetValue(null, null); + scale = (double)dpiX / 96; + return scale; + } + } + + internal class VS2005DockPaneCaption : DockPaneCaptionBase { private sealed class InertButton : InertButtonBase { @@ -66,7 +80,12 @@ namespace WeifenLuo.WinFormsUI.Docking get { if (_imageButtonClose == null) - _imageButtonClose = Resources.DockPane_Close; + { + var sc = ScreenScale.Calc(); + if (sc >= 1.99) + _imageButtonClose = Resources.DockPane_Close32; + else _imageButtonClose = Resources.DockPane_Close; + } return _imageButtonClose; } @@ -135,8 +154,14 @@ namespace WeifenLuo.WinFormsUI.Docking { get { + if (_imageButtonOptions == null) - _imageButtonOptions = Resources.DockPane_Option; + { + var sc = ScreenScale.Calc(); + if (sc >= 1.99) + _imageButtonOptions = Resources.DockPane_Option32; + else _imageButtonOptions = Resources.DockPane_Option; + } return _imageButtonOptions; } diff --git a/WeifenLuo/WinFormsUI/Docking/VS2005DockPaneStrip.cs b/WeifenLuo/WinFormsUI/Docking/VS2005DockPaneStrip.cs index aa7b090be..6b9623af5 100644 --- a/WeifenLuo/WinFormsUI/Docking/VS2005DockPaneStrip.cs +++ b/WeifenLuo/WinFormsUI/Docking/VS2005DockPaneStrip.cs @@ -130,7 +130,12 @@ namespace WeifenLuo.WinFormsUI.Docking get { if (_imageButtonClose == null) - _imageButtonClose = Resources.DockPane_Close; + { + var sc = ScreenScale.Calc(); + if (sc >= 1.99) + _imageButtonClose = Resources.DockPane_Close32; + else _imageButtonClose = Resources.DockPane_Close; + } return _imageButtonClose; } @@ -159,7 +164,12 @@ namespace WeifenLuo.WinFormsUI.Docking get { if (_imageButtonWindowList == null) - _imageButtonWindowList = Resources.DockPane_Option; + { + var sc = ScreenScale.Calc(); + if (sc >= 1.99) + _imageButtonWindowList = Resources.DockPane_Option32; + else _imageButtonWindowList = Resources.DockPane_Option; + } return _imageButtonWindowList; } @@ -171,7 +181,9 @@ namespace WeifenLuo.WinFormsUI.Docking get { if (_imageButtonWindowListOverflow == null) + { _imageButtonWindowListOverflow = Resources.DockPane_OptionOverflow; + } return _imageButtonWindowListOverflow; } @@ -1257,7 +1269,7 @@ namespace WeifenLuo.WinFormsUI.Docking base.OnLayout (levent); } - + private void Close_Click(object sender, EventArgs e) { DockPane.CloseActiveContent(); diff --git a/WeifenLuo/WinFormsUI/WinFormsUI.csproj b/WeifenLuo/WinFormsUI/WinFormsUI.csproj index cd7a3faff..973fb9ab6 100644 --- a/WeifenLuo/WinFormsUI/WinFormsUI.csproj +++ b/WeifenLuo/WinFormsUI/WinFormsUI.csproj @@ -47,6 +47,7 @@ 4096 + 3.5 @@ -107,13 +108,9 @@ Component - - Component - + - - Component - + Component @@ -217,6 +214,13 @@ + + + + + + +