Don't like ads? PRO users don't see any ads ;-)
Guest

Untitled

By: a guest on May 2nd, 2012  |  syntax: C#  |  size: 0.53 KB  |  hits: 20  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1.     public static string TestId()
  2.     {
  3.         var ID = "0";
  4.  
  5.         if (File.Exists (ScoresSaver.IdPath))
  6.         {
  7.             ID = GetLocalId();
  8.         }
  9.         else
  10.         { // файла id еще нет, сначало надо получить и удалить старый(???)
  11.             DeleteId();
  12.  
  13.             ID = ScoresSaver.GetId ();
  14.             Id = Encoding.UTF8.GetString (Convert.FromBase64String (Id));
  15.             File.WriteAllText (ScoresSaver.IdPath, ID);
  16.         }
  17.  
  18.         return ID;
  19.     }