mirror of
https://github.com/microsoft/PowerToys.git
synced 2026-02-24 04:00:02 +01:00
ReSharper: remove redundant code
This commit is contained in:
@@ -1,11 +1,14 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.IO;
|
||||
using Microsoft.Win32;
|
||||
using Wox.Infrastructure.Logger;
|
||||
|
||||
namespace Wox.Plugin.Program.ProgramSources
|
||||
{
|
||||
[Serializable]
|
||||
[System.ComponentModel.Browsable(false)]
|
||||
[Browsable(false)]
|
||||
public class AppPathsProgramSource : AbstractProgramSource
|
||||
{
|
||||
public AppPathsProgramSource()
|
||||
@@ -28,7 +31,7 @@ namespace Wox.Plugin.Program.ProgramSources
|
||||
|
||||
private void ReadAppPaths(string rootpath, List<Program> list)
|
||||
{
|
||||
using (var root = Microsoft.Win32.Registry.LocalMachine.OpenSubKey(rootpath))
|
||||
using (var root = Registry.LocalMachine.OpenSubKey(rootpath))
|
||||
{
|
||||
if (root == null) return;
|
||||
foreach (var item in root.GetSubKeyNames())
|
||||
@@ -49,7 +52,7 @@ namespace Wox.Plugin.Program.ProgramSources
|
||||
path = path.Substring(begin + 1, path.Length - 2);
|
||||
}
|
||||
|
||||
if (!System.IO.File.Exists(path)) continue;
|
||||
if (!File.Exists(path)) continue;
|
||||
var entry = CreateEntry(path);
|
||||
entry.ExecuteName = item;
|
||||
list.Add(entry);
|
||||
|
||||
Reference in New Issue
Block a user