Browse Source

Stylecops

pull/4/head
Steven Kirk 12 years ago
parent
commit
4db7c84680
  1. 4
      Perspex.Direct2D1/Media/GeometryImpl.cs
  2. 4
      Perspex.Direct2D1/Media/StreamGeometryImpl.cs
  3. 56
      Perspex/Media/PathMarkupParser.cs
  4. 10
      Perspex/Media/StreamGeometry.cs
  5. 2
      Perspex/Shapes/Path.cs
  6. 10
      Perspex/Shapes/Shape.cs
  7. 2
      Perspex/Themes/Default/CheckBoxStyle.cs

4
Perspex.Direct2D1/Media/GeometryImpl.cs

@ -1,6 +1,6 @@
// ----------------------------------------------------------------------- // -----------------------------------------------------------------------
// <copyright file="GeometryImpl.cs" company="Tricycle"> // <copyright file="GeometryImpl.cs" company="Steven Kirk">
// Copyright 2014 Tricycle. All rights reserved. // Copyright 2014 MIT Licence. See licence.md for more information.
// </copyright> // </copyright>
// ----------------------------------------------------------------------- // -----------------------------------------------------------------------

4
Perspex.Direct2D1/Media/StreamGeometryImpl.cs

@ -1,6 +1,6 @@
// ----------------------------------------------------------------------- // -----------------------------------------------------------------------
// <copyright file="Direct2DStreamGeometry.cs" company="Tricycle"> // <copyright file="Direct2DStreamGeometry.cs" company="Steven Kirk">
// Copyright 2014 Tricycle. All rights reserved. // Copyright 2014 MIT Licence. See licence.md for more information.
// </copyright> // </copyright>
// ----------------------------------------------------------------------- // -----------------------------------------------------------------------

56
Perspex/Media/PathMarkupParser.cs

@ -96,34 +96,34 @@ namespace Perspex.Media
this.context.LineTo(point); this.context.LineTo(point);
break; break;
//case Command.HorizontalLine: ////case Command.HorizontalLine:
// point.X = ReadDouble(reader); //// point.X = ReadDouble(reader);
// this.context.LineTo(point, true, false); //// this.context.LineTo(point, true, false);
// break; //// break;
//case Command.HorizontalLineRelative: ////case Command.HorizontalLineRelative:
// point.X += ReadDouble(reader); //// point.X += ReadDouble(reader);
// this.context.LineTo(point, true, false); //// this.context.LineTo(point, true, false);
// break; //// break;
//case Command.VerticalLine: ////case Command.VerticalLine:
// point.Y = ReadDouble(reader); //// point.Y = ReadDouble(reader);
// this.context.LineTo(point, true, false); //// this.context.LineTo(point, true, false);
// break; //// break;
//case Command.VerticalLineRelative: ////case Command.VerticalLineRelative:
// point.Y += ReadDouble(reader); //// point.Y += ReadDouble(reader);
// this.context.LineTo(point, true, false); //// this.context.LineTo(point, true, false);
// break; //// break;
//case Command.CubicBezierCurve: ////case Command.CubicBezierCurve:
//{ ////{
// Point point1 = ReadPoint(reader); //// Point point1 = ReadPoint(reader);
// Point point2 = ReadPoint(reader); //// Point point2 = ReadPoint(reader);
// point = ReadPoint(reader); //// point = ReadPoint(reader);
// this.context.BezierTo(point1, point2, point, true, false); //// this.context.BezierTo(point1, point2, point, true, false);
// break; //// break;
//} ////}
case Command.Close: case Command.Close:
this.context.EndFigure(true); this.context.EndFigure(true);

10
Perspex/Media/StreamGeometry.cs

@ -16,6 +16,11 @@ namespace Perspex.Media
this.PlatformImpl = Locator.Current.GetService<IStreamGeometryImpl>(); this.PlatformImpl = Locator.Current.GetService<IStreamGeometryImpl>();
} }
public override Rect Bounds
{
get { return this.PlatformImpl.Bounds; }
}
public static StreamGeometry Parse(string s) public static StreamGeometry Parse(string s)
{ {
StreamGeometry result = new StreamGeometry(); StreamGeometry result = new StreamGeometry();
@ -28,11 +33,6 @@ namespace Perspex.Media
} }
} }
public override Rect Bounds
{
get { return this.PlatformImpl.Bounds; }
}
public StreamGeometryContext Open() public StreamGeometryContext Open()
{ {
return new StreamGeometryContext(((IStreamGeometryImpl)this.PlatformImpl).Open()); return new StreamGeometryContext(((IStreamGeometryImpl)this.PlatformImpl).Open());

2
Perspex/Shapes/Path.cs

@ -11,7 +11,7 @@ namespace Perspex.Shapes
public class Path : Shape public class Path : Shape
{ {
public PerspexProperty<Geometry> DataProperty = public static readonly PerspexProperty<Geometry> DataProperty =
PerspexProperty.Register<Path, Geometry>("Data"); PerspexProperty.Register<Path, Geometry>("Data");
public Geometry Data public Geometry Data

10
Perspex/Shapes/Shape.cs

@ -1,5 +1,5 @@
// ----------------------------------------------------------------------- // -----------------------------------------------------------------------
// <copyright file="Application.cs" company="Steven Kirk"> // <copyright file="Shape.cs" company="Steven Kirk">
// Copyright 2014 MIT Licence. See licence.md for more information. // Copyright 2014 MIT Licence. See licence.md for more information.
// </copyright> // </copyright>
// ----------------------------------------------------------------------- // -----------------------------------------------------------------------
@ -12,16 +12,16 @@ namespace Perspex.Shapes
public abstract class Shape : Control public abstract class Shape : Control
{ {
public PerspexProperty<Brush> FillProperty = public static readonly PerspexProperty<Brush> FillProperty =
PerspexProperty.Register<Shape, Brush>("Fill"); PerspexProperty.Register<Shape, Brush>("Fill");
public PerspexProperty<Stretch> StretchProperty = public static readonly PerspexProperty<Stretch> StretchProperty =
PerspexProperty.Register<Shape, Stretch>("Stretch"); PerspexProperty.Register<Shape, Stretch>("Stretch");
public PerspexProperty<Brush> StrokeProperty = public static readonly PerspexProperty<Brush> StrokeProperty =
PerspexProperty.Register<Shape, Brush>("Stroke"); PerspexProperty.Register<Shape, Brush>("Stroke");
public PerspexProperty<double> StrokeThicknessProperty = public static readonly PerspexProperty<double> StrokeThicknessProperty =
PerspexProperty.Register<Shape, double>("StrokeThickness"); PerspexProperty.Register<Shape, double>("StrokeThickness");
public abstract Geometry DefiningGeometry public abstract Geometry DefiningGeometry

2
Perspex/Themes/Default/CheckBoxStyle.cs

@ -1,5 +1,5 @@
// ----------------------------------------------------------------------- // -----------------------------------------------------------------------
// <copyright file="ButtonStyle.cs" company="Steven Kirk"> // <copyright file="CheckBoxStyle.cs" company="Steven Kirk">
// Copyright 2014 MIT Licence. See licence.md for more information. // Copyright 2014 MIT Licence. See licence.md for more information.
// </copyright> // </copyright>
// ----------------------------------------------------------------------- // -----------------------------------------------------------------------

Loading…
Cancel
Save