예제 #1
0
 internal static extern int CeSetUserNotificationEx(int hNotification, UserNotificationTrigger lpTrigger, UserNotification lpUserNotification);
예제 #2
0
 internal static extern bool CeGetUserNotificationPreferences(IntPtr hWndParent, UserNotification lpNotification);
예제 #3
0
 internal static extern int CeSetUserNotification(int hNotification, string pwszAppName, ref SYSTEMTIME lpTime, UserNotification lpUserNotification);
예제 #4
0
 public static int SetUserNotification(string application, DateTime time, UserNotification notify)
 {
     return SetUserNotification(0, application, time, notify);
 }
예제 #5
0
 public static int SetUserNotification(int handle, string application, DateTime time, UserNotification notify)
 {
     SYSTEMTIME lpTime = SYSTEMTIME.FromDateTime(time);
     int num = NativeMethods.CeSetUserNotification(handle, application, ref lpTime, notify);
     if (num == 0)
     {
         throw new Win32Exception(Marshal.GetLastWin32Error(), "Error setting UserNotification");
     }
     return num;
 }
예제 #6
0
 public static UserNotification GetUserNotificationPreferences(IntPtr hWnd, UserNotification template)
 {
     template.MaxSound = 260;
     template.Sound = new string('\0', 260);
     if (!NativeMethods.CeGetUserNotificationPreferences(hWnd, template))
     {
         throw new Win32Exception(Marshal.GetLastWin32Error(), "Could not get user preferences");
     }
     return template;
 }
예제 #7
0
 public static int SetUserNotification(int handle, UserNotificationTrigger trigger, UserNotification notification)
 {
     int num = NativeMethods.CeSetUserNotificationEx(handle, trigger, notification);
     if (num == 0)
     {
         throw new Win32Exception(Marshal.GetLastWin32Error(), "Error setting UserNotification");
     }
     return num;
 }
예제 #8
0
 public static UserNotification GetUserNotificationPreferences(IntPtr hWnd)
 {
     UserNotification template = new UserNotification();
     return GetUserNotificationPreferences(hWnd, template);
 }
예제 #9
0
        public static int SetUserNotification(int handle, string application, DateTime time, UserNotification notify)
        {
            SYSTEMTIME lpTime = SYSTEMTIME.FromDateTime(time);
            int        num    = NativeMethods.CeSetUserNotification(handle, application, ref lpTime, notify);

            if (num == 0)
            {
                throw new Win32Exception(Marshal.GetLastWin32Error(), "Error setting UserNotification");
            }
            return(num);
        }
예제 #10
0
 public static int SetUserNotification(string application, DateTime time, UserNotification notify)
 {
     return(SetUserNotification(0, application, time, notify));
 }
예제 #11
0
        public static int SetUserNotification(int handle, UserNotificationTrigger trigger, UserNotification notification)
        {
            int num = NativeMethods.CeSetUserNotificationEx(handle, trigger, notification);

            if (num == 0)
            {
                throw new Win32Exception(Marshal.GetLastWin32Error(), "Error setting UserNotification");
            }
            return(num);
        }
예제 #12
0
        public static UserNotification GetUserNotificationPreferences(IntPtr hWnd)
        {
            UserNotification template = new UserNotification();

            return(GetUserNotificationPreferences(hWnd, template));
        }