示例#1
0
 internal AcadViewport FriendAddAcadObjectViewportActive(double nvdblObjectID = -1.0, ref string nrstrErrMsg = "")
 {
     object[] dadecCenter = new object[2];
     double[] dadblCenter = new double[2];
     if (mobjAcadViewportActive == null)
     {
         string dstrViewportName = "*Active";
         mobjAcadViewportActive = (AcadViewport)FriendGetItem(dstrViewportName);
         if (mobjAcadViewportActive == null)
         {
             mobjAcadViewportActive = FriendAddAcadObject(dstrViewportName, Conversions.ToDouble(Interaction.IIf(nvdblObjectID == -1.0, base.Database.FriendGetNextObjectID, nvdblObjectID)), ref nrstrErrMsg);
             if (mobjAcadViewportActive != null)
             {
                 bool flag = false;
                 dadblCenter[0] = 8.23956262425447;
                 dadblCenter[1] = 4.5;
                 AcadViewport acadViewport = mobjAcadViewportActive;
                 acadViewport.Height = RuntimeHelpers.GetObjectValue(Interaction.IIf(Expression: false, 9.80485521278679m, 9.80485521278679));
                 acadViewport.Width  = RuntimeHelpers.GetObjectValue(Interaction.IIf(Expression: false, 1.73175182481752m, 1.73175182481752));
                 acadViewport.Center = RuntimeHelpers.GetObjectValue(Interaction.IIf(Expression: false, dadecCenter, dadblCenter));
                 acadViewport        = null;
             }
         }
     }
     return(mobjAcadViewportActive);
 }
示例#2
0
 internal new void FriendQuit()
 {
     if (mblnOpened)
     {
         base.FriendQuit();
         mobjAcadViewportActive = null;
         mblnOpened             = false;
     }
 }
示例#3
0
        internal AcadViewport FriendAddAcadObject(string vstrName, double nvdblObjectID = -1.0, ref string nrstrErrMsg = "")
        {
            AcadViewport dobjAcadViewport4 = new AcadViewport();

            if (nvdblObjectID == -1.0)
            {
                nvdblObjectID = base.Database.FriendGetNextObjectID;
            }
            AcadViewport acadViewport = dobjAcadViewport4;

            acadViewport.Name = vstrName;
            acadViewport.FriendLetNodeParentID     = base.NodeID;
            acadViewport.FriendLetDatabaseIndex    = base.FriendGetDatabaseIndex;
            acadViewport.FriendLetDocumentIndex    = base.FriendGetDocumentIndex;
            acadViewport.FriendLetApplicationIndex = base.FriendGetApplicationIndex;
            acadViewport.FriendOpen();
            acadViewport.FriendLetOwnerID = base.ObjectID;
            AcadViewport acadViewport2   = acadViewport;
            double       vdblObjectID    = nvdblObjectID;
            AcadObject   nrobjAcadObject = dobjAcadViewport4;
            bool         flag            = acadViewport2.FriendSetObjectID(vdblObjectID, ref nrobjAcadObject, ref nrstrErrMsg);

            dobjAcadViewport4 = (AcadViewport)nrobjAcadObject;
            bool dblnValid = default(bool);

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

            if (dblnValid)
            {
                AcadTableRecord robjAcadTableRecord = dobjAcadViewport4;
                Add(ref robjAcadTableRecord, vstrName);
                dobjAcadViewport4   = (AcadViewport)robjAcadTableRecord;
                mlngActiveIndex     = dobjAcadViewport4.TableIndex;
                FriendAddAcadObject = dobjAcadViewport4;
            }
            dobjAcadViewport4 = null;
            return(FriendAddAcadObject);
        }