This commit is contained in:
miks1965 2018-08-17 23:07:18 +03:00
parent 9737922704
commit be0b395f26
6 changed files with 34 additions and 19 deletions

View file

@ -15,7 +15,7 @@ internal static class RevisionClass
public const string Major = "3";
public const string Minor = "4";
public const string Build = "0";
public const string Revision = "1746";
public const string Revision = "1747";
public const string MainVersion = Major + "." + Minor;
public const string FullVersion = Major + "." + Minor + "." + Build + "." + Revision;

View file

@ -1,4 +1,4 @@
%MINOR%=4
%REVISION%=1746
%COREVERSION%=0
%REVISION%=1747
%MINOR%=4
%MAJOR%=3

View file

@ -1 +1 @@
!define VERSION '3.4.0.1746'
!define VERSION '3.4.0.1747'

View file

@ -156,7 +156,7 @@ namespace SyntaxVisitors.SugarVisitors
public override void visit(dot_question_node dqn)
{
var st = dqn.Parent;
while (!(st is statement) /*&& (st != null)*/)
while ((st != null) && !(st is statement))
st = st.Parent;
if (st == null)
throw new SyntaxVisitorError("?._CANNOT_BE_IN_THIS_CONTEXT", dqn.source_context);

View file

@ -0,0 +1,5 @@
var a := Arr(6,2,3);
var q := a?.Max;
begin
end.

View file

@ -189,7 +189,7 @@ type
begin
InitOb(x,y,w,h,o,SetWH);
Color := c;
BorderColor := Colors.Black;
//BorderColor := Colors.Black;
end;
procedure EF(value: GColor) := Element.Fill := new SolidColorBrush(Value);
procedure ES(value: GColor) := Element.Stroke := new SolidColorBrush(Value);
@ -395,6 +395,29 @@ type
function GetInternalGeometry: Geometry; override := new EllipseGeometry(Center,Width/2,Height/2);
end;
PolygonWPF = class(BoundedObjectWPF)
private
procedure InitOb2(pp: array of Point; c: GColor);
begin
var x1 := pp.Min(p->p.x);
var x2 := pp.Max(p->p.x);
var y1 := pp.Min(p->p.y);
var y2 := pp.Max(p->p.y);
var a := pp.Select(p->Pnt(p.x-x1,p.y-y1)).ToArray;
a.Println;
Println(x1,x2,y1,y2);
InitOb1(x1,x2,x2-x1,y2-y1,c,CreatePolygon(a));
end;
function CreatePolygon(pp: array of Point): Polygon;
begin
var p := new Polygon();
p.Points := new PointCollection(pp);
Result := p;
end;
public
constructor (pp: array of Point; c: GColor) := Invoke(InitOb2,pp,c);
end;
PictureWPF = class(ObjectWPF)
private
function CreateBitmapImage(fname: string) := new BitmapImage(new System.Uri(fname,System.UriKind.Relative));
@ -424,19 +447,6 @@ type
function GetInternalGeometry: Geometry; override := new RectangleGeometry(Rect(X,Y,Width,Height));
end;
{PolygonWPF = class(BoundedObjectWPF)
private
procedure InitOb2(c: GColor; pp: array of Point) := InitOb1(0,0,real.NaN,real.NaN,c,CreatePolygon(pp));
function CreatePolygon(pp: array of Point): Polygon;
begin
var p := new Polygon();
p.Points := new PointCollection(pp);
Result := p;
end;
public
constructor (pp: array of Point; c: GColor) := Invoke(InitOb2,c,pp);
end;}
/// Главное окно
var Window: WindowType;
/// Графическое окно