Blame view
sources/RoboforkApp/ScheduleCanvas.cs
1.05 KB
|
d55d921a3
|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 |
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Media;
using System.Windows.Shapes;
namespace RoboforkApp
{
public class ScheduleCanvas : Canvas
{
// Add variable for Set Schedule
private Path pScheduleNode = new Path();
private Path pScheduleLine = new Path();
private GeometryGroup gGrpScheduleNode = new GeometryGroup();
private GeometryGroup gGrpScheduleLine = new GeometryGroup();
public void DrawRoute(List<ucNode> listNode)
{
//Update after
}
private void CreateNode(Point point, int indexNode)
{
ucNode _ucNode = new ucNode();
_ucNode.btnWidth = 20.0;
_ucNode.btnHeight = 20.0;
_ucNode.txtNode = indexNode.ToString();
Canvas.SetLeft(_ucNode, point.X);
Canvas.SetTop(_ucNode, point.Y);
this.Children.Add(_ucNode);
}
}
}
|