Esempio n. 1
0
 protected override string GetResourceName(SimPe.Data.TypeAlias ta)
 {
     if (!this.Processed)
     {
         ProcessData(FileDescriptor, Package);
     }
     return(SourceSimName + " " + SimPe.Localization.GetString("towards") + " " + TargetSimName);
 }
Esempio n. 2
0
        /// <summary>
        /// Parse the various TGI Fields
        /// </summary>
        /// <param name="node"></param>
        void LoadType(XmlNode node)
        {
            uint type = 0;

            try
            {
                type = Convert.ToUInt32(node.Attributes["value"].Value, 16);
            }
            catch {}

            bool   known     = false;
            string name      = "";
            string shortname = "";
            string ext       = "";
            bool   contfl    = false;
            bool   nodecomp  = false;

            foreach (XmlNode subnode in node)
            {
                if (subnode.Name == "know")
                {
                    known = true;
                }
                if (subnode.Name == "embeddedfilename")
                {
                    contfl = true;
                }
                if (subnode.Name == "name")
                {
                    name = subnode.InnerText;
                }
                if (subnode.Name == "shortname")
                {
                    shortname = subnode.InnerText;
                }
                if (subnode.Name == "extension")
                {
                    ext = subnode.InnerText;
                }
                if (subnode.Name == "nodecompressforcache")
                {
                    nodecomp = true;
                }
            }

            //Data.TypeAlias ta = new Data.TypeAlias(contfl, SimPe.Localization.GetString(shortname), type, SimPe.Localization.GetString(name), ext, known);
            Data.TypeAlias ta = new Data.TypeAlias(contfl, shortname, type, SimPe.Localization.GetString(name), ext, known, nodecomp);
            map[type] = ta;
            alist.Add(ta);
        }
Esempio n. 3
0
        private void SelectTypeByNameClick(object sender, System.EventArgs e)
        {
            cbtypes.Tag = true;
            Data.TypeAlias a = Data.MetaData.FindTypeAlias(Helper.HexStringToUInt(tbtype.Text));

            int ct = 0;

            foreach (Data.TypeAlias i in cbtypes.Items)
            {
                if (i == a)
                {
                    cbtypes.SelectedIndex = ct;
                    cbtypes.Tag           = null;
                    return;
                }
                ct++;
            }

            cbtypes.SelectedIndex = -1;
            cbtypes.Tag           = null;
        }