public AnimatedThrobber()
 {
     base.SetStyle(ControlStyles.OptimizedDoubleBuffer | ControlStyles.AllPaintingInWmPaint | ControlStyles.SupportsTransparentBackColor | ControlStyles.ResizeRedraw | ControlStyles.UserPaint, true);
     this.Renderer = new ThrobberRenderer();
     this.Renderer.Color = this.ForeColor;
     this.Timer = new System.Windows.Forms.Timer();
     this.Timer.Tick += new EventHandler(this.Timer_Tick);
     this.Timer.Enabled = base.Enabled;
 }
 private void Write140_ThrobberRenderer(string n, string ns, ThrobberRenderer o, bool isNullable, bool needType)
 {
     if (o == null)
     {
         if (isNullable)
         {
             base.WriteNullTagLiteral(n, ns);
         }
     }
     else
     {
         if (!needType && (o.GetType() != typeof(ThrobberRenderer)))
         {
             throw base.CreateUnknownTypeException(o);
         }
         base.WriteStartElement(n, ns, o, false, null);
         if (needType)
         {
             base.WriteXsiType("ThrobberRenderer", "");
         }
         this.Write139_Color("Color", "", o.Color, false);
         base.WriteElementStringRaw("InnerCircleRadius", "", XmlConvert.ToString(o.InnerCircleRadius));
         base.WriteElementStringRaw("OuterCircleRadius", "", XmlConvert.ToString(o.OuterCircleRadius));
         base.WriteElementStringRaw("NumberOfSpoke", "", XmlConvert.ToString(o.NumberOfSpoke));
         base.WriteElementStringRaw("SpokeThickness", "", XmlConvert.ToString(o.SpokeThickness));
         base.WriteElementString("Style", "", this.Write138_ThrobberStyle(o.Style));
         base.WriteEndElement(o);
     }
 }
 private ThrobberRenderer Read140_ThrobberRenderer(bool isNullable, bool checkType)
 {
     XmlQualifiedName type = checkType ? base.GetXsiType() : null;
     bool flag = false;
     if (isNullable)
     {
         flag = base.ReadNull();
     }
     if ((checkType && (type != null)) && ((type.Name != this.id96_ThrobberRenderer) || (type.Namespace != this.id2_Item)))
     {
         throw base.CreateUnknownTypeException(type);
     }
     if (flag)
     {
         return null;
     }
     ThrobberRenderer o = new ThrobberRenderer();
     bool[] flagArray = new bool[6];
     while (base.Reader.MoveToNextAttribute())
     {
         if (!base.IsXmlnsAttribute(base.Reader.Name))
         {
             base.UnknownNode(o);
         }
     }
     base.Reader.MoveToElement();
     if (base.Reader.IsEmptyElement)
     {
         base.Reader.Skip();
         return o;
     }
     base.Reader.ReadStartElement();
     base.Reader.MoveToContent();
     int whileIterations = 0;
     int readerCount = base.ReaderCount;
     while ((base.Reader.NodeType != XmlNodeType.EndElement) && (base.Reader.NodeType != XmlNodeType.None))
     {
         if (base.Reader.NodeType == XmlNodeType.Element)
         {
             if ((!flagArray[0] && (base.Reader.LocalName == this.id258_Color)) && (base.Reader.NamespaceURI == this.id2_Item))
             {
                 o.Color = this.Read139_Color(true);
                 flagArray[0] = true;
             }
             else if ((!flagArray[1] && (base.Reader.LocalName == this.id333_InnerCircleRadius)) && (base.Reader.NamespaceURI == this.id2_Item))
             {
                 o.InnerCircleRadius = XmlConvert.ToInt32(base.Reader.ReadElementString());
                 flagArray[1] = true;
             }
             else if ((!flagArray[2] && (base.Reader.LocalName == this.id334_OuterCircleRadius)) && (base.Reader.NamespaceURI == this.id2_Item))
             {
                 o.OuterCircleRadius = XmlConvert.ToInt32(base.Reader.ReadElementString());
                 flagArray[2] = true;
             }
             else if ((!flagArray[3] && (base.Reader.LocalName == this.id335_NumberOfSpoke)) && (base.Reader.NamespaceURI == this.id2_Item))
             {
                 o.NumberOfSpoke = XmlConvert.ToInt32(base.Reader.ReadElementString());
                 flagArray[3] = true;
             }
             else if ((!flagArray[4] && (base.Reader.LocalName == this.id336_SpokeThickness)) && (base.Reader.NamespaceURI == this.id2_Item))
             {
                 o.SpokeThickness = XmlConvert.ToInt32(base.Reader.ReadElementString());
                 flagArray[4] = true;
             }
             else if ((!flagArray[5] && (base.Reader.LocalName == this.id337_Style)) && (base.Reader.NamespaceURI == this.id2_Item))
             {
                 o.Style = this.Read138_ThrobberStyle(base.Reader.ReadElementString());
                 flagArray[5] = true;
             }
             else
             {
                 base.UnknownNode(o, ":Color, :InnerCircleRadius, :OuterCircleRadius, :NumberOfSpoke, :SpokeThickness, :Style");
             }
         }
         else
         {
             base.UnknownNode(o, ":Color, :InnerCircleRadius, :OuterCircleRadius, :NumberOfSpoke, :SpokeThickness, :Style");
         }
         base.Reader.MoveToContent();
         base.CheckReaderCount(ref whileIterations, ref readerCount);
     }
     base.ReadEndElement();
     return o;
 }