Пример #1
0
        /// <summary>
        /// Fires on new RenderTreeMessage recieved
        /// </summary>
        /// <param name="msg"></param>
        public void OnRenderTreeMessage(RenderTreeMessage msg)
        {
            var treeToRender = msg.Tree;
            double treeToRenderCoordinateX = treeToRender.CoordinateX;
            double treeToRenderCoordinateY = treeToRender.CoordinateY;

            PlantTreeOnTheHill(treeToRender);
            //PlantTreeOnTheHill(treeToRenderCoordinateX, treeToRenderCoordinateY);
        }
        public void AddNewTreeToList(TreeViewModel treeVieModel)
        {
            Trees.Add(treeVieModel);

            var newTree = treeVieModel;
            RenderTreeMessage renderTreeMessage = new RenderTreeMessage(newTree);
            Messenger.Default.Send<RenderTreeMessage>(renderTreeMessage);
        }