public FractalControl(KIFSIteration parent)
        {
            InitializeComponent();

            _Parent = parent;

            RenderSwatches();
        }
示例#2
0
        public FractalControl(KIFSIteration parent)
        {
            InitializeComponent();

            _Parent = parent;

            RenderSwatches();
        }
示例#3
0
 public void LoadXML(XmlReader reader)
 {
     _FractalColours.Clear();
     _FractalIterations = new List <WooFractalIteration>();
     while (reader.NodeType != XmlNodeType.EndElement && reader.Read())
     {
         if (reader.NodeType == XmlNodeType.Element && reader.Name == "MATERIALSELECTION")
         {
             _MaterialSelection = new MaterialSelection();
             _MaterialSelection.LoadXML(reader);
         }
         if (reader.NodeType == XmlNodeType.Element && reader.Name == "RENDEROPTIONS")
         {
             _RenderOptions = new RenderOptions();
             _RenderOptions.LoadXML(reader);
         }
         if (reader.NodeType == XmlNodeType.Element && reader.Name == "FRACTALCOLOURS")
         {
             FractalGradient fractalColour = new FractalGradient();
             fractalColour.LoadXML(reader);
             _FractalColours.Add(fractalColour);
         }
         if (reader.NodeType == XmlNodeType.Element && reader.Name == "KIFSFRACTAL")
         {
             KIFSIteration fractalIteration = new KIFSIteration();
             fractalIteration.LoadXML(reader);
             _FractalIterations.Add(fractalIteration);
         }
         if (reader.NodeType == XmlNodeType.Element && reader.Name == "BULBFRACTAL")
         {
             MandelbulbIteration fractalIteration = new MandelbulbIteration();
             fractalIteration.LoadXML(reader);
             _FractalIterations.Add(fractalIteration);
         }
         if (reader.NodeType == XmlNodeType.Element && reader.Name == "BOXFRACTAL")
         {
             MandelboxIteration fractalIteration = new MandelboxIteration();
             fractalIteration.LoadXML(reader);
             _FractalIterations.Add(fractalIteration);
         }
         if (reader.NodeType == XmlNodeType.Element && reader.Name == "KLEINIANGROUP")
         {
             KleinianGroupIteration fractalIteration = new KleinianGroupIteration();
             fractalIteration.LoadXML(reader);
             _FractalIterations.Add(fractalIteration);
         }
         if (reader.NodeType == XmlNodeType.Element && reader.Name == "BOXFOLD")
         {
             BoxfoldIteration fractalIteration = new BoxfoldIteration();
             fractalIteration.LoadXML(reader);
             _FractalIterations.Add(fractalIteration);
         }
     }
     reader.Read();
 }
示例#4
0
 public void Load(string xml)
 {
     _FractalIterations = new List <WooFractalIteration>();
     using (XmlReader reader = XmlReader.Create(new StringReader(xml)))
     {
         while (reader.NodeType != XmlNodeType.EndElement && reader.Read())
         {
             if (reader.NodeType == XmlNodeType.Element && reader.Name == "RENDEROPTIONS")
             {
                 _RenderOptions = new RenderOptions();
                 _RenderOptions.LoadXML(reader);
             }
             if (reader.NodeType == XmlNodeType.Element && reader.Name == "FRACTALCOLOURS")
             {
                 _FractalColours = new FractalColours();
                 _FractalColours.LoadXML(reader);
             }
             if (reader.NodeType == XmlNodeType.Element && reader.Name == "KIFSFRACTAL")
             {
                 KIFSIteration fractalIteration = new KIFSIteration();
                 fractalIteration.LoadXML(reader);
                 _FractalIterations.Add(fractalIteration);
             }
             if (reader.NodeType == XmlNodeType.Element && reader.Name == "BULBFRACTAL")
             {
                 MandelbulbIteration fractalIteration = new MandelbulbIteration();
                 fractalIteration.LoadXML(reader);
                 _FractalIterations.Add(fractalIteration);
             }
             if (reader.NodeType == XmlNodeType.Element && reader.Name == "BOXFRACTAL")
             {
                 MandelboxIteration fractalIteration = new MandelboxIteration();
                 fractalIteration.LoadXML(reader);
                 _FractalIterations.Add(fractalIteration);
             }
         }
     }
 }
示例#5
0
 public void Load(string xml)
 {
     _FractalIterations = new List<WooFractalIteration>();
     using (XmlReader reader = XmlReader.Create(new StringReader(xml)))
     {
         while (reader.NodeType != XmlNodeType.EndElement && reader.Read())
         {
             if (reader.NodeType == XmlNodeType.Element && reader.Name == "RENDEROPTIONS")
             {
                 _RenderOptions = new RenderOptions();
                 _RenderOptions.LoadXML(reader);
             }
             if (reader.NodeType == XmlNodeType.Element && reader.Name == "FRACTALCOLOURS")
             {
                 _FractalColours = new FractalColours();
                 _FractalColours.LoadXML(reader);
             }
             if (reader.NodeType == XmlNodeType.Element && reader.Name == "KIFSFRACTAL")
             {
                 KIFSIteration fractalIteration = new KIFSIteration();
                 fractalIteration.LoadXML(reader);
                 _FractalIterations.Add(fractalIteration);
             }
             if (reader.NodeType == XmlNodeType.Element && reader.Name == "BULBFRACTAL")
             {
                 MandelbulbIteration fractalIteration = new MandelbulbIteration();
                 fractalIteration.LoadXML(reader);
                 _FractalIterations.Add(fractalIteration);
             }
             if (reader.NodeType == XmlNodeType.Element && reader.Name == "BOXFRACTAL")
             {
                 MandelboxIteration fractalIteration = new MandelboxIteration();
                 fractalIteration.LoadXML(reader);
                 _FractalIterations.Add(fractalIteration);
             }
         }
     }
 }