Skip to content

Commit abc1933

Browse files
authored
Merge pull request #45 from mukunku/v2.3.5
V2.3.5
2 parents cbfefce + e0fc7c3 commit abc1933

File tree

5 files changed

+173
-72
lines changed

5 files changed

+173
-72
lines changed

src/ParquetFileViewer/AppSettings.cs

+29-10
Original file line numberDiff line numberDiff line change
@@ -12,19 +12,30 @@ public static bool UseISODateFormat
1212
{
1313
get
1414
{
15-
using (RegistryKey registryKey = Registry.CurrentUser.CreateSubKey("ParquetViewer"))
15+
try
1616
{
17-
bool value = false;
18-
bool.TryParse(registryKey.GetValue(UseISODateFormatKey)?.ToString(), out value);
19-
return value;
17+
using (RegistryKey registryKey = Registry.CurrentUser.CreateSubKey("ParquetViewer"))
18+
{
19+
bool value = false;
20+
bool.TryParse(registryKey.GetValue(UseISODateFormatKey)?.ToString(), out value);
21+
return value;
22+
}
23+
}
24+
catch
25+
{
26+
return false;
2027
}
2128
}
2229
set
2330
{
24-
using (RegistryKey registryKey = Registry.CurrentUser.CreateSubKey("ParquetViewer"))
31+
try
2532
{
26-
registryKey.SetValue(UseISODateFormatKey, value.ToString());
33+
using (RegistryKey registryKey = Registry.CurrentUser.CreateSubKey("ParquetViewer"))
34+
{
35+
registryKey.SetValue(UseISODateFormatKey, value.ToString());
36+
}
2737
}
38+
catch { }
2839
}
2940
}
3041

@@ -48,10 +59,14 @@ public static bool AlwaysSelectAllFields
4859
}
4960
set
5061
{
51-
using (RegistryKey registryKey = Registry.CurrentUser.CreateSubKey("ParquetViewer"))
62+
try
5263
{
53-
registryKey.SetValue(AlwaysSelectAllFieldsKey, value.ToString());
64+
using (RegistryKey registryKey = Registry.CurrentUser.CreateSubKey("ParquetViewer"))
65+
{
66+
registryKey.SetValue(AlwaysSelectAllFieldsKey, value.ToString());
67+
}
5468
}
69+
catch { }
5570
}
5671
}
5772

@@ -77,10 +92,14 @@ public static ParquetEngine ReadingEngine
7792
}
7893
set
7994
{
80-
using (RegistryKey registryKey = Registry.CurrentUser.CreateSubKey("ParquetViewer"))
95+
try
8196
{
82-
registryKey.SetValue(ParquetReadingEngineKey, value.ToString());
97+
using (RegistryKey registryKey = Registry.CurrentUser.CreateSubKey("ParquetViewer"))
98+
{
99+
registryKey.SetValue(ParquetReadingEngineKey, value.ToString());
100+
}
83101
}
102+
catch { }
84103
}
85104
}
86105
}

src/ParquetFileViewer/FieldSelectionDialog.Designer.cs

+51-18
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)