예제 #1
0
        /// <summary>
        /// xml deserialization
        /// </summary>
        /// <param name='reader'>
        /// Reader.
        /// </param>
        protected virtual void doReadXml(XmlReader reader)
        {
            StoredWidth  = Convert.ToInt32(reader["CurrentWidth"]);
            StoredHeight = Convert.ToInt32(reader["CurrentHeight"]);
            Maximized    = Convert.ToBoolean(reader["Maximized"]);

            while (reader.LocalName != "frame" && reader.Read())
            {
                ;
            }

            if (reader.LocalName == "frame")
            {
                if (!reader.IsEmptyElement)
                {
                    reader.Read();
                    String tp = reader.LocalName + "," + reader["assembly"];
                    Widget w  = (Widget)Sharpend.Utils.Reflection.createInstance(System.Type.GetType(tp));
                    frame = (DockFrame)w;
                    frame.ReadXml(reader);
                    box1.PackEnd(frame, true, true, 0);
                }
                else
                {
                    reader.Read();                     //TODO if and else reader.read
                }
            }
        }