示例#1
0
 /// ////////////////////////////////////////////////////////
 public CAction(CProcess process)
 {
     m_process = process;
     m_nId     = m_process.GetIdNouvelObjetDeProcess();
     Position  = new Point(0, 0);
     Size      = DefaultSize;
     Parent    = process;
 }
示例#2
0
        /// //////////////////////////////////////////////////////////////
        protected override sc2i.common.CResultAErreur MySerialize(sc2i.common.C2iSerializer serializer)
        {
            int            nVersion = GetNumVersion();
            CResultAErreur result   = serializer.TraiteVersion(ref nVersion);

            if (!result)
            {
                return(result);
            }
            serializer.TraiteInt(ref m_nIdActionArrivee);
            serializer.TraiteInt(ref m_nIdActionDepart);
            int nX, nY;

            AssurePositionOk();

            nX = m_lastPointArrivee.X;
            nY = m_lastPointArrivee.Y;
            serializer.TraiteInt(ref nX);
            serializer.TraiteInt(ref nY);
            m_lastPointArrivee.X = nX;
            m_lastPointArrivee.Y = nY;

            nX = m_lastPointDepart.X;
            nY = m_lastPointDepart.Y;
            serializer.TraiteInt(ref nX);
            serializer.TraiteInt(ref nY);
            m_lastPointDepart.X = nX;
            m_lastPointDepart.Y = nY;

            if (nVersion > 0)
            {
                serializer.TraiteInt(ref m_nId);
            }
            else
            {
                if (m_process != null)
                {
                    m_nId = m_process.GetIdNouvelObjetDeProcess();
                }
                else
                {
                    m_nId = -1;
                }
            }

            if (nVersion >= 2)
            {
                int nTmp = (int)m_modeSortie;
                serializer.TraiteInt(ref nTmp);
                m_modeSortie = (EModeSortieLien)nTmp;
            }
            if (serializer.Mode == ModeSerialisation.Lecture)
            {
                m_bPositionInvalide = true;
            }

            return(result);
        }
示例#3
0
 /// //////////////////////////////////////////////////////////////
 public CLienAction(CProcess process)
 {
     m_process = process;
     m_nId     = m_process.GetIdNouvelObjetDeProcess();
     Parent    = process;
 }