use*_*438 3 c# settings winforms
我想WinForm
从"设置"中设置控件的文本.
如果我想在将来改变程序语言,这很容易;
只需要修改适当的设置.
其中一个messageBoxes
文本有一个换行符(\n
).
当我从"设置"中插入文本时,\n将显示为文本的一部分,并且没有换行符.
MessageBox.Show(P_Settings.NotificationMessageBoxes.Default.ProcessFinishedNotification,
P_Settings.NotificationMessageBoxes.Default.ProcessFinishedNotificationTitle,
MessageBoxButtons.YesNo, MessageBoxIcon.Question);
Run Code Online (Sandbox Code Playgroud)
有任何想法吗?
这应该适合你
string somestring = @"this is some text \n Some more text";
somestring = somestring.Replace(@"\n", Environment.NewLine);
MessageBox.Show(somestring);
Run Code Online (Sandbox Code Playgroud)