Esempio n. 1
0
        public configForm()
        {
            InitializeComponent();
            cList = ConditonList.Load("Task_Yomiyame.config");

            foreach (Condition e in cList.clist)
            {
                ListViewItem additem = new ListViewItem(e.ToString());
                additem.Tag = e;
                listView1.Items.Add(additem);
            }
        }
Esempio n. 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());
        }