Ejemplo n.º 1
0
        public string ToXMLstring()
        {
            string res = "";

            if (IsComment)
            {
                res += "<tr bgcolor = 'green'>";
            }
            else if (!IsValid)
            {
                res += "<tr bgcolor = 'red'>";
            }
            else
            {
                res += "<tr>";
            }
            res += "<td>" + Name;
            res += "</td><td>" + ValidField.ToString();
            res += "</td><td>" + Type.ToString();
            res += "</td><td>" + R_W;
            res += "</td><td>" + Data_size.ToString();
            res += "</td><td>" + Bank;
            res += "</td><td>" + Memory_size;
            res += "</td><td>" + Memory_section.ToString();
            res += "</td><td>" + Relative_address.ToString();
            res += "</td><td>" + Priority.ToString();
            res += "</td><td>" + Anable_emerge;
            res += "</td><td>" + Read_bk_address.ToString();
            res += "</td><td>" + Comment + "</td></tr>";
            return(res);
        }
Ejemplo n.º 2
0
        public string ToEntry(bool last = false)
        {
            string res = "";

            if (IsComment)
            {
                res += "--";
            }
            res += "   " + "(" + Name + GetSpaces(23 - Name.Length) + ",";

            string valid = ValidField.ToString().ToLower();

            res += valid + GetSpaces(11 - valid.Length) + ",";
            string type = Type.ToString();

            res += " " + type + GetSpaces(14 - type.Length) + ",";
            string write_read = R_W.ToString();
            string data_size  = Data_size.ToString();

            res += " " + write_read + "  ," + " " + GetSpaces(3 - data_size.Length) + data_size + " ,";
            res += " " + Bank + "  ,";
            res += "   " + Memory_size + GetSpaces(10 - Memory_size.Length) + ",";
            string Rel_addr = Relative_address.ToString().ToLower();

            res += "   " + Memory_section + "   , " + Rel_addr + GetSpaces(7 - Rel_addr.Length) + ", ";
            string prio = Priority.ToString();

            res += "  " + GetSpaces(2 - prio.Length) + prio + " , " + Anable_emerge + "   , " + Read_bk_address + ")";

            if (!last)
            {
                res += ",";
            }
            else
            {
                res += ");";
            }

            if (Comment != "")
            {
                res += "\t-- " + Comment;
            }
            res += "\n";
            return(res);
        }