예제 #1
0
        private void dialogIcons_RadioButtonClick(object sender, EventArgs e)
        {
            C1TaskDialog dialog = (C1TaskDialog)sender;

            switch (dialog.SelectedRadioButton.Name)
            {
            case "radioNone":
                dialog.MainCommonIcon   = TaskDialogCommonIcon.None;
                dialog.FooterCommonIcon = TaskDialogCommonIcon.None;
                break;

            case "radioError":
                dialog.MainCommonIcon   = TaskDialogCommonIcon.Error;
                dialog.FooterCommonIcon = TaskDialogCommonIcon.Error;
                break;

            case "radioWarning":
                dialog.MainCommonIcon   = TaskDialogCommonIcon.Warning;
                dialog.FooterCommonIcon = TaskDialogCommonIcon.Warning;
                break;

            case "radioInformation":
                dialog.MainCommonIcon   = TaskDialogCommonIcon.Information;
                dialog.FooterCommonIcon = TaskDialogCommonIcon.Information;
                break;

            case "radioShield":
                dialog.MainCommonIcon   = TaskDialogCommonIcon.Shield;
                dialog.FooterCommonIcon = TaskDialogCommonIcon.Shield;
                break;
            }
        }
예제 #2
0
        private void dialogProgress1_TimerTick(object sender, TaskDialogTimerTickEventArgs e)
        {
            C1TaskDialog dialog = (C1TaskDialog)sender;

            if (e.Ticks <= 5000)
            {
                dialog.MainInstruction   = string.Format("Progress = {0}", e.Ticks);
                dialog.ProgressBar.Value = e.Ticks;
            }
            else
            {
                dialog.MainInstruction   = "Progress = Done";
                dialog.ProgressBar.Value = 5000;
            }
        }
예제 #3
0
        private void sendDialog_TimerTick(object sender, TaskDialogTimerTickEventArgs e)
        {
            C1TaskDialog dialog = (C1TaskDialog)sender;

            if (e.Ticks <= 5000)
            {
                dialog.MainInstruction   = string.Format("Sending ....{0}", e.Ticks);
                dialog.ProgressBar.Value = e.Ticks;
            }
            else
            {
                dialog.MainInstruction   = "Thanks for the feedback!";
                dialog.Content           = "Our developers will get right on that...";
                dialog.ProgressBar.Value = 5000;
            }
        }
예제 #4
0
        private void dialogError_ButtonClick(object sender, TaskDialogButtonClickEventArgs e)
        {
            if (e.DialogResult == TaskDialogResult.Custom &&
                e.CustomButton.Name == "sendButton")
            {
                C1TaskDialog sendDialog = new C1TaskDialog();
                sendDialog.WindowTitle         = "Send Feedback Dialog";
                sendDialog.Content             = "Sending your feedback .....";
                sendDialog.ProgressBar.Maximum = 5000;
                sendDialog.ProgressBar.Visible = true;
                sendDialog.EnableTimer         = true;
                sendDialog.TimerTick          += new TaskDialogTimerTickEventHandler(sendDialog_TimerTick);

                sendDialog.Show();
                sendDialog.Dispose();
            }
        }