Ejemplo n.º 1
0
 internal TaskDialogVerificationEventArgs(TaskDialogDriver driver, bool verificationChecked)
     : base(driver)
 {
     VerificationChecked = verificationChecked;
 }
Ejemplo n.º 2
0
 internal TaskDialogHyperlinkEventArgs(TaskDialogDriver driver, string url)
     : base(driver)
 {
     Url = url;
 }
Ejemplo n.º 3
0
 internal TaskDialogTimerEventArgs(TaskDialogDriver driver, int tickCount)
     : base(driver)
 {
     TickCount      = tickCount;
     ResetTickCount = false;
 }
Ejemplo n.º 4
0
 internal TaskDialogButtonEventArgs(TaskDialogDriver driver, int buttonId)
     : base(driver)
 {
     ButtonId = buttonId;
 }
Ejemplo n.º 5
0
 internal TaskDialogExpandoEventArgs(TaskDialogDriver driver, bool expanded)
     : base(driver)
 {
     Expanded = expanded;
 }
Ejemplo n.º 6
0
        private IntPtr Callback(IntPtr hwnd, uint msg, IntPtr wParam, IntPtr lParam, IntPtr lpRefData)
        {
            TaskDialogDriver driver = new TaskDialogDriver(hwnd);

            switch (msg)
            {
            case (uint)TASKDIALOG_NOTIFICATIONS.TDN_BUTTON_CLICKED:
                if (ButtonClicked != null)
                {
                    ButtonClicked(this, new TaskDialogButtonEventArgs(driver, wParam.ToInt32()));
                }
                break;

            case (uint)TASKDIALOG_NOTIFICATIONS.TDN_CREATED:
                if (Created != null)
                {
                    Created(this, new TaskDialogEventArgs(driver));
                }
                break;

            case (uint)TASKDIALOG_NOTIFICATIONS.TDN_DESTROYED:
                if (Destroyed != null)
                {
                    Destroyed(this, new TaskDialogEventArgs(driver));
                }
                break;

            case (uint)TASKDIALOG_NOTIFICATIONS.TDN_DIALOG_CONSTRUCTED:
                if (DialogConstructed != null)
                {
                    DialogConstructed(this, new TaskDialogEventArgs(driver));
                }
                break;

            case (uint)TASKDIALOG_NOTIFICATIONS.TDN_EXPANDO_BUTTON_CLICKED:
                if (ExpandoButtonClicked != null)
                {
                    ExpandoButtonClicked(this, new TaskDialogExpandoEventArgs(driver, wParam != IntPtr.Zero));
                }
                break;

            case (uint)TASKDIALOG_NOTIFICATIONS.TDN_HELP:
                if (Help != null)
                {
                    Help(this, new TaskDialogEventArgs(driver));
                }
                break;

            case (uint)TASKDIALOG_NOTIFICATIONS.TDN_HYPERLINK_CLICKED:
                if (HyperlinkClicked != null)
                {
                    HyperlinkClicked(this, new TaskDialogHyperlinkEventArgs(driver, Marshal.PtrToStringUni(lParam)));
                }
                break;

            /*
             * case (uint)TASKDIALOG_NOTIFICATIONS.TDN_NAVIGATED:
             * if (Navigated != null)
             *  Navigated(this, new TaskDialogEventArgs(driver));
             * break;
             */
            case (uint)TASKDIALOG_NOTIFICATIONS.TDN_RADIO_BUTTON_CLICKED:
                if (RadioButtonClicked != null)
                {
                    RadioButtonClicked(this, new TaskDialogButtonEventArgs(driver, wParam.ToInt32()));
                }
                break;

            case (uint)TASKDIALOG_NOTIFICATIONS.TDN_TIMER:
                if (TimerTicked != null)
                {
                    TaskDialogTimerEventArgs args = new TaskDialogTimerEventArgs(driver, wParam.ToInt32());
                    TimerTicked(this, args);
                    if (args.ResetTickCount)
                    {
                        return(new IntPtr(1));
                    }
                }
                break;

            case (uint)TASKDIALOG_NOTIFICATIONS.TDN_VERIFICATION_CLICKED:
                if (VerificationClicked != null)
                {
                    VerificationClicked(this, new TaskDialogVerificationEventArgs(driver, wParam.ToInt32() == 1));
                }
                break;
            }
            return(IntPtr.Zero);
        }
