Exemplo n.º 1
0
        /// <summary>
        /// Called when the view is loading. Load any settings saved in the xml document.
        /// </summary>
        /// <param name="xmlIn"></param>
        public void LoadFromXML(XmlReader xmlIn)
        {
            try
            {
                xmlIn.MoveToContent();
                _graphicElements.loadFromXML(xmlIn);
                xmlIn.Read();

                do
                {
                    if (xmlIn.NodeType == XmlNodeType.EndElement)
                    {
                        break;
                    }
                    if (xmlIn.NodeType == XmlNodeType.Element && xmlIn.Name == "WatchItem")
                    {
                        string    label      = xmlIn.GetAttribute("Label");
                        WatchType wt         = (WatchType)Enum.Parse(typeof(WatchType), xmlIn.GetAttribute("WatchType"), true);
                        bool      signed     = bool.Parse(xmlIn.GetAttribute("Signed"));
                        bool      displayHex = bool.Parse(xmlIn.GetAttribute("DisplayHex"));
                        _loadedEntries.Add(new WatchEntry(label, wt, signed, displayHex, _JM));
                    }
                    xmlIn.Skip();
                } while (!xmlIn.EOF);
            }
            catch (Exception ex)
            {
                ARMPluginInterfaces.Utils.OutputDebugString(ex.Message);
                this.defaultSettings();
            }
        }//LoadFromXML
Exemplo n.º 2
0
        }//saveState

        public void LoadFromXML(XmlReader xmlIn)
        {
            try
            {
                xmlIn.MoveToContent();
                _graphicElements.loadFromXML(xmlIn);
            }//try
            catch (Exception ex)
            {
                ARMPluginInterfaces.Utils.OutputDebugString(ex.Message);
                this.defaultSettings();
            }
        }//LoadFromXML
Exemplo n.º 3
0
        }//saveState

        public void LoadFromXML(XmlReader xmlIn)
        {
            try
            {
                xmlIn.MoveToContent();
                _graphicElements.loadFromXML(xmlIn);
                string displayBase = xmlIn.GetAttribute(_displayBaseElement);
                if (displayBase != null)
                {
                    if (displayBase == RegisterDisplayBase.Hexadecimal.ToString())
                    {
                        btnHex.Checked = true;
                    }//if
                    else if (displayBase == RegisterDisplayBase.Unsigned.ToString())
                    {
                        btnUsigned.Checked = true;
                    }//else
                    else
                    {
                        btnSigned.Checked = true;
                    } //else
                }     //if

                string displayFPBase = xmlIn.GetAttribute(_displayFPBaseElement);
                if (displayFPBase != null)
                {
                    if (displayFPBase == FloatingPointType.Single.ToString())
                    {
                        this.btnSingle.Checked = true;
                    }//if
                    else
                    {
                        this.btnDouble.Checked = true;
                    } //else
                }     //if

                string currentTab = xmlIn.GetAttribute(_displayRegisterTab);
                if (currentTab != null)
                {
                    tabControl1.SelectedIndex = int.Parse(currentTab);
                }
            }//try
            catch (Exception ex)
            {
                ARMPluginInterfaces.Utils.OutputDebugString(ex.Message);
                this.defaultSettings();
            }
        }//LoadFromXML
Exemplo n.º 4
0
        //load the CodeView settings from the save document
        public void LoadFromXML(XmlReader xmlIn)
        {
            //ALl breakpoint logic moved to sim engine.
            try
            {
                xmlIn.MoveToContent();
                _graphicElements.loadFromXML(xmlIn);
            }//try
            catch (Exception ex)
            {
                ARMPluginInterfaces.Utils.OutputDebugString(ex.Message);
                this.defaultSettings();
            }

            //try
            //{
            //    xmlIn.MoveToContent();
            //    //load any of the standard graphic elements
            //    _graphicElements.loadFromXML(xmlIn);
            //    xmlIn.Read();
            //    do
            //    {
            //        if (xmlIn.NodeType == XmlNodeType.EndElement) break;
            //        if (xmlIn.NodeType == XmlNodeType.Element && xmlIn.Name == "Breakpoint")
            //        {
            //            //get the breakpoint address
            //            string str = xmlIn.GetAttribute("Position");
            //            //allocate a loaded breakpoint collection if needed
            //            if (_loadedBreakpoints == null)
            //            {
            //                _loadedBreakpoints = new List<uint>();
            //            }//if
            //            //and add this breakpoint
            //            _loadedBreakpoints.Add(Convert.ToUInt32(str, 16));
            //        }
            //        xmlIn.Skip();
            //    } while (!xmlIn.EOF);
            //}
            //catch (Exception ex)
            //{
            //    ARMPluginInterfaces.Utils.OutputDebugString(ex.Message);
            //    this.defaultSettings();
            //}
        }//LoadFromXML
Exemplo n.º 5
0
        public void LoadFromXML(XmlReader xmlIn)
        {
            try
            {
                xmlIn.MoveToContent();
                _graphicElements.loadFromXML(xmlIn);

                //string viewIndex = xmlIn.GetAttribute(0);
                //string wordSize = xmlIn.GetAttribute(1);
                //string address = xmlIn.GetAttribute(2);
                string viewIndex = xmlIn["Index"];
                string wordSize  = xmlIn["WordSize"];
                string address   = xmlIn["Address"];

                this.CurrentAddressString    = address;
                this.CheckedMemorySizeString = wordSize;
                this.Index = int.Parse(viewIndex);
            }
            catch (Exception ex)
            {
                ARMPluginInterfaces.Utils.OutputDebugString(ex.Message);
                this.defaultSettings();
            }
        }
Exemplo n.º 6
0
 public void LoadFromXML(XmlReader xmlIn)
 {
     _graphicElements.loadFromXML(xmlIn);
 }