private void ObjectName_TextChanged(object sender, EventArgs e)
        {
            View.Properties props = View.Editor.GetPropertiesWindow();

            if (_currentGameObject != null)
            {
                _currentGameObject.Name = props.ObjectName.Text;
            }
        }
        private void TxtAngle_TextChanged(object sender, EventArgs e)
        {
            View.Properties props = View.Editor.GetPropertiesWindow();

            float newValue;

            if (Single.TryParse(props.txtAngle.Text, out newValue))
            {
                CurrentGameObject.Rotation = newValue;
            }
        }
        public MapEditorPresenter(IMapEditorView view, Scene scene)
        {
            _view = view;

            _view.OnObjectCreated    += OnObjectCreated;
            _view.OnViewportDraw     += OnViewportDraw;
            _view.OnCameraScroll     += OnCameraScroll;
            _view.OnCameraScrollStop += OnCameraScrollStop;
            _view.OnLeftClick        += OnViewportLeftClick;

            View.Properties props = View.Editor.GetPropertiesWindow();
            props.Position.BindToVector2(CurrentGameObject.Position);
            props.ObjectScale.BindToVector2(CurrentGameObject.Scale);
            props.ObjectName.TextChanged += ObjectName_TextChanged;
            props.txtAngle.TextChanged   += TxtAngle_TextChanged;

            _renderer = new MapRenderer(Scene.Current, CurrentGameObject);

            View.Layers layers = View.Editor.GetLayersWindow();
            layers.GetLayersList().CheckChanged += MapEditorPresenter_CheckChanged;
        }