chr
2024-03-01 e0b72976c15d99c2972d20925bf438c0c7055ad6
UI/Test/ProgramList.xaml.cs
@@ -1,9 +1,12 @@
using System;
using System.Collections.ObjectModel;
using System.ComponentModel;
using System.IO;
using System.Runtime.CompilerServices;
using System.Windows.Controls;
using System.Xml.Serialization;
using WPFProject.Models;
using WPFProject.Utils;
namespace WPFProject.UI.Test
{
@@ -73,10 +76,17 @@
        private void ListView_SelectionChanged(object sender, SelectionChangedEventArgs e)
        {
            ttt();
            if (e.AddedItems.Count > 0)
            {
                ProgramChanged?.Invoke(this, e.AddedItems[0] as Program);
            }
        }
        public void ttt()
        {
            string path = "X:\\vs\\WPFProject\\test.xml";
            XmlUtil.SerialToFile(Programs, path);
        }
    }
}