Beispiel #1
0
 public static bool CheckConfigFileSize(string PrettyFile, long FileSize)
 {
     if (FileSize >= 0x400 * 0x400 * 50)
     {
         if (DialogResult.Yes != MessageBox.Show("DFS file '" + PrettyFile + "' is " + Surrogate.GetFriendlyByteSize(FileSize)
                                                 + Environment.NewLine + "Do you still wish to load it?", "Large config file", MessageBoxButtons.YesNo))
         {
             return(false);
         }
     }
     return(true);
 }
Beispiel #2
0
 public static string GetFriendlyByteSize(long size)
 {
     return(Surrogate.GetFriendlyByteSize(size));
 }