예제 #1
0
        internal void save()
        {
            var list = new List <string>();

            foreach (var c in flowLayoutPanel1.Controls)
            {
                UserControl1 us = c as UserControl1;
                list.Add(us.Dir);
            }
            XMLSerializer.Serialize <List <string> >("list", list);
        }
예제 #2
0
        internal void load()
        {
            var list = XMLSerializer.Deserialize <List <string> >("list", new List <string>()
            {
                Path.GetDirectoryName(Application.ExecutablePath)
            });

            foreach (var item in list)
            {
                if (Directory.Exists(item))
                {
                    var us = createView(item);
                    if (activeUs == null)
                    {
                        activeUs = us;
                    }
                }
            }
        }