Beispiel #1
0
 // Constructor
 public MRU(string theName, int maxEntries, MRUtype type = MRUtype.File)
 {
     if (theName.Length > 1)
     {
         if (maxEntries > 1)
         {
             myName     = theName;
             entryCount = maxEntries;
             try
             {
                 // Create initial blank entries
                 for (int i = 0; i < maxEntries; i++)
                 {
                     files.Add("");
                 }
             }
             catch (Exception e)
             {
             }
         }
         else
         {
             // Raise Error
         }
     }
     else
     {
         // Raise Error
     }
 }
Beispiel #2
0
 // Constructor
 public MRU(Properties.Settings settings, string theName, int maxEntries, MRUtype type = MRUtype.File)
 {
     appSettings = settings;
     if (theName.Length > 1)
     {
         if (maxEntries > 1)
         {
             myName     = theName;
             entryCount = maxEntries;
             try
             {
                 // Create initial blank entries
                 for (int i = 0; i < maxEntries; i++)
                 {
                     files.Add("");
                 }
             }
             catch (Exception e)
             {
             }
         }
         else
         {
             // Raise Error
         }
     }
     else
     {
         // Raise Error
     }
     ReadFromConfig();
 }