Exemple #1
0
 /// <summary>
 /// 粘贴
 /// </summary>
 public void paste()
 {
     if (m_sourceCodeTabPage.Visible)
     {
         m_scintilla.Clipboard.Paste();
     }
     else
     {
         int copysSize = m_copys.Count;
         if (copysSize > 0)
         {
             UIXmlEx targetXml = Xml;
             FCPoint mp        = m_native.TouchPoint;
             //查找控件
             List <FCView> targets     = m_resizeDiv.getTargets();
             int           targetsSize = targets.Count;
             if (targetsSize > 0)
             {
                 FCView targetControl = targets[0];
                 if (!targetXml.isContainer(targetControl))
                 {
                     targetControl = targetControl.Parent;
                 }
                 if (targetControl != null && targetXml.containsControl(targetControl))
                 {
                     for (int i = 0; i < copysSize; i++)
                     {
                         FCView control = m_copys[i];
                         if (m_xml.containsControl(control))
                         {
                             targetXml.copyControl(UITemplate.CreateControlName(control, m_xml), control, targetControl);
                             if (m_isCut)
                             {
                                 m_xml.removeControl(control);
                             }
                             break;
                         }
                     }
                 }
             }
         }
     }
     m_isCut = false;
     m_copys.Clear();
     m_native.invalidate();
 }