예제 #1
0
 public static void SetYears(int delta)
 {
     SafeNativeMethods.SystemTime time = new SafeNativeMethods.SystemTime();
     SafeNativeMethods.GetSystemTime(ref time);
     Debug.Assert(delta <short.MaxValue && delta> short.MinValue);
     time.wYear += (short)delta;
     SafeNativeMethods.SetSystemTime(ref time);
 }
예제 #2
0
 public static int GetCurrentYear()
 {
     SafeNativeMethods.SystemTime time = new SafeNativeMethods.SystemTime();
     SafeNativeMethods.GetSystemTime(ref time);
     return(time.wYear);
 }