diff --git a/Configuration/GlobalAssemblyInfo.cs b/Configuration/GlobalAssemblyInfo.cs index f7309eed0..178a97939 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 = "4"; public const string Build = "2"; - public const string Revision = "2000"; + public const string Revision = "2001"; 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 55cb206c7..833a5fc8a 100644 --- a/Configuration/Version.defs +++ b/Configuration/Version.defs @@ -1,4 +1,4 @@ -%MINOR%=4 -%REVISION%=2000 %COREVERSION%=2 +%REVISION%=2001 +%MINOR%=4 %MAJOR%=3 diff --git a/ReleaseGenerators/PascalABCNET_version.nsh b/ReleaseGenerators/PascalABCNET_version.nsh index 68ba7c89f..1685ea509 100644 --- a/ReleaseGenerators/PascalABCNET_version.nsh +++ b/ReleaseGenerators/PascalABCNET_version.nsh @@ -1 +1 @@ -!define VERSION '3.4.2.2000' +!define VERSION '3.4.2.2001' diff --git a/VisualPascalABCNET/_ABC13.ico b/VisualPascalABCNET/_ABC13.ico new file mode 100644 index 000000000..d78e42962 Binary files /dev/null and b/VisualPascalABCNET/_ABC13.ico differ diff --git a/_NewAppIcons/_ABC13.ico b/_NewAppIcons/_ABC13.ico index 2d7c05e53..2cbcfd8fa 100644 Binary files a/_NewAppIcons/_ABC13.ico and b/_NewAppIcons/_ABC13.ico differ diff --git a/bin/Lib/Controls.pas b/bin/Lib/Controls.pas index 7e26b9a43..b7ca2c0ea 100644 --- a/bin/Lib/Controls.pas +++ b/bin/Lib/Controls.pas @@ -77,23 +77,31 @@ type TextLabelT = class(CommonControl) protected function b: GTextBlock := element as GTextBlock; - function GetText: string := InvokeString(()->b.Text); - procedure SetTextP(t: string) := b.Text := t; - procedure SetText(t: string) := Invoke(SetTextP,t); procedure CreateP(Txt: string); begin - element := new GTextBlock; + var tb := new GTextBlock; + element := tb; //element.Margin := new Thickness(0,0,0,8); //element.Margin := new Thickness(5,5,5,0); Text := Txt; ActivePanel.Children.Add(b); end; - public - constructor Create(Txt: string); + procedure CreatePXY(x,y: real; Txt: string); begin - Invoke(CreateP,Txt); + var tb := new GTextBlock; + element := tb; + tb.Background := new SolidColorBrush(Colors.White); + tb.FontSize := 20; + tb.Opacity := 0.7; + Canvas.SetLeft(element,x); + Canvas.SetTop(element,y); + Text := Txt; + ActivePanel.Children.Add(b); end; - property Text: string read GetText write SetText; + public + constructor Create(Txt: string) := Invoke(CreateP,Txt); + constructor Create(x,y: real; Txt: string) := Invoke(CreatePXY,x,y,Txt); + property Text: string read InvokeString(()->b.Text) write Invoke(procedure(t: string) -> b.Text := t,value); end; ///!# @@ -241,16 +249,18 @@ type end; - function Button(Txt: string): ButtonT; - function TextLabel(Txt: string): TextLabelT; - function TextBox(Txt: string := ''; w: real := 0): TextBoxT; - function IntegerBox(w: real := 0): IntegerBoxT; - function Slider(min: real := 0; max: real := 10; val: real := 0): SliderT; - - procedure EmptyBlock(sz: integer := 16); +function Button(Txt: string): ButtonT; +function TextLabel(Txt: string): TextLabelT; +function TextLabel(x,y: real; Txt: string): TextLabelT; +function TextBox(Txt: string := ''; w: real := 0): TextBoxT; +function IntegerBox(w: real := 0): IntegerBoxT; +function Slider(min: real := 0; max: real := 10; val: real := 0): SliderT; + +procedure EmptyBlock(sz: integer := 16); implementation +uses GraphWPF; uses System.Windows; uses System.Windows.Controls; uses System.Windows.Controls.Primitives; @@ -314,6 +324,7 @@ procedure AddStatusBar(Height: real) := Invoke(AddStatusBarP,Height); function Button(Txt: string): ButtonT := ButtonT.Create(Txt); function TextLabel(Txt: string): TextLabelT := TextLabelT.Create(Txt); +function TextLabel(x,y: real; Txt: string): TextLabelT := TextLabelT.Create(x,y,Txt); function TextBox(Txt: string; w: real): TextBoxT := TextBoxT.Create(Txt,w); function IntegerBox(w: real): IntegerBoxT := IntegerBoxT.Create(w); function Slider(min,max,val: real): SliderT := SliderT.Create(min,max,val); @@ -325,6 +336,11 @@ begin e.Width:= sz; end; +procedure SetActivePanelInit; +begin + ActivePanel := MainWindow.MainPanel.Children[0] as Panel +end; begin + Invoke(SetActivePanelInit); end. \ No newline at end of file diff --git a/bin/Lib/GraphWPF.pas b/bin/Lib/GraphWPF.pas index 69c4e09f3..6fb4262a0 100644 --- a/bin/Lib/GraphWPF.pas +++ b/bin/Lib/GraphWPF.pas @@ -478,6 +478,11 @@ procedure AddBottomPanel(Height: real := 100; c: Color := Colors.LightGray); procedure AddStatusBar(Height: real := 24);} +{function GetDC: DrawingContext; +procedure ReleaseDC(dc: DrawingContext); +procedure FastDraw(d: DrawingContext->()); +procedure FastClear(var dc: DrawingContext);} + procedure __InitModule__; procedure __FinalizeModule__; @@ -551,6 +556,23 @@ begin end; end; +procedure FastDraw(d: DrawingContext->()); +begin + Invoke(()-> + begin + var dc := GetDC; + d(dc); + ReleaseDC(dc); + end); +end; + +procedure FastClear(var dc: DrawingContext); +begin + ReleaseDC(dc); + Window.Clear; + dc := GetDC; +end; + function GetDC(t: Transform): DrawingContext; begin var visual := new DrawingVisual(); @@ -1313,7 +1335,6 @@ begin FillRectangle(0,0,Window.Width,Window.Height,c) end; - procedure WindowTypeWPF.Clear := Invoke(WindowTypeClearP); procedure WindowTypeWPF.Clear(c: Color) := Invoke(WindowTypeClearPC,c);