示例#1
0
 private static void Load()
 {
     try
     {
         //String fileName = Conquest.PluginPath + "Settings-Conquest.xml";
         //if (File.Exists(fileName))
         //{
         //	using (StreamReader reader = new StreamReader(fileName))
         //	{
         //		XmlSerializer x = new XmlSerializer(typeof(Conquest));
         //		m_instance = (GMConquest)x.Deserialize(reader);
         //		reader.Close();
         //	}
         //}
         //else
         m_instance = new GMConquest();
     }
     catch (Exception ex)
     {
         m_instance = new GMConquest();
         Log.Info(string.Format("Conquest Load Error: {0}", ex.ToString()));
     }
 }
示例#2
0
		private static void Load()
		{
			try
			{
				//String fileName = Conquest.PluginPath + "Settings-Conquest.xml";
				//if (File.Exists(fileName))
				//{
				//	using (StreamReader reader = new StreamReader(fileName))
				//	{
				//		XmlSerializer x = new XmlSerializer(typeof(Conquest));
				//		m_instance = (GMConquest)x.Deserialize(reader);
				//		reader.Close();
				//	}
				//}
				//else
					m_instance = new GMConquest();
			}
			catch (Exception ex)
			{
				m_instance = new GMConquest();
				Log.Info(string.Format("Conquest Load Error: {0}", ex.ToString()));
			}
		}