private void Write182_TwoPanelTab(string n, string ns, TwoPanelTab o, bool isNullable, bool needType)
 {
     if (o == null)
     {
         if (isNullable)
         {
             base.WriteNullTagLiteral(n, ns);
         }
     }
     else
     {
         if (!needType && (o.GetType() != typeof(TwoPanelTab)))
         {
             throw base.CreateUnknownTypeException(o);
         }
         base.WriteStartElement(n, ns, o, false, null);
         if (needType)
         {
             base.WriteXsiType("TwoPanelTab", "");
         }
         base.WriteElementString("Caption", "", o.Caption);
         base.WriteElementString("Hotkey", "", o.SerializableHotkey);
         this.Write25_TwoPanelLayout("Layout", "", o.Layout, false, false);
         this.Write172_PanelContentContainer("Left", "", o.Left, false, false);
         this.Write172_PanelContentContainer("Right", "", o.Right, false, false);
         base.WriteEndElement(o);
     }
 }
 private TwoPanelTab Read182_TwoPanelTab(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.id138_TwoPanelTab) || (type.Namespace != this.id2_Item)))
     {
         throw base.CreateUnknownTypeException(type);
     }
     if (flag)
     {
         return null;
     }
     TwoPanelTab o = new TwoPanelTab();
     bool[] flagArray = new bool[5];
     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.id171_Caption)) && (base.Reader.NamespaceURI == this.id2_Item))
             {
                 o.Caption = base.Reader.ReadElementString();
                 flagArray[0] = true;
             }
             else if ((!flagArray[1] && (base.Reader.LocalName == this.id172_Hotkey)) && (base.Reader.NamespaceURI == this.id2_Item))
             {
                 o.SerializableHotkey = base.Reader.ReadElementString();
                 flagArray[1] = true;
             }
             else if ((!flagArray[2] && (base.Reader.LocalName == this.id173_Layout)) && (base.Reader.NamespaceURI == this.id2_Item))
             {
                 o.Layout = this.Read25_TwoPanelLayout(false, true);
                 flagArray[2] = true;
             }
             else if ((!flagArray[3] && (base.Reader.LocalName == this.id174_Left)) && (base.Reader.NamespaceURI == this.id2_Item))
             {
                 o.Left = this.Read172_PanelContentContainer(false, true);
                 flagArray[3] = true;
             }
             else if ((!flagArray[4] && (base.Reader.LocalName == this.id175_Right)) && (base.Reader.NamespaceURI == this.id2_Item))
             {
                 o.Right = this.Read172_PanelContentContainer(false, true);
                 flagArray[4] = true;
             }
             else
             {
                 base.UnknownNode(o, ":Caption, :Hotkey, :Layout, :Left, :Right");
             }
         }
         else
         {
             base.UnknownNode(o, ":Caption, :Hotkey, :Layout, :Left, :Right");
         }
         base.Reader.MoveToContent();
         base.CheckReaderCount(ref whileIterations, ref readerCount);
     }
     base.ReadEndElement();
     return o;
 }