Пример #1
0
        internal AcadFontTableRecord FriendAddAcadObject(string vstrName, ref string nrstrErrMsg)
        {
            AcadFontTableRecord dobjAcadFontTableRecord4 = new AcadFontTableRecord();
            AcadFontTableRecord acadFontTableRecord      = dobjAcadFontTableRecord4;

            acadFontTableRecord.FriendLetName             = vstrName;
            acadFontTableRecord.FriendLetNodeParentID     = base.NodeID;
            acadFontTableRecord.FriendLetApplicationIndex = base.FriendGetApplicationIndex;
            acadFontTableRecord.FriendLetDocumentIndex    = base.FriendGetDocumentIndex;
            acadFontTableRecord.FriendLetDatabaseIndex    = base.FriendGetDatabaseIndex;
            acadFontTableRecord.FriendLetOwnerID          = base.ObjectID;
            AcadFontTableRecord acadFontTableRecord2 = acadFontTableRecord;
            double     friendGetNextObjectID         = base.Database.FriendGetNextObjectID;
            AcadObject nrobjAcadObject = dobjAcadFontTableRecord4;
            bool       flag            = acadFontTableRecord2.FriendSetObjectID(friendGetNextObjectID, ref nrobjAcadObject, ref nrstrErrMsg);

            dobjAcadFontTableRecord4 = (AcadFontTableRecord)nrobjAcadObject;
            bool dblnValid = default(bool);

            if (flag)
            {
                dblnValid = true;
            }
            else
            {
                hwpDxf_Functions.BkDXF_DebugPrint(acadFontTableRecord.ObjectName + ": " + nrstrErrMsg);
            }
            acadFontTableRecord = null;
            AcadFontTableRecord FriendAddAcadObject = default(AcadFontTableRecord);

            if (dblnValid)
            {
                try
                {
                    mcolClass.Add(vstrName, dobjAcadFontTableRecord4);
                }
                catch (Exception ex2)
                {
                    ProjectData.SetProjectError(ex2);
                    Exception ex = ex2;
                    dobjAcadFontTableRecord4.FriendQuit();
                    dobjAcadFontTableRecord4 = null;
                    Information.Err().Raise(50000, "AcadFontTable", "Element konnte nicht hinzugefügt werden.");
                    ProjectData.ClearProjectError();
                    return(FriendAddAcadObject);
                }
                FriendAddAcadObject = dobjAcadFontTableRecord4;
            }
            dobjAcadFontTableRecord4 = null;
            return(FriendAddAcadObject);
        }
Пример #2
0
        internal void FriendRemove(object vvarIndex)
        {
            AcadFontTableRecord dobjAcadFontTableRecord4 = FriendGetItem(RuntimeHelpers.GetObjectValue(vvarIndex));

            if (dobjAcadFontTableRecord4 != null)
            {
                try
                {
                    mcolClass.Remove(dobjAcadFontTableRecord4.Name);
                }
                catch (Exception ex2)
                {
                    ProjectData.SetProjectError(ex2);
                    Exception ex = ex2;
                    dobjAcadFontTableRecord4 = null;
                    ProjectData.ClearProjectError();
                    return;
                }
                dobjAcadFontTableRecord4.FriendQuit();
                dobjAcadFontTableRecord4 = null;
            }
            dobjAcadFontTableRecord4 = null;
        }