Exemple #1
0
        public Shape2d Load(Stream input)
        {
            var reader = new StreamReader(input);

            string[]       parsedString = translator(reader);
            Shape2dFactory shapeMaker   = new Shape2dFactory();
            Shape2d        myShape      = shapeMaker.GetShape2D(parsedString);

            return(myShape);
        }
Exemple #2
0
 public override void Add(Shape2d _shape2d)
 {
     if (_shape2d == this)
     {
         return;
     }
     if (!myShapes.Contains(_shape2d))
     {
         myShapes.Add(_shape2d);
     }
 }
Exemple #3
0
        public MemoryStream Save(Shape2d _myShape)
        {
            UnicodeEncoding uniEncoding = new UnicodeEncoding();

            string scriptString = _myShape.GetData();

            byte[] firstString = uniEncoding.GetBytes(scriptString);

            MemoryStream output = new MemoryStream(100);

            output.Write(firstString, 0, firstString.Length);
            return(output);
        }
Exemple #4
0
 public override void Remove(Shape2d _shape2d)
 {
     //Operation not permitted since this is a leaf node.
 }
Exemple #5
0
 public override void Remove(Shape2d _shape2d)
 {
     myShapes.Remove(_shape2d);
 }
Exemple #6
0
 public override void Remove(Shape2d _shape2d)
 {
     throw new NotImplementedException();
 }
Exemple #7
0
 public override void Add(Shape2d _shape2d)
 {
     //Not used
 }
Exemple #8
0
 public abstract void Remove(Shape2d _shape2d);
Exemple #9
0
 public abstract void Add(Shape2d _shape2d);