Halyri - Häke  0.9
 All Classes Namespaces Files Functions Variables Enumerations Enumerator Properties Events
GraphClass.Graph Class Reference

Adds graph to given grid. user can add points, set bytespersecond and scroll to end. More...

Public Member Functions

 Graph (Grid grid)
 Makes graphcanvas to given grid with black background and initializes green line that connetcts points that are added by addpoint method. More...
 
void setBytesPerSecond (int bps)
 Sets BytesPerSecond. More...
 
void AddPoint (int y)
 Adds point to graph. More...
 
void ScrollToEnd ()
 Scrolls to end of the graph. More...
 

Private Attributes

const double ScaleRate = 1.1
 

Static Private Attributes

static Canvas GraphCanvas
 
static ScrollViewer GraphContainer
 
static ScaleTransform GraphScaleTransform
 
static Polyline GraphLine
 
static int GraphLineX = 0
 
static Color GraphColor = Color.FromArgb(200, 255, 187, 187)
 
static Color GraphSecondColor = Color.FromArgb(150, 255, 229, 229)
 
static SolidColorBrush color1 = new SolidColorBrush(GraphColor)
 
static SolidColorBrush color2 = new SolidColorBrush(GraphSecondColor)
 
static int scale = 1000
 
static int BytesPerSecond = 50
 

Detailed Description

Adds graph to given grid. user can add points, set bytespersecond and scroll to end.

<author>Niko Mononen</author>

Constructor & Destructor Documentation

GraphClass.Graph.Graph ( Grid  grid)

Makes graphcanvas to given grid with black background and initializes green line that connetcts points that are added by addpoint method.

Parameters
gridGrid where you want this graph

Member Function Documentation

void GraphClass.Graph.AddPoint ( int  y)

Adds point to graph.

Parameters
yy-point of the graph
void GraphClass.Graph.ScrollToEnd ( )

Scrolls to end of the graph.

void GraphClass.Graph.setBytesPerSecond ( int  bps)

Sets BytesPerSecond.

Parameters
bpsBytes per second

Member Data Documentation

int GraphClass.Graph.BytesPerSecond = 50
staticprivate
SolidColorBrush GraphClass.Graph.color1 = new SolidColorBrush(GraphColor)
staticprivate
SolidColorBrush GraphClass.Graph.color2 = new SolidColorBrush(GraphSecondColor)
staticprivate
Canvas GraphClass.Graph.GraphCanvas
staticprivate
Color GraphClass.Graph.GraphColor = Color.FromArgb(200, 255, 187, 187)
staticprivate
ScrollViewer GraphClass.Graph.GraphContainer
staticprivate
Polyline GraphClass.Graph.GraphLine
staticprivate
int GraphClass.Graph.GraphLineX = 0
staticprivate
ScaleTransform GraphClass.Graph.GraphScaleTransform
staticprivate
Color GraphClass.Graph.GraphSecondColor = Color.FromArgb(150, 255, 229, 229)
staticprivate
int GraphClass.Graph.scale = 1000
staticprivate
const double GraphClass.Graph.ScaleRate = 1.1
private

The documentation for this class was generated from the following file: