private void showBtn_Click(object sender, System.EventArgs e)
        {
            NTaskDialog dlg = new NTaskDialog();

            dlg.Title         = "Q2 2007 Radio Buttons Support";
            dlg.Content.Text  = "<font size='12' face='Trebuchet MS'>Task Dialog <b>Radio Buttons</b> example</font>";
            dlg.Content.Image = NSystemImages.Information;
            dlg.Content.Style.TextRenderingHint = TextRenderingHint.ClearTypeGridFit;
            dlg.Content.ImageSize = new NSize(32, 32);
            dlg.PreferredWidth    = 300;

            if (m_arrButtons.Count > 0)
            {
                NRadioBoxElement[] buttons = new NRadioBoxElement[m_arrButtons.Count];
                m_arrButtons.CopyTo(buttons);
                dlg.RadioButtons = buttons;
            }

            dlg.Show();

            NRadioBoxElement box = dlg.CheckedRadioButton;

            if (box != null)
            {
                checkedButtonLabel.Text = box.Text;
            }
            else
            {
                checkedButtonLabel.Text = "None";
            }

            dlg.RadioButtons = null;
            dlg.Dispose();
        }
        private void standardMessageBoxBtn_Click(object sender, System.EventArgs e)
        {
            NTaskDialog dlg = CreateDefaultDialog();

            //dlg.PredefinedButtons = TaskDialogButtons.Ok;
            dlg.PreferredWidth = 360;

            dlg.Show();
        }
        private void customizedMessageBoxBtn_Click(object sender, System.EventArgs e)
        {
            NTaskDialog dlg = new NTaskDialog();

            dlg.PreferredWidth = 400;
            dlg.ProgressType   = TaskDialogProgressType.Marguee;
            dlg.MarqueeProgress.Start();

            dlg.Title = "Nevron User Interface Q4 2006";
            dlg.Content.Style.TextStrokeStyle   = new NStrokeStyle(1, Color.Brown);
            dlg.Content.Style.TextFillStyle     = new NColorFillStyle(Color.Wheat);
            dlg.Content.Style.TextSmoothingMode = SmoothingMode.AntiAlias;
            dlg.Content.Style.FontInfo          = new NThemeFontInfo("Trebuchet MS", 22f, FontStyleEx.Bold | FontStyleEx.Italic);
            dlg.Content.Text = "Downloading Nevron .NET Vision Q4 2006...";

            NPushButtonElement[] customButtons = new NPushButtonElement[2];
            NPushButtonElement   btn;

            btn                   = new NPushButtonElement();
            btn.Text              = "<b>Cancel Download</b>";
            btn.Image             = NSystemImages.Error;
            btn.ImageTextRelation = ImageTextRelation.ImageAboveText;
            btn.ImageSize         = new NSize(32, 32);
            btn.Id                = 0;
            customButtons[0]      = btn;

            btn                   = new NPushButtonElement();
            btn.Text              = "<b>Pause Download</b>";
            btn.Image             = NSystemImages.Exclamation;
            btn.ImageTextRelation = ImageTextRelation.ImageAboveText;
            btn.ImageSize         = new NSize(32, 32);
            btn.Id                = 1;
            customButtons[1]      = btn;

            dlg.UserButtons     = customButtons;
            dlg.DefaultButtonId = 2;

            dlg.Show();
        }
        private void progressDialogBtn_Click(object sender, System.EventArgs e)
        {
            NTaskDialog dlg = new NTaskDialog();

            dlg.PreferredWidth = 400;
            dlg.ProgressType   = TaskDialogProgressType.Standard;

            dlg.Title = "Nevron User Interface Q4 2006";
            dlg.Content.Style.FontInfo = new NThemeFontInfo("Tahoma", 10f, FontStyleEx.Regular);
            dlg.Content.Text           = "Downloading Nevron .NET Vision Q4 2006...";
            dlg.Content.Image          = NSystemImages.Information;
            dlg.Content.ImageSize      = new NSize(32, 32);
            dlg.ProgressType           = TaskDialogProgressType.Standard;
            dlg.EnableTimer            = true;
            dlg.Verification.Text      = "Close this dialog when download is complete";
            dlg.Notify += m_CallBack;

            //inint buttons
            NPushButtonElement cancelBtn = new NPushButtonElement();

            cancelBtn.Text = "Cancel";
            cancelBtn.Id   = 100;

            NPushButtonElement pauseBtn = new NPushButtonElement();

            pauseBtn.Text = "Pause";
            pauseBtn.Id   = 101;

            NPushButtonElement resumeBtn = new NPushButtonElement();

            resumeBtn.Text = "Resume";
            resumeBtn.Id   = 102;

            dlg.UserButtons = new NPushButtonElement[] { cancelBtn, pauseBtn, resumeBtn };
            //the defaulted button is "Pause"
            dlg.DefaultButtonId = 101;
            dlg.Show();
        }
        private void vistaLikeNotification_Click(object sender, System.EventArgs e)
        {
            NTaskDialog dlg = new NTaskDialog();

            dlg.Title             = "Copy File";
            dlg.PreferredWidth    = 480;
            dlg.PredefinedButtons = TaskDialogButtons.Cancel;

            NThemeFontInfo fi = new NThemeFontInfo("Tahoma", 9, FontStyleEx.Regular);

            NLabelElement label = dlg.Content;

            label.Style.TextRenderingHint = TextRenderingHint.ClearTypeGridFit;
            label.Text = "<font color='navy' size='11' face='Tahoma'>There is already a file with the same name in this location.</font><br/><br/>What would you like to do:";

            NPushButtonElement[] largeButtons = new NPushButtonElement[3];
            NPushButtonElement   button;
            string text;

            button    = new NPushButtonElement();
            button.Id = 100;
            button.TreatAsOneEntity        = false;
            button.ImageAlign              = ContentAlignment.TopLeft;
            button.TextAlign               = ContentAlignment.TopLeft;
            button.Image                   = NSystemImages.Question;
            button.ImageSize               = new NSize(32, 32);
            button.ContentAlign            = ContentAlignment.MiddleLeft;
            button.Style.TextRenderingHint = TextRenderingHint.ClearTypeGridFit;
            button.Style.FontInfo          = fi;
            text            = "<font color='navy' size='12'>Copy and replace</font><br/><font color='navy'>Replace the file in the destination folder with the file you are copying:</font><br/>";
            text           += "<b>NTaskDialog.cs</b><br/>";
            text           += @"<font color='navy'>NTaskDialog (C:\Projects\UI\WinForm\Controls\Forms\TaskDialog)</font>";
            text           += "<br/>Size: 14 KB<br/>";
            text           += "Date Modified: 03/03/2007 10:00 AM (Newer)";
            button.Text     = text;
            largeButtons[0] = button;

            button    = new NPushButtonElement();
            button.Id = 101;
            button.TreatAsOneEntity        = false;
            button.ImageAlign              = ContentAlignment.TopLeft;
            button.TextAlign               = ContentAlignment.TopLeft;
            button.Image                   = NSystemImages.Question;
            button.ImageSize               = new NSize(32, 32);
            button.ContentAlign            = ContentAlignment.MiddleLeft;
            button.Style.TextRenderingHint = TextRenderingHint.ClearTypeGridFit;
            button.Style.FontInfo          = fi;
            text            = "<font color='navy' size='12'>Don't Copy</font><br/><font color='navy'>No files will be changed. Leave this file in the destination folder:</font><br/>";
            text           += "<b>NTaskDialog.cs</b><br/>";
            text           += @"<font color='navy'>NTaskDialog (C:\OldProjects\UI\WinForm\Controls\Forms\TaskDialog)</font>";
            text           += "<br/>Size: 12 KB (Smaller)<br/>";
            text           += "Date Modified: 03/03/2007 09:00 AM";
            button.Text     = text;
            largeButtons[1] = button;

            button    = new NPushButtonElement();
            button.Id = 102;
            button.TreatAsOneEntity        = false;
            button.ImageAlign              = ContentAlignment.TopLeft;
            button.TextAlign               = ContentAlignment.TopLeft;
            button.Image                   = NSystemImages.Question;
            button.ImageSize               = new NSize(32, 32);
            button.ContentAlign            = ContentAlignment.MiddleLeft;
            button.Style.TextRenderingHint = TextRenderingHint.ClearTypeGridFit;
            button.Style.FontInfo          = fi;
            text            = "<font color='navy' size='12'>Copy, but keep both files</font><br/><font color='navy'>The file you are copying will be renamed \"NTaskDialog (2).cs\"</font>";
            button.Text     = text;
            largeButtons[2] = button;

            dlg.DefaultButtonId  = 100;
            dlg.LargeUserButtons = largeButtons;
            dlg.Show();
        }