Ejemplo n.º 1
0
            public CE_NOTIFICATION_TRIGGER(NOTIFICATION_EVENT notificationEvent)
            {
                dwSize  = (uint)Marshal.SizeOf(typeof(CE_NOTIFICATION_TRIGGER));
                dwType  = CNT_TYPE.CNT_EVENT;
                dwEvent = notificationEvent;

                lpszApplication = new SmartString(null);
                lpszArguments   = new SmartString(null);

                startTime = DateTimeToSystemTime(DateTime.Now);
                endTime   = DateTimeToSystemTime(DateTime.Now.AddDays(1));
            }
Ejemplo n.º 2
0
            public CE_NOTIFICATION_TRIGGER(DateTime start)
            {
                dwSize  = (uint)Marshal.SizeOf(typeof(CE_NOTIFICATION_TRIGGER));
                dwType  = CNT_TYPE.CNT_TIME;
                dwEvent = NOTIFICATION_EVENT.NONE;

                lpszApplication = new SmartString(null);
                lpszArguments   = new SmartString(null);

                startTime = DateTimeToSystemTime(start);
                endTime   = new SYSTEMTIME();
            }
Ejemplo n.º 3
0
            public CE_NOTIFICATION_TRIGGER(string application, string arguments,
                                           NOTIFICATION_EVENT notificationEvent)
            {
                dwSize  = (uint)Marshal.SizeOf(typeof(CE_NOTIFICATION_TRIGGER));
                dwType  = CNT_TYPE.CNT_EVENT;
                dwEvent = notificationEvent;

                lpszApplication = new SmartString(application);
                lpszArguments   = new SmartString(arguments);

                startTime = DateTimeToSystemTime(DateTime.Now);
                endTime   = new SYSTEMTIME();
            }
Ejemplo n.º 4
0
        public static void RunApplication(string application, string arguments,
                                          NOTIFICATION_EVENT notificationEvent)
        {
            CE_NOTIFICATION_TRIGGER nt =
                new CE_NOTIFICATION_TRIGGER(application, arguments, notificationEvent);

            using ( nt )
            {
                IntPtr hNotify = CeSetUserNotificationEx(IntPtr.Zero, ref nt, IntPtr.Zero);

                if (hNotify == IntPtr.Zero)
                {
                    throw new Win32Exception(Marshal.GetLastWin32Error());
                }
            }
        }
Ejemplo n.º 5
0
        public static void NotifyDialog(string title, string text,
                                        NOTIFICATION_EVENT notificationEvent)
        {
            CE_NOTIFICATION_TRIGGER nt =
                new CE_NOTIFICATION_TRIGGER(notificationEvent);

            CE_USER_NOTIFICATION un = new CE_USER_NOTIFICATION(title, text);

            using (nt)
                using ( un )
                {
                    IntPtr hNotify = CeSetUserNotificationEx(IntPtr.Zero, ref nt, ref un);

                    if (hNotify == IntPtr.Zero)
                    {
                        throw new Win32Exception(Marshal.GetLastWin32Error());
                    }
                }
        }
        public static void NotifyDialog( string title, string text,  
            NOTIFICATION_EVENT notificationEvent )
        {

            CE_NOTIFICATION_TRIGGER nt = 
                new CE_NOTIFICATION_TRIGGER( notificationEvent );

            CE_USER_NOTIFICATION un = new CE_USER_NOTIFICATION( title, text );

            using( nt )
            using( un )
            {
                IntPtr hNotify = CeSetUserNotificationEx( IntPtr.Zero, ref nt, ref un );
                    
                if( hNotify == IntPtr.Zero )
                {
                    throw new Win32Exception( Marshal.GetLastWin32Error() );
                }
            }
        }
        public static void RunApplication( string application, string arguments,  
            NOTIFICATION_EVENT notificationEvent )
        {
            CE_NOTIFICATION_TRIGGER nt = 
                new CE_NOTIFICATION_TRIGGER( application, arguments, notificationEvent );

            using( nt )
            {
                IntPtr hNotify = CeSetUserNotificationEx( IntPtr.Zero, ref nt, IntPtr.Zero );
                    
                if( hNotify == IntPtr.Zero )
                {
                    throw new Win32Exception( Marshal.GetLastWin32Error() );
                }
            }
        }
            public CE_NOTIFICATION_TRIGGER( NOTIFICATION_EVENT notificationEvent )
            {
                dwSize  = (uint)Marshal.SizeOf( typeof(CE_NOTIFICATION_TRIGGER) );
                dwType  = CNT_TYPE.CNT_EVENT;
                dwEvent = notificationEvent;
        
                lpszApplication    = new SmartString( null );
                lpszArguments    = new SmartString( null );

                startTime = DateTimeToSystemTime( DateTime.Now );
                endTime = DateTimeToSystemTime( DateTime.Now.AddDays(1) );
            }
            public CE_NOTIFICATION_TRIGGER( string application, string arguments,
                NOTIFICATION_EVENT notificationEvent )
            {
                dwSize  = (uint)Marshal.SizeOf( typeof(CE_NOTIFICATION_TRIGGER) );
                dwType  = CNT_TYPE.CNT_EVENT;
                dwEvent = notificationEvent;
        
                lpszApplication    = new SmartString(application);
                lpszArguments    = new SmartString(arguments);

                startTime = DateTimeToSystemTime( DateTime.Now );
                endTime = new SYSTEMTIME();
            }
            public CE_NOTIFICATION_TRIGGER( DateTime start )
            {
                dwSize  = (uint)Marshal.SizeOf( typeof(CE_NOTIFICATION_TRIGGER) );
                dwType  = CNT_TYPE.CNT_TIME;
                dwEvent = NOTIFICATION_EVENT.NONE;
        
                lpszApplication    = new SmartString( null );
                lpszArguments    = new SmartString( null );

                startTime = DateTimeToSystemTime( start );
                endTime = new SYSTEMTIME();
            }
Ejemplo n.º 11
0
		private static extern int CeRunAppAtEvent(string pwszAppName, NOTIFICATION_EVENT lWhichEvent);