| | |
| | | using HMI.Base; |
| | | using HMI.UI.DpUtil; |
| | | using System; |
| | | using System.Collections.ObjectModel; |
| | | using System.Globalization; |
| | |
| | | children[i] = border; |
| | | uniform.Children.Add(border); |
| | | } |
| | | UniformGridHelper.RefreshGridInnerBorder(uniform); |
| | | } |
| | | |
| | | public void Refresh(int rows, int columns) |
| | |
| | | public void DrawPoints(int[][] points) |
| | | { |
| | | var temp = new ObservableCollection<bool>(new bool[rows * columns]); |
| | | foreach (int[] point in points) |
| | | for (int i = 0; i < points.Length; i++) |
| | | { |
| | | int[] point = points[i]; |
| | | int index = point[1] * columns + point[0]; |
| | | //children[point[0]][point[1]].Background = Brushes.Green; |
| | | temp[point[1] * columns + point[0]] = true; |
| | | temp[index] = true; |
| | | } |
| | | Values = temp; |
| | | } |
| | | |
| | | public void DrawNewPoints(int[][] points) |
| | | { |
| | | var temp = Values == null ? |
| | | new ObservableCollection<bool>(new bool[rows * columns]) : |
| | | new ObservableCollection<bool>(Values); |
| | | for (int i = 0; i < points.Length; i++) |
| | | { |
| | | int[] point = points[i]; |
| | | if (point == null) |
| | | { |
| | | continue; |
| | | } |
| | | int index = point[1] * columns + point[0]; |
| | | //children[point[0]][point[1]].Background = Brushes.Green; |
| | | temp[index] = true; |
| | | } |
| | | Values = temp; |
| | | } |