Esempio n. 1
0
        string IFrameExport.Line(Librarian librarian, LibraryContext context, LibraryStandardIdentity identity, LibraryDimension dimension, LibraryStatus status)
        {
            _notes = "";

            string result  = "";
            string graphic = "";

            string graphicPath = _configHelper.GetPath(context.ID, FindEnum.FindFrames);

            LibraryAffiliation affiliation = librarian.Affiliation(context.ID, dimension.ID, identity.ID);

            if (affiliation != null)
            {
                if (affiliation.Shape != ShapeType.NA && (status.StatusCode == 0 || affiliation.PlannedGraphic != ""))
                {
                    if (status.StatusCode == 0)
                    {
                        graphic = affiliation.Graphic;
                    }
                    else
                    {
                        graphic = affiliation.PlannedGraphic;
                    }

                    if (graphic == null)
                    {
                        _notes = _notes + "graphic is missing - frame is NA - frame is never to be drawn;";
                    }

                    string itemRootedPath   = _configHelper.BuildRootedPath(graphicPath, graphic);
                    string itemOriginalPath = _configHelper.BuildOriginalPath(graphicPath, graphic);

                    if (!File.Exists(itemOriginalPath))
                    {
                        _notes = _notes + "image file does not exist;";
                    }

                    string itemName     = BuildFrameItemName(context, dimension, identity, status);
                    string itemCategory = "Frame";
                    string itemTags     = BuildFrameItemTags(context, identity, dimension, status, graphicPath + "\\" + graphic, _omitSource, _omitLegacy);
                    string itemID       = BuildFrameCode(context, identity, dimension, status);

                    result = itemRootedPath + "," +
                             Convert.ToString(_configHelper.PointSize) + "," +
                             itemName + "," +
                             itemCategory + "," +
                             itemTags + "," +
                             itemID + "," +
                             "Point" + "," +
                             _notes;
                }
            }

            return(result);
        }
        string IFrameExport.Line(Librarian librarian, LibraryContext context, LibraryStandardIdentity identity, LibraryDimension dimension, LibraryStatus status, bool asCivilian, bool asPlannedCivilian)
        {
            _notes = "";

            string result = "";
            string graphic = "";

            string graphicPath = _configHelper.GetPath(context.ID, FindEnum.FindFrames);

            LibraryAffiliation affiliation = librarian.Affiliation(context.ID, dimension.ID, identity.ID);

            if (affiliation != null)
            {
                if (affiliation.Shape != ShapeType.NA && (status.StatusCode == 0 || affiliation.PlannedGraphic != ""))
                {
                    if (status.StatusCode == 0)
                        if (asCivilian && affiliation.CivilianGraphic != "")
                            graphic = affiliation.CivilianGraphic;
                        else
                            graphic = affiliation.Graphic;
                    else
                        if (asPlannedCivilian && affiliation.PlannedCivilianGraphic != "")
                            graphic = affiliation.PlannedCivilianGraphic;
                        else
                            graphic = affiliation.PlannedGraphic;

                    if (graphic == null)
                        _notes = _notes + "graphic is missing - frame is NA - frame is never to be drawn;";

                    string itemRootedPath = _configHelper.BuildRootedPath(graphicPath, graphic);
                    string itemOriginalPath = _configHelper.BuildOriginalPath(graphicPath, graphic);

                    if (!File.Exists(itemOriginalPath))
                        _notes = _notes + "image file does not exist;";

                    string itemName = BuildFrameItemName(context, dimension, identity, status, asCivilian || asPlannedCivilian);
                    string itemCategory = "Frame";
                    string itemTags = BuildFrameItemTags(context, identity, dimension, status, graphicPath + "\\" + graphic, _omitSource, _omitLegacy, asCivilian || asPlannedCivilian);
                    string itemID = BuildFrameCode(context, identity, dimension, status, asCivilian || asPlannedCivilian);

                    result = itemRootedPath + "," +
                             Convert.ToString(_configHelper.PointSize) + "," +
                             itemName + "," +
                             itemCategory + "," +
                             itemTags + "," +
                             itemID + "," +
                             "Point" + "," +
                             _notes;
                }
            }

            return result;
        }
