Example #1
0
 /// <summary>
 /// Load your QuoteConfig
 /// Creates an empty QuoteConfig if none could be found.
 /// </summary>
 private void LoadQuoteConfig()
 {
     this.QuoteFile = QuoteConfig.LoadFromXml(QuotesConfigPath);
     if (this.QuoteFile == null)
     {
         SaveQuoteConfig();
         LoadQuoteConfig();
         return;
     }
 }
Example #2
0
 /// <summary>
 /// Saves the QuoteConfig to quotes.xml
 /// </summary>
 public void SaveQuoteConfig()
 {
     if (this.QuoteFile == null)
     {
         QuoteConfig.SaveToXml(QuotesConfigPath, new QuoteConfig());
     }
     else
     {
         QuoteConfig.SaveToXml(QuotesConfigPath, QuoteFile);
     }
 }