Beispiel #1
0
        public IEntity FindEntityTypeByExternalName(string alias, SpatialType type)
        {
            IEntity result = (m_Translator == null ? null : m_Translator.Translate(alias));

            if (result != null)
            {
                return(result);
            }

            // Ask the user to pick a suitable translation
            EntityTranslationForm dial = new EntityTranslationForm(alias, type);

            dial.ShowDialog();
            result = dial.Result;
            dial.Dispose();

            // Remember what was specified
            if (result != null)
            {
                if (m_Translator == null)
                {
                    m_Translator = new TranslationFile();
                }

                m_Translator.Add(alias, result);
            }

            return(result);
        }
        public IEntity FindEntityTypeByExternalName(string alias, SpatialType type)
        {
            IEntity result = (m_Translator==null ? null : m_Translator.Translate(alias));
            if (result!=null)
                return result;

            // Ask the user to pick a suitable translation
            EntityTranslationForm dial = new EntityTranslationForm(alias, type);
            dial.ShowDialog();
            result = dial.Result;
            dial.Dispose();

            // Remember what was specified
            if (result!=null)
            {
                if (m_Translator==null)
                    m_Translator = new TranslationFile();

                m_Translator.Add(alias, result);
            }

            return result;
        }