Exemplo n.º 1
0
        public static CircleSave FromCircle(FlatRedBall.Math.Geometry.Circle circle)
        {
            CircleSave circleSave = new CircleSave();
            circleSave.SetFrom(circle);

            return circleSave;
        }
Exemplo n.º 2
0
        public static CircleSave FromCircle(FlatRedBall.Math.Geometry.Circle circle)
        {
            CircleSave circleSave = new CircleSave();

            circleSave.SetFrom(circle);

            return(circleSave);
        }
Exemplo n.º 3
0
 public void AddCircleList(PositionedObjectList <Circle> circlesToAdd)
 {
     foreach (Circle circle in circlesToAdd)
     {
         CircleSave circleSave = CircleSave.FromCircle(circle);
         CircleSaves.Add(circleSave);
     }
 }
Exemplo n.º 4
0
        public NamedObjectSave CircleSaveToNamedObjectSave(CircleSave circle)
        {
            NamedObjectSave toReturn = new NamedObjectSave();

            toReturn.SourceType = SourceType.FlatRedBallType;
            toReturn.SourceClassType = "Circle";
            toReturn.InstanceName = circle.Name;

            AddVariablesForAllProperties(circle, toReturn);

            return toReturn;
        }
Exemplo n.º 5
0
        internal void Circle()
        {
            if (ArrowState.Self.CurrentArrowElementSave != null)
            {

                TextInputWindow tiw = new TextInputWindow();

                tiw.Text = "Enter new Circle name:";
                tiw.Result = "Circle";

                var result = tiw.ShowDialog();

                if (result.HasValue && result.Value)
                {
                    bool isInvalid = CheckAndShowMessageIfInvalid(tiw.Result);

                    if (!isInvalid)
                    {
                        CircleSave circleSave = new CircleSave();
                        circleSave.Radius = 16;
                        circleSave.Name = tiw.Result;

                        ArrowState.Self.CurrentArrowElementSave.Circles.Add(circleSave);

                        AfterAddLogic(ArrowState.Self.CurrentArrowElementSave, circleSave);
                    }
                }
            }

        }