Change-Id: Icc6b60ad130fddc0d4499d892a770ec36c973045
Signed-off-by: jinwang.an <jinwang.an@samsung.com>
+
+ /// <summary>
+ /// Once System changes time, this event occurs to notify time change.
+ /// </summary>
+ public static int Time
+ {
+ get
+ {
+ int time;
+ SystemSettingsError res = (SystemSettingsError)Interop.Settings.SystemSettingsGetValueInt(SystemSettingsKeys.Time, out time);
+ if (res != SystemSettingsError.None)
+ {
+ throw SystemSettingsExceptionFactory.CreateException(res, "unable to get Time system setting.");
+ }
+ return time;
+ }
+ }
/// <summary>
/// Indicates whether the screen lock sound is enabled on the device. ex) LCD on/off sound
/// </summary>
/// <summary>
/// Indicates whether the screen lock sound is enabled on the device. ex) LCD on/off sound
/// </summary>
private static readonly Interop.Settings.SystemSettingsChangedCallback s_timeChangedCallback = (SystemSettingsKeys key, IntPtr userData) =>
{
private static readonly Interop.Settings.SystemSettingsChangedCallback s_timeChangedCallback = (SystemSettingsKeys key, IntPtr userData) =>
{
- //bool motionActivation = SystemSettings.Time;
- TimeChangedEventArgs eventArgs = new TimeChangedEventArgs();
+
+ int time = SystemSettings.Time;
+ TimeChangedEventArgs eventArgs = new TimeChangedEventArgs(time);
s_timeChanged?.Invoke(null, eventArgs);
};
private static event EventHandler<TimeChangedEventArgs> s_timeChanged;
s_timeChanged?.Invoke(null, eventArgs);
};
private static event EventHandler<TimeChangedEventArgs> s_timeChanged;
/// </summary>
public class TimeChangedEventArgs : EventArgs
{
/// </summary>
public class TimeChangedEventArgs : EventArgs
{
- internal TimeChangedEventArgs()
+ private readonly int _time;
+ internal TimeChangedEventArgs(int val)
+ _time = val;
+ }
+ public int Value
+ {
+ get
+ {
+ return _time;
+ }
case SystemSettingsError.InvalidParameter:
exp = new ArgumentException(msg);
break;
case SystemSettingsError.InvalidParameter:
exp = new ArgumentException(msg);
break;
+ case SystemSettingsError.NotSupported:
+ exp = new NotSupportedException(msg);
+ break;
case SystemSettingsError.OutOfMemory:
//fall through
case SystemSettingsError.IoError:
//fall through
case SystemSettingsError.PermissionDenied:
//fall through
case SystemSettingsError.OutOfMemory:
//fall through
case SystemSettingsError.IoError:
//fall through
case SystemSettingsError.PermissionDenied:
//fall through
- case SystemSettingsError.NotSupported:
- exp = new NotSupportedException(msg);
- break;
case SystemSettingsError.LockScreenAppPasswordMode:
//fall through
default:
case SystemSettingsError.LockScreenAppPasswordMode:
//fall through
default:
Name: csapi-system-settings
Summary: Tizen System Settings API for C#
Name: csapi-system-settings
Summary: Tizen System Settings API for C#
Release: 1
Group: Development/Libraries
License: Apache-2.0
Release: 1
Group: Development/Libraries
License: Apache-2.0