コード例 #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
        public AcadFontTableRecord Item(object vvarIndex)
        {
            AcadFontTableRecord dobjAcadFontTableRecord3 = FriendGetItem(RuntimeHelpers.GetObjectValue(vvarIndex));
            AcadFontTableRecord Item = default(AcadFontTableRecord);

            if (dobjAcadFontTableRecord3 == null)
            {
                dobjAcadFontTableRecord3 = null;
                Information.Err().Raise(50000, "AcadFontTable", "Element existiert nicht.");
            }
            else
            {
                Item = dobjAcadFontTableRecord3;
                dobjAcadFontTableRecord3 = null;
            }
            return(Item);
        }
コード例 #3
0
        internal AcadFontTableRecord FriendGetItem(object vvarIndex)
        {
            AcadFontTableRecord FriendGetItem = default(AcadFontTableRecord);

            try
            {
                if (Information.VarType(RuntimeHelpers.GetObjectValue(vvarIndex)) != VariantType.String)
                {
                    FriendGetItem = (AcadFontTableRecord)mcolClass[checked (Conversions.ToInteger(vvarIndex) - 1)];
                    return(FriendGetItem);
                }
                FriendGetItem = (AcadFontTableRecord)mcolClass[Conversions.ToString(vvarIndex)];
                return(FriendGetItem);
            }
            catch (Exception ex2)
            {
                ProjectData.SetProjectError(ex2);
                Exception ex = ex2;
                ProjectData.ClearProjectError();
                return(FriendGetItem);
            }
        }
コード例 #4
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;
        }