Ejemplo n.º 1
0
        public static Coordinats getCoordinats(int row, int column)
        {
            Coordinats coordinats = new Coordinats();

            coordinats.left = 10 + (column - 1) * 180;
            coordinats.top  = 40 + (row - 1) * 50;
            return(coordinats);
        }
Ejemplo n.º 2
0
        public static Grid create_Router(Router router_, Coordinats coordinats)
        {
            Grid grid = new Grid();

            grid.Name = "grid" + router_.Name;
            grid.HorizontalAlignment = HorizontalAlignment.Left;
            grid.VerticalAlignment   = VerticalAlignment.Top;
            grid.Height = 30;
            grid.Width  = 127;
            Canvas.SetLeft(grid, coordinats.left);
            Canvas.SetTop(grid, coordinats.top);
            grid.Effect = create_shadow();


            grid.Children.Add(create_btn(router_.Name, router_));
            grid.Children.Add(create_lbl(router_.Name, ""));
            grid.Children.Add(create_ellipse(router_.Name));
            return(grid);
        }