public static void ShowDialog(MessageBox.MESSAGEBOX_ICON icon, string titel, string text) { MessageBox messageBox = new MessageBox(); messageBox.setIcon(icon); messageBox.setText(titel, text); messageBox.ShowDialog(); }
public void setIcon(MessageBox.MESSAGEBOX_ICON icon) { if (icon == MessageBox.MESSAGEBOX_ICON.ICON_INFO) { this.image1.Source = new BitmapImage(new Uri("pack://application:,,,/Ts3Tray;component/Resources/dialog-info.png")); return; } this.image1.Source = new BitmapImage(new Uri("pack://application:,,,/Ts3Tray;component/Resources/dialog-error.png")); }