Beispiel #1
0
 private void ComplexTDClicked(object sender, RoutedEventArgs e)
 {
     taskDialog = FindTaskDialog("complexTD");
     bar = (TaskDialogProgressBar)taskDialog.Controls["ProgressBar"];
     taskDialog.ExpandedText += " Link: <A HREF=\"Http://www.microsoft.com\">Microsoft</A>";
     
     taskDialog.Show();
 }
Beispiel #2
0
        // Configuration is applied at dialog creation time
        internal NativeTaskDialog( 
            NativeTaskDialogSettings settings,
            TaskDialog outerDialog)
        {
            nativeDialogConfig = settings.NativeConfiguration;
            this.settings = settings;

            // Wireup dialog proc message loop for this instance
            nativeDialogConfig.pfCallback = new NativeMethods.PFTASKDIALOGCALLBACK(DialogProc);

            // Keep a reference to the outer shell, so we can notify
            this.outerDialog = outerDialog;
        }
Beispiel #3
0
        public Window1()
        {
            InitializeComponent();

            TaskDialog taskDialog = new TaskDialog();
            taskDialog.Content = "Are you sure you want to continue?";
            taskDialog.StandardButtons = TaskDialogStandardButtons.YesNo;
            taskDialog.MainIcon = TaskDialogStandardIcon.Warning;
            taskDialog.Caption = "Confirm Format";
            taskDialog.Instruction = "Confirm Drive Format";
            taskDialog.FooterText = "NOTE: All data stored on the drive will be lost.";
            taskDialog.FooterIcon = TaskDialogStandardIcon.Information;
            TaskDialogResult result = taskDialog.Show();
            result.StandardButtonClicked= TaskDialogStandardButton.Yes 


        }
Beispiel #4
0
 private void SimpleWaitTDClicked(object sender, RoutedEventArgs e)
 {
     taskDialog = FindTaskDialog("simpleWaitTD");
     taskDialog.Show();
 }
Beispiel #5
0
 private void ComplexTD2Clicked(object sender, RoutedEventArgs e)
 {
     taskDialog = FindTaskDialog("complexTD2");
     taskDialog.Show();
 }
Beispiel #6
0
        private void ComplexTDClicked(object sender, RoutedEventArgs e)
        {
            taskDialog = FindTaskDialog("complexTD");

            if (initializedComplexDialog == false)
            {
                taskDialog.ExpandedText += " Link: <A HREF=\"Http://www.microsoft.com\">Microsoft</A>";
                initializedComplexDialog = true;
            }

            taskDialog.Show();
        }
Beispiel #7
0
 private void ConfirmationTDClicked(object sender, RoutedEventArgs e)
 {
     taskDialog = FindTaskDialog("confirmationTD");
     taskDialog.Show();
 }
Beispiel #8
0
        // CORE SHOW METHODS:
        // All static Show() calls forward here - it is responsible for retrieving
        // or creating our cached TaskDialog instance, getting it configured,
        // and in turn calling the appropriate instance Show
        private static TaskDialogResult ShowCoreStatic(string msg, string mainInstruction, string caption)
        {
            // If no instance cached yet, create
            if (staticDialog == null)
            {
                // New TaskDialog will automatically pick up defaults when a new
                // config structure is created as part of ShowCore()
                staticDialog = new TaskDialog();
            }

            // Set the few relevant properties, and go with the defaults for the others
            staticDialog.content = msg;
            staticDialog.instruction = mainInstruction;
            staticDialog.caption = caption;

            // TODO: Call "largest" instance Show(), so we don't have to repeat setting junk
            return staticDialog.Show();
        }
        // CORE SHOW METHODS:
        // All static Show() calls forward here - 
        // it is responsible for retrieving
        // or creating our cached TaskDialog instance, getting it configured,
        // and in turn calling the appropriate instance Show.

        private static TaskDialogResult ShowCoreStatic(
            string msg, 
            string mainInstruction, 
            string caption)
        {
            // If no instance cached yet, create it.
            if (staticDialog == null)
            {
                // New TaskDialog will automatically pick up defaults when 
                // a new config structure is created as part of ShowCore().
                staticDialog = new TaskDialog();
            }

            // Set the few relevant properties, 
            // and go with the defaults for the others.
            staticDialog.content = msg;
            staticDialog.instruction = mainInstruction;
            staticDialog.caption = caption;

            return staticDialog.Show();
        }