예제 #1
0
 public static bool SaveToFileCandySet(string candySetName, CandySet candySet = null)
 {
     if (candySet == null)
     {
         return(false);
     }
     try
     {
         Serializer.SaveToXml(Path.Combine(Program.AppPath, Program.CandySetData[0], Path.ChangeExtension(candySetName, Program.CandySetData[1])), candySet);
         return(true);
     }
     catch (Exception e)
     {
         Console.WriteLine("Error:{0}", e.Message);
     }
     return(false);
 }
예제 #2
0
 private void LoadFormXml(string fileName = "CandySet.xml")
 {
     _candySet = Serializer.LoadFromXml <CandySet>(fileName);
 }