예제 #1
0
 public HTMLElementPatern(
     MiMFa_XMLElement sampleHTMLElement,
     MiMFa_Boolean all = MiMFa_Boolean.False,
     MiMFa_Similarity elementSimilarity = MiMFa_Similarity.Null,
     MiMFa_Usage usage                  = MiMFa_Usage.Null,
     MiMFa_LinkJob linkJob              = MiMFa_LinkJob.Null,
     string destinationPath             = "",
     MiMFa_XMLElementItems elementItems = MiMFa_XMLElementItems.Null,
     string childName = "",
     string attrName  = "",
     MiMFa_TableValuePositionType tableValuePositionType = MiMFa_TableValuePositionType.Null,
     string colName = null)
 {
     SampleHTMLElement = sampleHTMLElement;
     ElementSimilarity = elementSimilarity;
     All          = all;
     Usage        = usage;
     LinkJob      = linkJob;
     ElementItems = elementItems;
     if (string.IsNullOrEmpty(destinationPath))
     {
         DestinationPath = Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments);
     }
     else
     {
         DestinationPath = destinationPath;
     }
     AttributeName          = attrName;
     ChildName              = childName;
     ColName                = colName;
     TableValuePositionType = tableValuePositionType;
 }
예제 #2
0
 public MiMFa_Table AddInTable(string str, string colName, MiMFa_TableValuePositionType put)
 {
     return(AddInTable(this, str, colName, put));
 }
예제 #3
0
        public static MiMFa_Table AddInTable(MiMFa_Table mainDT, object str, string colName, MiMFa_TableValuePositionType put)
        {
            switch (put)
            {
            case MiMFa_TableValuePositionType.NextRowCell:
                mainDT.AddRowSafe();
                if (string.IsNullOrWhiteSpace(colName))
                {
                    mainDT.AddInLastRowCellSafe(str);
                }
                else
                {
                    mainDT.AddInLastRowCellSafe(str, colName);
                }
                break;

            case MiMFa_TableValuePositionType.Null:
            case MiMFa_TableValuePositionType.NextColumnCell:
                if (string.IsNullOrWhiteSpace(colName))
                {
                    mainDT.AddInLastRowCellSafe(str);
                }
                else
                {
                    mainDT.AddInLastRowCellSafe(str, colName);
                }
                break;

            case MiMFa_TableValuePositionType.NextSubCell:
                if (string.IsNullOrWhiteSpace(colName))
                {
                    mainDT.AppendInLastRowCellSafe(str);
                }
                else
                {
                    mainDT.AppendInLastRowCellSafe(str, colName);
                }
                break;
            }
            return(mainDT);
        }