示例#1
0
 // Sets Window Title, Message Header, Message Body, Message HyperLink Text, Message HyperLink Uri, Message Buttons, Message Icon, and Color Set.
 public static WindowMessageResult Show(string windowTitle, string contentHeader, string contentBody, string hyperLinkText, string hyperLinkUri, WindowMessageButtons windowMessageButtons, WindowMessageIcon windowMessageIcon, WindowMessageColorSet windowMessageColorSet)
 {
     return(OpenWindowMessage(dialogDataBuilder(windowTitle, contentHeader, contentBody, hyperLinkText, hyperLinkUri, windowMessageButtons, windowMessageIcon)));
 }
示例#2
0
        } = new WindowMessageColorSet();                                                          // Plans for the future.

        // Takes the arguments from the overload methods to create a DialogData object. This is what is passed to the DialogService and used to open the MessageBox Enhanced window.
        private static DialogData dialogDataBuilder(
            string windowTitle   = "",
            string contentHeader = "",
            string contentBody   = "",
            string hyperLinkText = "",
            string hyperLinkUri  = "",
            WindowMessageButtons windowMessageButtons   = WindowMessageButtons.Ok,
            WindowMessageIcon windowMessageIcon         = WindowMessageIcon.Information,
            WindowMessageColorSet windowMessageColorSet = null)
        {
            DialogData data = new DialogData()
            {
                WindowTitle    = windowTitle,
                ContentBody    = contentBody,
                ContentHeader  = contentHeader,
                HyperLinkText  = hyperLinkText,
                HyperLinkUri   = hyperLinkUri,
                MessageButtons = windowMessageButtons,
                MessageIcon    = windowMessageIcon,
            };

            if (windowMessageColorSet == null)
            {
                data.Background                  = ColorSets.Background;
                data.ContentHeaderColor          = ColorSets.ContentHeaderColor;
                data.ContentBodyColor            = ColorSets.ContentBodyColor;
                data.HyperLinkColor              = ColorSets.HyperLinkColor;
                data.HyperLinkMouseOverColor     = ColorSets.HyperLinkMouseOverColor;
                data.HyperLinkMouseDisabledColor = ColorSets.HyperLinkMouseDisabledColor;
            }
            else
            {
                if (windowMessageColorSet.Background == null)
                {
                    data.Background = ColorSets.Background;
                }

                if (windowMessageColorSet.ContentHeaderColor == null)
                {
                    data.ContentHeaderColor = ColorSets.ContentHeaderColor;
                }

                if (windowMessageColorSet.ContentBodyColor == null)
                {
                    data.ContentBodyColor = ColorSets.ContentBodyColor;
                }

                if (windowMessageColorSet.HyperLinkColor == null)
                {
                    data.HyperLinkColor = ColorSets.HyperLinkColor;
                }

                if (windowMessageColorSet.HyperLinkMouseOverColor == null)
                {
                    data.HyperLinkMouseOverColor = ColorSets.HyperLinkMouseOverColor;
                }

                if (windowMessageColorSet.HyperLinkMouseDisabledColor == null)
                {
                    data.HyperLinkMouseDisabledColor = ColorSets.HyperLinkMouseDisabledColor;
                }
            }

            return(data);
        }