Esempio n. 1
0
 public Hexagon(ClusterElement center, List <ClusterElement> list, string fileName)
 {
     FileName      = fileName;
     f_AverageSize = list.Average(x => x.Diametr);
     f_Center      = center;
     _             = list.Remove(center);
     f_List        = new List <ClusterElement>();
     f_List.AddRange(list);
 }
Esempio n. 2
0
        private void DrawMarker(ClusterElement element, Color color)
        {
            var wh     = ((element.Element.Size.Width + element.Element.Size.Height) / 2) * f_Ratio;
            var uiElem = new Ellipse
            {
                Width           = wh,
                Height          = wh,
                StrokeThickness = 4,
                Stroke          = new SolidColorBrush
                {
                    Color = color
                }
            };

            Canvas.SetLeft(uiElem, (element.Element.Center.X - element.Element.Size.Width / 2) * f_Ratio);
            Canvas.SetTop(uiElem, (element.Element.Center.Y - element.Element.Size.Height / 2) * f_Ratio);

            ObjectCanvas.Children.Add(uiElem);
        }
Esempio n. 3
0
 public void Add(ClusterElement el)
 {
     f_Cluster.Add(el);
 }
Esempio n. 4
0
 public void CreateHexagon(ClusterElement el)
 {
     Hexagon = new Hexagon(el, f_Cluster.Get7(el.Element), f_FileName);
 }