Ejemplo n.º 1
0
        void PopuplateProfiles()
        {
            var selItem = profiles.SelectedItem as SelectedProfile ?? new SelectedProfile {
                Filename = Program.Settings.LastProfile
            };
            object newSelItem = null;

            profiles.ClearItems();
            foreach (String st in Profile.ListAllProfiles())
            {
                var s = new SelectedProfile {
                    Filename = st
                };
                profiles.AddItem(s);
                if (selItem != null && s.Filename == selItem.Filename)
                {
                    newSelItem = s;
                }
            }
            profiles.SelectedItem = newSelItem;
        }
Ejemplo n.º 2
0
 void PopuplateProfiles()
 {
     var selItem = profiles.SelectedItem as SelectedProfile ?? new SelectedProfile { Filename = Program.Settings.LastProfile };
     object newSelItem = null;
     profiles.ClearItems();
     foreach (String st in Profile.ListAllProfiles())
         {
             var s = new SelectedProfile { Filename = st };
             profiles.AddItem(s);
             if (selItem != null && s.Filename == selItem.Filename)
                 newSelItem = s;
         }
     profiles.SelectedItem = newSelItem;
 }