ReSharper code cleanup

This commit is contained in:
kay.one
2011-04-09 19:44:01 -07:00
parent 8cade435d1
commit e896af5cd0
138 changed files with 2368 additions and 2218 deletions
+17 -67
View File
@@ -1,9 +1,6 @@
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using NzbDrone.Core.Model;
@@ -11,110 +8,63 @@ namespace NzbDrone.Web.Models
{
public class DownloadSettingsModel
{
public SelectList PrioritySelectList =
new SelectList(new[] {"Default", "Paused", "Low", "Normal", "High", "Top"});
[Required]
[Range(15, 120, ErrorMessage = "Must be between 15 and 120 minutes")]
[DataType(DataType.Text)]
[DisplayName("Sync Frequency")]
public int SyncFrequency
{
get;
set;
}
public int SyncFrequency { get; set; }
[DisplayName("Download Propers")]
public bool DownloadPropers
{
get;
set;
}
public bool DownloadPropers { get; set; }
[Required (ErrorMessage = "Please enter a valid number")]
[Required(ErrorMessage = "Please enter a valid number")]
[DataType(DataType.Text)]
[DisplayName("Retention")]
public int Retention
{
get;
set;
}
public int Retention { get; set; }
[Required (ErrorMessage = "Please enter a valid host")]
[Required(ErrorMessage = "Please enter a valid host")]
[DataType(DataType.Text)]
[DisplayName("SABnzbd Host")]
public String SabHost
{
get;
set;
}
public String SabHost { get; set; }
[Required(ErrorMessage = "Please enter a valid port")]
[DataType(DataType.Text)]
[DisplayName("SABnzbd Port")]
public int SabPort
{
get;
set;
}
public int SabPort { get; set; }
[DataType(DataType.Text)]
[DisplayName("SABnzbd API Key")]
[DisplayFormat(ConvertEmptyStringToNull = false)]
public String SabApiKey
{
get;
set;
}
public String SabApiKey { get; set; }
[DataType(DataType.Text)]
[DisplayName("SABnzbd Username")]
[DisplayFormat(ConvertEmptyStringToNull = false)]
public String SabUsername
{
get;
set;
}
public String SabUsername { get; set; }
[DataType(DataType.Text)]
[DisplayName("SABnzbd Password")]
[DisplayFormat(ConvertEmptyStringToNull = false)]
public String SabPassword
{
get;
set;
}
public String SabPassword { get; set; }
[DataType(DataType.Text)]
[DisplayFormat(ConvertEmptyStringToNull = false)]
[DisplayName("SABnzbd TV Category")]
public String SabTvCategory
{
get;
set;
}
public String SabTvCategory { get; set; }
[Required(ErrorMessage = "Please select a valid priority")]
[DisplayName("SABnzbd Priority")]
public SabnzbdPriorityType SabTvPriority
{
get;
set;
}
public SabnzbdPriorityType SabTvPriority { get; set; }
[DisplayName("Use Blackhole")]
public bool UseBlackHole
{
get;
set;
}
public bool UseBlackHole { get; set; }
[DataType(DataType.Text)]
[DisplayFormat(ConvertEmptyStringToNull = false)]
[DisplayName("Blackhole Directory")]
public String BlackholeDirectory
{
get;
set;
}
public SelectList PrioritySelectList = new SelectList(new string[] { "Default", "Paused", "Low", "Normal", "High", "Top" });
public String BlackholeDirectory { get; set; }
}
}