コード例 #1
0
        void ESRI.ArcGIS.esriSystem.IPersistVariant.Load(ESRI.ArcGIS.esriSystem.IVariantStream Stream)
        {
            // Read the persisted version number first.
            int lSavedVers = 0;
            lSavedVers = Convert.ToInt32(Stream.Read());
            if ((lSavedVers > m_lCurrPersistVers) | (lSavedVers <= 0))
            {
                throw new Exception("Failed to read from stream");
            }

            // Set members to default values.
            InitializeMembers();

            // Load the first persistance pattern.
            if (lSavedVers == 1)
            {
                m_lROP2 = (esriRasterOpCode)Stream.Read();

                m_dSize = Convert.ToDouble(Stream.Read());
                m_dXOffset = Convert.ToDouble(Stream.Read());
                m_dYOffset = Convert.ToDouble(Stream.Read());
                m_dAngle = Convert.ToDouble(Stream.Read());

                m_bRotWithTrans = Convert.ToBoolean(Stream.Read());

                m_lMapLevel = Convert.ToInt32(Stream.Read());

                m_colorTop = Stream.Read() as IColor;
                m_colorLeft = Stream.Read() as IColor;
                m_colorRight = Stream.Read() as IColor;
                m_colorBorder = Stream.Read() as IColor;
            }
        }
コード例 #2
0
 public void Load(ESRI.ArcGIS.esriSystem.IVariantStream stream)
 {
     path = (string)stream.Read();
 }