ViewVC Help
View File | Revision Log | View Changeset | Root Listing
root/Oni2/xmlTools/trunk/posUpdate/Util.cs
(Generate patch)

Comparing:
xmlTools/posUpdate/Util.cs (file contents), Revision 711 by s10k, Thu Mar 21 10:40:39 2013 UTC vs.
xmlTools/trunk/posUpdate/Util.cs (file contents), Revision 742 by s10k, Tue Mar 26 02:30:48 2013 UTC

# Line 18 | Line 18 | namespace xmlTools
18          /// <param name="file"></param>
19          static public bool backupFile(string file)
20          {
21 <            //try
22 <            //{
23 <            //    System.IO.File.Copy(file, file + ".bak", false); //make a backup first //false is to not override already created backups
24 <            //}
25 <            //catch (Exception e)
26 <            //{
27 <            //    Program.printAppError(Program.appErrors.BACKUPS_ALREADY_EXISTS, "Couldn't backup file " + file + " :\n" + e.Message);
28 <            //    return false;
29 <            //}
21 >            try
22 >            {
23 >                System.IO.File.Copy(file, file + ".bak", false); //make a backup first //false is to not override already created backups
24 >            }
25 >            catch (Exception e)
26 >            {
27 >                Program.printAppError(Program.appErrors.BACKUPS_ALREADY_EXISTS, "Couldn't backup file " + file + " :\n" + e.Message);
28 >                return false;
29 >            }
30              return true;
31          }
32  
# Line 136 | Line 136 | namespace xmlTools
136          {
137              return Type.GetType("Mono.Runtime") != null;
138          }
139 +
140 +        public static bool ContainsIgnoreCase(string source, string sToSearch)
141 +        {
142 +            return source.IndexOf(sToSearch, StringComparison.OrdinalIgnoreCase) >= 0;
143 +        }
144      }
145   }

Diff Legend

Removed lines
+ Added lines
< Changed lines (old)
> Changed lines (new)