示例#1
0
 private static bool AlreadyExistInUniqueConstraintNameList(ImageStore imgstore, string x)
 {
     foreach (ImageItem e3pi in imgstore.items)
     {
         if (e3pi.name.Equals(x))
         {
             return true;
         }
     }
     return false;
 }
示例#2
0
 public static string GetName(ImageStore imgstore, string p)
 {
     string x = p;
     while (AlreadyExistInUniqueConstraintNameList(imgstore, x))
     {
         string sWithoutNumber = "";
         int iNum = GetStringLastNumber(x, ref sWithoutNumber);
         iNum++;
         x = sWithoutNumber + iNum;
     }
     return x;
 }