Exemplo n.º 1
0
        private void td_complex(object sender, EventArgs e)
        {
            TaskDialog dlg = new TaskDialog("This is the main instruction", "Complex Task Dialog");

            dlg.CommonIcon       = TaskDialogIcon.SecurityShieldBlue;
            dlg.Content          = "You may write long and informative messages, with <a href=\"http://www.google.com\">hyperlinks</a> and linebreaks.\nButtons can also be shaped as Command Link buttons instead of standard buttons. You may also use radio buttons or add a progress bar.";
            dlg.UseCommandLinks  = true;
            dlg.EnableHyperlinks = true;
            dlg.CustomButtons    = new CustomButton[] {
                new CustomButton(9, "Upload\nShows a fake upload task dialog."),
                new CustomButton(Result.Cancel, "Close")
            };
            dlg.RadioButtons = new CustomButton[] {
                new CustomButton(1, "First radio button"),
                new CustomButton(2, "Second radio button"),
                new CustomButton(3, "Third radio button")
            };
            dlg.ExpandedControlText = "Details";
            dlg.ExpandedInformation = "Place some \"expanded information\" here...";

            dlg.EnableRadioButton(3, false);

            //Evt registration
            dlg.ButtonClick += new EventHandler <ClickEventArgs>(dlg_ButtonClick);

            Results results = dlg.Show(this.Handle);
        }