Esempio n. 1
0
        /// <summary>
        /// 保存xml
        /// </summary>
        /// <returns></returns>
        public static void Save <T>(IEnumerable <T> model) where T : class, new()
        {
            var xmlPath = string.Format("{0}.xml", typeof(T).Name);

            XmlHelper.Save(model, xmlPath);
        }
Esempio n. 2
0
 private void SaveToolStripMenuItem_Click(object sender, EventArgs e)
 {
     XmlHelper.Save <Clock>(ClockCaches.Select(item => item.Value));
     MessageBox.Show("保存成功");
 }