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 2014 Tricycle. All rights reserved.
// <copyright file="GeometryImpl.cs" company="Steven Kirk">
// Copyright 2014 MIT Licence. See licence.md for more information.
// </copyright>
// -----------------------------------------------------------------------

4
Perspex.Direct2D1/Media/StreamGeometryImpl.cs

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

56
Perspex/Media/PathMarkupParser.cs

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

10
Perspex/Media/StreamGeometry.cs

@ -16,6 +16,11 @@ namespace Perspex.Media
this.PlatformImpl = Locator.Current.GetService<IStreamGeometryImpl>();
}
public override Rect Bounds
{
get { return this.PlatformImpl.Bounds; }
}
public static StreamGeometry Parse(string s)
{
StreamGeometry result = new StreamGeometry();
@ -28,11 +33,6 @@ namespace Perspex.Media
}
}
public override Rect Bounds
{
get { return this.PlatformImpl.Bounds; }
}
public StreamGeometryContext 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 PerspexProperty<Geometry> DataProperty =
public static readonly PerspexProperty<Geometry> DataProperty =
PerspexProperty.Register<Path, 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>
// -----------------------------------------------------------------------
@ -12,16 +12,16 @@ namespace Perspex.Shapes
public abstract class Shape : Control
{
public PerspexProperty<Brush> FillProperty =
public static readonly PerspexProperty<Brush> FillProperty =
PerspexProperty.Register<Shape, Brush>("Fill");
public PerspexProperty<Stretch> StretchProperty =
public static readonly PerspexProperty<Stretch> StretchProperty =
PerspexProperty.Register<Shape, Stretch>("Stretch");
public PerspexProperty<Brush> StrokeProperty =
public static readonly PerspexProperty<Brush> StrokeProperty =
PerspexProperty.Register<Shape, Brush>("Stroke");
public PerspexProperty<double> StrokeThicknessProperty =
public static readonly PerspexProperty<double> StrokeThicknessProperty =
PerspexProperty.Register<Shape, double>("StrokeThickness");
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>
// -----------------------------------------------------------------------

Loading…
Cancel
Save