diff --git a/DiscImageChef.Settings/Settings.cs b/DiscImageChef.Settings/Settings.cs
index 45eef1001..1a8a9c1c3 100644
--- a/DiscImageChef.Settings/Settings.cs
+++ b/DiscImageChef.Settings/Settings.cs
@@ -41,107 +41,107 @@ using PlatformID = DiscImageChef.Interop.PlatformID;
namespace DiscImageChef.Settings
{
///
- /// Settings
+ /// Settings
///
public class DicSettings
{
///
- /// Statistics
- ///
- public StatsSettings Stats;
- ///
- /// If set to true, reports will be saved locally
+ /// If set to true, reports will be saved locally
///
public bool SaveReportsGlobally;
///
- /// If set to true, reports will be sent to DiscImageChef.Server
+ /// If set to true, reports will be sent to DiscImageChef.Server
///
public bool ShareReports;
+ ///
+ /// Statistics
+ ///
+ public StatsSettings Stats;
}
// TODO: Use this
///
- /// User settings, for media dumps, completely unused
+ /// User settings, for media dumps, completely unused
///
public class UserSettings
{
- public string Name;
public string Email;
+ public string Name;
}
///
- /// Statistics settings
+ /// Statistics settings
///
public class StatsSettings
{
///
- /// If set to true, statistics will be sent to DiscImageChef.Server
- ///
- public bool ShareStats;
- ///
- /// If set to true, benchmark statistics will be stored
+ /// If set to true, benchmark statistics will be stored
///
public bool BenchmarkStats;
///
- /// If set to true, command usage statistics will be stored
+ /// If set to true, command usage statistics will be stored
///
public bool CommandStats;
///
- /// If set to true, device statistics will be stored
+ /// If set to true, device statistics will be stored
///
public bool DeviceStats;
///
- /// If set to true, filesystem statistics will be stored
+ /// If set to true, filesystem statistics will be stored
///
public bool FilesystemStats;
///
- /// If set to true, filters statistics will be stored
+ /// If set to true, filters statistics will be stored
///
public bool FilterStats;
///
- /// If set to true, dump media images statistics will be stored
+ /// If set to true, dump media images statistics will be stored
///
public bool MediaImageStats;
///
- /// If set to true, media scan statistics will be stored
+ /// If set to true, media scan statistics will be stored
///
public bool MediaScanStats;
///
- /// If set to true, partition schemes statistics will be stored
- ///
- public bool PartitionStats;
- ///
- /// If set to true, media types statistics will be stored
+ /// If set to true, media types statistics will be stored
///
public bool MediaStats;
///
- /// If set to true, dump media verification statistics will be stored
+ /// If set to true, partition schemes statistics will be stored
+ ///
+ public bool PartitionStats;
+ ///
+ /// If set to true, statistics will be sent to DiscImageChef.Server
+ ///
+ public bool ShareStats;
+ ///
+ /// If set to true, dump media verification statistics will be stored
///
public bool VerifyStats;
}
///
- /// Manages statistics
+ /// Manages statistics
///
public static class Settings
{
///
- /// Current statistcs
+ /// Current statistcs
///
public static DicSettings Current;
///
- /// Global path to save reports
+ /// Global path to save reports
///
static string ReportsPath { get; set; }
///
- /// Global path to save statistics
+ /// Global path to save statistics
///
public static string StatsPath { get; private set; }
///
- /// Loads settings
+ /// Loads settings
///
public static void LoadSettings()
{
@@ -242,18 +242,20 @@ namespace DiscImageChef.Settings
NSDictionary parsedPreferences = (NSDictionary)BinaryPropertyListParser.Parse(prefsFs);
if(parsedPreferences != null)
{
- Current.SaveReportsGlobally = parsedPreferences.TryGetValue("SaveReportsGlobally", out NSObject obj) && ((NSNumber)obj).ToBool();
+ Current.SaveReportsGlobally =
+ parsedPreferences.TryGetValue("SaveReportsGlobally", out NSObject obj) &&
+ ((NSNumber)obj).ToBool();
- Current.ShareReports = parsedPreferences.TryGetValue("ShareReports", out obj) && ((NSNumber)obj).ToBool();
+ Current.ShareReports = parsedPreferences.TryGetValue("ShareReports", out obj) &&
+ ((NSNumber)obj).ToBool();
if(parsedPreferences.TryGetValue("Stats", out obj))
{
NSDictionary stats = (NSDictionary)obj;
if(stats != null)
- {
Current.Stats = new StatsSettings
- {
+ {
ShareStats =
stats.TryGetValue("ShareStats", out NSObject obj2) &&
((NSNumber)obj2).ToBool(),
@@ -278,7 +280,6 @@ namespace DiscImageChef.Settings
VerifyStats =
stats.TryGetValue("VerifyStats", out obj2) && ((NSNumber)obj2).ToBool()
};
- }
}
else Current.Stats = null;
@@ -321,9 +322,8 @@ namespace DiscImageChef.Settings
bool stats = Convert.ToBoolean(key.GetValue("Statistics"));
if(stats)
- {
Current.Stats = new StatsSettings
- {
+ {
ShareStats = Convert.ToBoolean(key.GetValue("ShareStats")),
BenchmarkStats = Convert.ToBoolean(key.GetValue("BenchmarkStats")),
CommandStats = Convert.ToBoolean(key.GetValue("CommandStats")),
@@ -336,7 +336,6 @@ namespace DiscImageChef.Settings
MediaStats = Convert.ToBoolean(key.GetValue("MediaStats")),
VerifyStats = Convert.ToBoolean(key.GetValue("VerifyStats"))
};
- }
}
break;
@@ -483,13 +482,15 @@ namespace DiscImageChef.Settings
}
}
#pragma warning disable RECS0022 // A catch clause that catches System.Exception and has an empty body
- catch { // ignored
- }
+ catch
+ {
+ // ignored
+ }
#pragma warning restore RECS0022 // A catch clause that catches System.Exception and has an empty body
}
///
- /// Sets default settings as all statistics, share everything
+ /// Sets default settings as all statistics, share everything
///
static void SetDefaultSettings()
{