Пример #1
0
        private void Reload()
        {
            var itemList         = PathReader.ReadPath(PathType);
            var disabledItemList = DisabledItems.ReadDisabledItems(PathType);

            var items = itemList.Concat(disabledItemList)
                        .Distinct(new PathEntry.PathEqualityComparer());

            Items.Clear();
            foreach (var item in items)
            {
                Items.Add(item);
            }
        }
Пример #2
0
 private void Save_Click(object sender, RoutedEventArgs e)
 {
     PathReader.SavePathToRegistry(PathType, PathReader.ItemsToPathString(Items));
     if (PathType == PathType.User)
     {
         PathReader.SavePathToRegistry(PathType, PathReader.ItemsToPathString(Items));
     }
     else
     {
         BatchMode.UseBatchModeAsAdmin(Items);
     }
     DisabledItems.SaveDisabledItems(PathType, Items);
     PathBox.Focus();
 }
Пример #3
0
 void Dispatcher_ShutdownStarted(object sender, EventArgs e)
 {
     DisabledItems.SaveDisabledItems(PathType, Items);
 }