コード例 #1
0
        public configForm()
        {
            InitializeComponent();
            cList = ConditonList.Load("Task_Yomikae.config");

            foreach (Condition e in cList.clist)
            {
                ListViewItem additem = new ListViewItem(e.ToString());
                additem.Tag = e;
                listView1.Items.Add(additem);
            }
        }
コード例 #2
0
        public static ConditonList Load(Stream stream)
        {
            ConditonList configData = null;

            try
            {
                System.Xml.Serialization.XmlSerializer xs = new XmlSerializer(typeof(ConditonList));
                configData = xs.Deserialize(stream) as ConditonList;
            }
            catch { }

            return(configData != null ? configData : new ConditonList());
        }