Пример #1
0
        public void AddObject(string Name, TypeObject Type)
        {
            double CreateObjectCoordinateX = ((this.ActualWidth / 2) - CoordinateMap.X) / WidthMap;
            double CreateObjectCoordinateY = ((this.ActualHeight / 2) - CoordinateMap.Y) / HeightMap;

            SourceElements.Add(new MapObject(CreateObjectCoordinateX, CreateObjectCoordinateY, Type));
            SourceElements[SourceElements.Count - 1].Name = Name;
            ItemSelection = SourceElements.Count - 1;
            (Application.Current.MainWindow as MainWindow).EnableBlur = false;
        }
Пример #2
0
 public void  AddObject(string Name, TypeObject Type)
 {
     ArrayMapObjects.Add(new MapObject(0.1, 0.1, Type));
     ArrayMapObjects[ArrayMapObjects.Count - 1].Name           = Name;
     (Application.Current.MainWindow as MainWindow).EnableBlur = false;
 }
Пример #3
0
 public MapObject(double XCoordinate, double YCoordinate, TypeObject TypeObject)
 {
     this.XCoordinate = XCoordinate;
     this.YCoordinate = YCoordinate;
     this.TypeObject  = TypeObject;
 }