Ejemplo n.º 7
0
 internal TaskDialogEventArgs(TaskDialogDriver driver)
 {
     TaskDialog = driver;
 }
Ejemplo n.º 8
0
 internal TaskDialogTimerEventArgs(TaskDialogDriver driver, int tickCount)
     : base(driver)
 {
     TickCount = tickCount;
     ResetTickCount = false;
 }
Ejemplo n.º 9
0
 internal TaskDialogVerificationEventArgs(TaskDialogDriver driver, bool verificationChecked)
     : base(driver)
 {
     VerificationChecked = verificationChecked;
 }
Ejemplo n.º 10
0
 internal TaskDialogHyperlinkEventArgs(TaskDialogDriver driver, string url)
     : base(driver)
 {
     Url = url;
 }
Ejemplo n.º 11
0
 internal TaskDialogExpandoEventArgs(TaskDialogDriver driver, bool expanded)
     : base(driver)
 {
     Expanded = expanded;
 }
Ejemplo n.º 12
0
 internal TaskDialogButtonEventArgs(TaskDialogDriver driver, int buttonId)
     : base(driver)
 {
     ButtonId = buttonId;
 }
Ejemplo n.º 13
0
 internal TaskDialogEventArgs(TaskDialogDriver driver)
 {
     TaskDialog = driver;
 }
Ejemplo n.º 14
0
 private IntPtr Callback(IntPtr hwnd, uint msg, IntPtr wParam, IntPtr lParam, IntPtr lpRefData)
 {
     TaskDialogDriver driver = new TaskDialogDriver(hwnd);
     switch (msg)
     {
         case (uint)TASKDIALOG_NOTIFICATIONS.TDN_BUTTON_CLICKED:
             if (ButtonClicked != null)
                 ButtonClicked(this, new TaskDialogButtonEventArgs(driver, wParam.ToInt32()));
             break;
         case (uint)TASKDIALOG_NOTIFICATIONS.TDN_CREATED:
             if (Created != null)
                 Created(this, new TaskDialogEventArgs(driver));
             break;
         case (uint)TASKDIALOG_NOTIFICATIONS.TDN_DESTROYED:
             if (Destroyed != null)
                 Destroyed(this, new TaskDialogEventArgs(driver));
             break;
         case (uint)TASKDIALOG_NOTIFICATIONS.TDN_DIALOG_CONSTRUCTED:
             if (DialogConstructed != null)
                 DialogConstructed(this, new TaskDialogEventArgs(driver));
             break;
         case (uint)TASKDIALOG_NOTIFICATIONS.TDN_EXPANDO_BUTTON_CLICKED:
             if (ExpandoButtonClicked != null)
                 ExpandoButtonClicked(this, new TaskDialogExpandoEventArgs(driver, wParam != IntPtr.Zero));
             break;
         case (uint)TASKDIALOG_NOTIFICATIONS.TDN_HELP:
             if (Help != null)
                 Help(this, new TaskDialogEventArgs(driver));
             break;
         case (uint)TASKDIALOG_NOTIFICATIONS.TDN_HYPERLINK_CLICKED:
             if (HyperlinkClicked != null)
                 HyperlinkClicked(this, new TaskDialogHyperlinkEventArgs(driver, Marshal.PtrToStringUni(lParam)));
             break;
         /*
     case (uint)TASKDIALOG_NOTIFICATIONS.TDN_NAVIGATED:
         if (Navigated != null)
             Navigated(this, new TaskDialogEventArgs(driver));
         break;
          */
         case (uint)TASKDIALOG_NOTIFICATIONS.TDN_RADIO_BUTTON_CLICKED:
             if (RadioButtonClicked != null)
                 RadioButtonClicked(this, new TaskDialogButtonEventArgs(driver, wParam.ToInt32()));
             break;
         case (uint)TASKDIALOG_NOTIFICATIONS.TDN_TIMER:
             if (TimerTicked != null)
             {
                 TaskDialogTimerEventArgs args = new TaskDialogTimerEventArgs(driver, wParam.ToInt32());
                 TimerTicked(this, args);
                 if (args.ResetTickCount)
                     return new IntPtr(1);
             }
             break;
         case (uint)TASKDIALOG_NOTIFICATIONS.TDN_VERIFICATION_CLICKED:
             if (VerificationClicked != null)
                 VerificationClicked(this, new TaskDialogVerificationEventArgs(driver, wParam.ToInt32() == 1));
             break;
     }
     return IntPtr.Zero;
 }