ReSharper: remove redundant code

This commit is contained in:
bao-qian
2016-01-06 21:34:42 +00:00
parent ae42c4df16
commit 0daa3a8f57
65 changed files with 279 additions and 250 deletions

View File

@@ -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);