Esempio n. 3
0
        string IFrameExport.Line(Librarian librarian, LibraryContext context, LibraryStandardIdentity identity, LibraryDimension dimension)
        {
            _notes = "";

            string result  = "";
            string graphic = "";

            string graphicPath = _configHelper.GetPath(context.ID, FindEnum.FindFrames);

            LibraryAffiliation affiliation = librarian.Affiliation(context.ID, dimension.ID, identity.ID);

            if (affiliation != null)
            {
                graphic = affiliation.Graphic;

                string itemRootedPath = _configHelper.BuildRootedPath(graphicPath, graphic);
                string itemActualPath = _configHelper.BuildActualPath(graphicPath, graphic);

                if (!File.Exists(itemActualPath))
                {
                    _notes = _notes + "image file does not exist;";
                }

                string itemName     = BuildFrameItemName(context, dimension, identity);
                string itemCategory = "Frame";
                string itemTags     = BuildFrameItemTags(context, identity, dimension, graphicPath + "\\" + graphic, _omitSource);

                result = itemRootedPath + "," +
                         Convert.ToString(_configHelper.PointSize) + "," +
                         itemName + "," +
                         itemCategory + "," +
                         itemTags + "," +
                         _notes;
            }

            return(result);
        }
        private void _UpdateFromCurrent()
        {
            // Search for the appropriate JMSML Library elements, given the current (2525D)
            // SIDC for this Symbol.

            string first10  = _sidc.PartAString;
            string second10 = _sidc.PartBString;

            _librarian.ResetStatusCode();

            _version = _librarian.Version(Convert.ToUInt16(first10.Substring(0, 1)),
                                          Convert.ToUInt16(first10.Substring(1, 1)));

            _context          = _librarian.Context(Convert.ToUInt16(first10.Substring(2, 1)));
            _standardIdentity = _librarian.StandardIdentity(Convert.ToUInt16(first10.Substring(3, 1)));
            _sig       = _librarian.StandardIdentityGroup(_standardIdentity);
            _symbolSet = _librarian.SymbolSet(Convert.ToUInt16(first10.Substring(4, 1)), Convert.ToUInt16(first10.Substring(5, 1)));

            if (_symbolSet != null)
            {
                _dimension = _librarian.DimensionBySymbolSet(_symbolSet.ID);
            }

            if (_context != null && _dimension != null && _standardIdentity != null)
            {
                _affiliation = _librarian.Affiliation(_context.ID, _dimension.ID, _standardIdentity.ID);
            }

            _status         = _librarian.Status(Convert.ToUInt16(first10.Substring(6, 1)));
            _hqTFDummy      = _librarian.HQTFDummy(Convert.ToUInt16(first10.Substring(7, 1)));
            _amplifierGroup = _librarian.AmplifierGroup(Convert.ToUInt16(first10.Substring(8, 1)));

            if (_amplifierGroup != null)
            {
                _amplifier = _librarian.Amplifier(_amplifierGroup, Convert.ToUInt16(first10.Substring(9, 1)));
            }

            if (_symbolSet != null)
            {
                _entity = _librarian.Entity(_symbolSet, Convert.ToUInt16(second10.Substring(0, 1)), Convert.ToUInt16(second10.Substring(1, 1)));

                if (_entity != null)
                {
                    _entityType = _librarian.EntityType(_entity, Convert.ToUInt16(second10.Substring(2, 1)), Convert.ToUInt16(second10.Substring(3, 1)));
                }

                if (_entityType != null)
                {
                    _entitySubType = _librarian.EntitySubType(_entityType, Convert.ToUInt16(second10.Substring(4, 1)), Convert.ToUInt16(second10.Substring(5, 1)));

                    if (_entitySubType == null)
                    {
                        _entitySubType = _librarian.EntitySubType(_symbolSet, Convert.ToUInt16(second10.Substring(4, 1)), Convert.ToUInt16(second10.Substring(5, 1)));
                    }
                }

                _modifierOne = _librarian.ModifierOne(_symbolSet, Convert.ToUInt16(second10.Substring(6, 1)), Convert.ToUInt16(second10.Substring(7, 1)));
                _modifierTwo = _librarian.ModifierTwo(_symbolSet, Convert.ToUInt16(second10.Substring(8, 1)), Convert.ToUInt16(second10.Substring(9, 1)));

                _legacySymbol = _librarian.LegacySymbol(_symbolSet, _entity, _entityType, _entitySubType, _modifierOne, _modifierTwo);
            }

            _librarian.LogConversionResult(_sidc.PartAString + ", " + _sidc.PartBString);

            _ValidateStatus();
        }