Пример #1
0
        void map_Call_Tapped(object sender, TappedRoutedEventArgs e)
        {
            Editor_Call call = sender as Editor_Call;

            C_Position.Text = C_Root.Children.IndexOf(call as UIElement).ToString() + "/ " + call.IndexLeft + ", " + call.IndexTop;
            call.ShowImage(PointerIndex);
        }
Пример #2
0
        public void CreateCalls()
        {
            for (int i = 0; i < C_Root.Width / 50; i++)
            {
                for (int j = 0; j < C_Root.Height / 50; j++)
                {
                    Editor_Call map_Call = new Editor_Call()
                    {
                        IndexLeft = i,
                        IndexTop  = j
                    };
                    map_Call.Tapped += map_Call_Tapped;
                    ///Это для размещения блока стены(не пробиваймые блоки)
                    if (i % 2 != 0 && j % 2 != 0)
                    {
                        map_Call.ShowImage(0);
                    }
                    Canvas.SetLeft(map_Call, i * 50);
                    Canvas.SetTop(map_Call, j * 50);

                    C_Root.Children.Add(map_Call);
                }
            }
        }