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); } }
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(); }
void Dispatcher_ShutdownStarted(object sender, EventArgs e) { DisabledItems.SaveDisabledItems(PathType, Items); }