Exemplo n.º 1
0
        /// <summary>
        /// Gets the default load address.
        /// </summary>
        /// <param name="sysDef">SystemDef instance.</param>
        /// <returns>Specified load address, or 0x1000 if nothing defined.</returns>
        public static int GetLoadAddress(SystemDef sysDef)
        {
            Dictionary <string, string> parms = sysDef.Parameters;
            int retVal = 0x1000;

            if (parms.TryGetValue(LOAD_ADDRESS, out string valueStr))
            {
                valueStr = valueStr.Trim();
                if (Number.TryParseInt(valueStr, out int parseVal, out int unused))
                {
                    retVal = parseVal;
                }
                else
                {
                    Debug.WriteLine("WARNING: bad value for " + LOAD_ADDRESS + ": " + valueStr);
                }
            }
Exemplo n.º 2
0
 public MyTreeNode(string text, bool isSelectable, SystemDef systemDef)
     : base(text)
 {
     IsSelectable = isSelectable;
     SystemDef    = systemDef;
 }