Beispiel #1
0
 public void OnLoad()
 {
     try
     {
         history = historySerialiser.Load();
     }
     catch (IOException)
     {
         // there is no history file yet - start with a blank history
         PrintLine("No history file was found - starting with a blank one");
         history = new LogHistory();
     }
     try
     {
         loggerConfiguration = configurationSerialiser.Load();
     }
     catch (IOException)
     {
         // there is no configuration file yet
         PrintLine("Unable to find configuration file " + configurationPath + " - opening the configuration dialogue");
         ShowConfigurationDialogue();
     }
     StartLogging();
 }
Beispiel #2
0
 public void SaveConfiguration(string directory, string server, int port)
 {
     loggerConfiguration = new Configuration();
     loggerConfiguration.lolDirectory = directory;
     loggerConfiguration.logServer = server;
     loggerConfiguration.logServerPort = port;
     PrintLine("Configuration has been saved");
     SerialiseConfiguration();
 }