Ejemplo n.º 1
0
 public HistoryNode(XmlOptType optType, XmlElement dstXe, XmlElement srcXe = null, int newIndex = 0)
 {
     if(SkinEditor.isCurItemSkinEditor())
     {
         if (MainWindow.s_pW.mx_skinEditor.m_xmlPath != null && MainWindow.s_pW.mx_skinEditor.m_xmlPath != "")
         {
             m_path = MainWindow.s_pW.mx_skinEditor.m_xmlPath;
         }
     }
     m_optType = optType;
     m_dstXe = dstXe;
     switch (optType)
     {
         case XmlOptType.NODE_DELETE:
             {
                 m_srcXe = (XmlElement)m_dstXe.ParentNode;
                 int tmpIndex = getXeIndex(m_dstXe);
                 if (tmpIndex < 0)
                 {
                     return;
                 }
                 else
                 {
                     m_oldIndex = tmpIndex;
                 }
             }
             break;
         case XmlOptType.NODE_INSERT:
             {
                 m_srcXe = srcXe;
                 m_newIndex = newIndex;
             }
             break;
         case XmlOptType.NODE_MOVE:
             {
                 m_srcXe = (XmlElement)m_dstXe.ParentNode;
                 m_newSrcXe = srcXe;
                 m_newIndex = newIndex;
                 m_oldIndex = getXeIndex(m_dstXe);
             }
             break;
         default:
             break;
     }
 }
Ejemplo n.º 2
0
 public HistoryNode(XmlDocument oldDoc, XmlDocument newDoc)
 {
     m_optType = XmlOptType.TEXT;
     m_oldDoc = oldDoc;
     m_newDoc = newDoc;
 }
Ejemplo n.º 3
0
 public HistoryNode(XmlElement dstXe, string attrName, string oldValue, string newValue)
 {
     if (SkinEditor.isCurItemSkinEditor())
     {
         if (MainWindow.s_pW.mx_skinEditor.m_xmlPath != null && MainWindow.s_pW.mx_skinEditor.m_xmlPath != "")
         {
             m_path = MainWindow.s_pW.mx_skinEditor.m_xmlPath;
         }
     }
     //NODE_UPDATE
     m_optType = XmlOptType.NODE_UPDATE;
     m_attrName = attrName;
     m_oldValue = oldValue;
     m_newValue = newValue;
     m_dstXe = dstXe;
 }