FirstFloor.ModernUI.Windows.Controls.ModernDialog.ShowMessage C# (CSharp) Method

ShowMessage() public static method

public static ShowMessage ( string text ) : MessageBoxResult
text string
return MessageBoxResult
        public static MessageBoxResult ShowMessage(string text) {
            return ShowMessage(text, "", MessageBoxButton.OK);
        }

Same methods

ModernDialog::ShowMessage ( string text, string title, MessageBoxButton button, Window owner = null ) : MessageBoxResult

Usage Example

コード例 #1
0
        /// <summary>
        /// 更新
        /// </summary>
        private void Update()
        {
            try
            {
                if (!this.IsLoaded || !this.dirty)
                {
                    return;
                }

                var bbcode = this.BBCode;

                if (this.Inlines.Count > 0)
                {
                    this.Inlines.Clear();
                }

                if (!string.IsNullOrWhiteSpace(bbcode))
                {
                    Inline inline;
                    try
                    {
                        var parser = new BBCodeParser(bbcode, this)
                        {
                            Commands = this.LinkNavigator.Commands
                        };
                        inline = parser.Parse();
                    }
                    catch (Exception)
                    {
                        // 分析失败,按原样显示BBCode值 parsing failed, display BBCode value as-is
                        inline = new Run {
                            Text = bbcode
                        };
                    }
                    this.Inlines.Add(inline);
                }
                this.dirty = false;
            }
            catch (Exception error)
            {
                ModernDialog.ShowMessage(error.Message, ModernUI.Resources.NavigationFailed, MessageBoxButton.OK);
            }
        }
All Usage Examples Of FirstFloor.ModernUI.Windows.Controls.ModernDialog::ShowMessage