标准 MS 数据连接对话框的本地化
数据连接对话框是随 Visual Studio 一起发布的数据库工具组件。它允许用户构建连接字符串并连接到特定的数据源。其源代码已在代码库上发布。
这非常有用,但唯一的问题是它的 UI 始终是英文,无论事实上它在本地化版本的 Windows 下运行。
也许我错过了一些技巧?
我尝试在 WPF 应用程序中使用它:
DataConnectionDialog dcd = new DataConnectionDialog();
DataConnectionConfiguration dcs = new DataConnectionConfiguration(null);
dcs.LoadConfiguration(dcd);
dcd.SelectedDataSource = DataSource.SqlDataSource;
dcd.SelectedDataProvider = DataProvider.SqlDataProvider;
...
if (DataConnectionDialog.Show(dcd) == System.Windows.Forms.DialogResult.OK)
{
...
}
The data connection dialog is a database tool component released with Visual Studio. It allows users to build connection strings and to connect to specific data sources. Its source code has been released on Code Gallery.
It's very useful, but the only problem is that its UI is always in English, regardless of the fact that it's run under a localized version of Windows.
Maybe I missed some tricks?
I tried to use it in a WPF app:
DataConnectionDialog dcd = new DataConnectionDialog();
DataConnectionConfiguration dcs = new DataConnectionConfiguration(null);
dcs.LoadConfiguration(dcd);
dcd.SelectedDataSource = DataSource.SqlDataSource;
dcd.SelectedDataProvider = DataProvider.SqlDataProvider;
...
if (DataConnectionDialog.Show(dcd) == System.Windows.Forms.DialogResult.OK)
{
...
}
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
坏消息:默认情况下未本地化
好消息:通过添加您所需语言的资源,可以轻松本地化该项目。
Bad news: It's not localized by default
Good news: The project is easy localizable by adding the resources for the language that you need.