Skip to content

Commit a0a6e1a

Browse files
committed
remove roaming setting feature
1 parent 966fa39 commit a0a6e1a

File tree

1 file changed

+0
-50
lines changed

1 file changed

+0
-50
lines changed

GestureSign.Common/Configuration/AppConfig.cs

Lines changed: 0 additions & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66
using System.IO;
77
using System.Runtime.InteropServices;
88
using System.Threading;
9-
using Windows.Storage;
109

1110
namespace GestureSign.Common.Configuration
1211
{
@@ -278,20 +277,6 @@ private static T GetValue<T>(string key, T defaultValue, Func<string, T> convert
278277
return defaultValue;
279278
}
280279
}
281-
#if ConvertedDesktopApp
282-
var roamingSetting = GetRoamingSetting(key);
283-
if (roamingSetting != null)
284-
{
285-
try
286-
{
287-
return (T)roamingSetting;
288-
}
289-
catch
290-
{
291-
return defaultValue;
292-
}
293-
}
294-
#endif
295280
return defaultValue;
296281
}
297282

@@ -368,10 +353,6 @@ private static void SetValue<T>(string key, T value)
368353
_config.AppSettings.Settings.Add(key, value.ToString());
369354
}
370355
Save();
371-
372-
#if ConvertedDesktopApp
373-
SetRoamingSetting(key, value);
374-
#endif
375356
}
376357

377358
private static void SetValue(string key, System.Drawing.Color value)
@@ -384,37 +365,6 @@ private static void SetValue(string key, DateTime value)
384365
SetValue(key, value.ToString(CultureInfo.InvariantCulture));
385366
}
386367

387-
#if ConvertedDesktopApp
388-
private static bool SetRoamingSetting<T>(string key, T value)
389-
{
390-
try
391-
{
392-
ApplicationDataContainer roamingSettings = ApplicationData.Current.RoamingSettings;
393-
roamingSettings.Values[key] = value;
394-
return true;
395-
}
396-
catch (Exception e)
397-
{
398-
Logging.LogException(e);
399-
return false;
400-
}
401-
}
402-
403-
private static object GetRoamingSetting(string key)
404-
{
405-
try
406-
{
407-
ApplicationDataContainer roamingSettings = ApplicationData.Current.RoamingSettings;
408-
return roamingSettings.Values[key];
409-
}
410-
catch (Exception e)
411-
{
412-
Logging.LogException(e);
413-
return null;
414-
}
415-
}
416-
#endif
417-
418368
private static bool GetWindowGlassColor(out System.Drawing.Color windowGlassColor)
419369
{
420370
if (Environment.OSVersion.Version.Major >= 6 && IsThemeActive() != 0)

0 commit comments

Comments
 (0)