Exemplo n.º 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);
        }
Exemplo n.º 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;
                    }
                }
            }
        }