Esempio n. 1
0
        public static void SaveSeriesXML(TVSeriesItem tvSeriesItem, String fileName)
        {
            try
            {
                XmlSerializer xs = new XmlSerializer(typeof(TVSeriesItem));

                using (TextWriter tw = new StreamWriter(fileName))
                {
                    xs.Serialize(tw, tvSeriesItem);

                    tw.Close();
                }
            }
            catch (Exception ex)
            {
                Console.WriteLine(ex.Message);
            }
        }
Esempio n. 2
0
        /// <summary>
        /// Used to write the XML file
        /// </summary>
        /// <param name="data"></param>
        /// <param name="fileName"></param>
        public static void SaveDataXML(TVSeriesItem data, String fileName)
        {
            try
            {
                XmlSerializer xs = new XmlSerializer(typeof(TVSeriesItem));

                using (TextWriter tw = new StreamWriter(fileName))
                {
                    xs.Serialize(tw, data);

                    tw.Close();
                }
            }
            catch (Exception ex)
            {
//                MessageBox.Show(ex.Message);
            }
        }
Esempio n. 3
0
        public static TVSeriesItem _GetDataFromXML(string fileName)
        {
            TVSeriesItem tvSeriesItem = new TVSeriesItem();

            return(tvSeriesItem);
        }