public RecipeIngredientSet OpenSet(string FileName)
        {
            RecipeIngredientSet ReturnSet = this;

            ReturnSet.Clear();
            FileName += "." + RelatedRecipe.Name + FileExtension;
            using (Stream fs = new FileStream(FileName, FileMode.Open))
            {
                System.Xml.Serialization.XmlSerializer x = new System.Xml.Serialization.XmlSerializer(ReturnSet.GetType());
                ReturnSet = (RecipeIngredientSet)x.Deserialize(fs);
            }
            return(ReturnSet);
        }// --> Data
示例#2
0
        private string _Summary;      // Summary
                                      //private bool _ToTakeAway;


        //Constructors
        public Recipe()
        {
            _Ingredients = new RecipeIngredientSet(IngredientSetData, UnitSetData, UnitTranslationSetData, this);
        }