This project has moved and is read-only. For the latest updates, please go here.

Culture forced to "en"

Jun 4, 2016 at 3:10 PM
Edited Jan 24 at 10:52 PM
Although I'm portuguese, since the dawn of the computer age I've used OS in english.
After I installed Windows 10, as it was really easy to switch the UI language, I set it to french.

Surprise surprise, all the Forms where I spent a considerable amount of time customizing the size, visible items, etc were "damaged". I saw items that were supposed to be hidden, all popups were the same size, etc. The worst part is that I couldn't get a list of assembly type (BusinessRules, etc).

It turns out the fix is done in one line as the first line of the Main method (GeneratorController.cs):
Thread.CurrentThread.CurrentUICulture = new CultureInfo("en");
A new version will be released shortly to fix a few things including this very important usability issue.
Jun 6, 2016 at 6:03 PM
Hi Tiago,
You email has reminded me of a small change that I have made but not checked in.
In DbSchemaPanel.cs, in the function
private void columnsContextMenuStrip_Opening
I have commented out 2 lines (shown in green below), so that
if (_currentTreeNode != null)
{
if (_currentTreeNode.Tag != null)
{
if (_currentTreeNode.Tag is SqlTableInfo)
SetColumnsContextMenu((_currentTreeNode.Tag as SqlTableInfo).Type == ResultType.Table, rowSelected);
else if (_currentTreeNode.Tag is SqlViewInfo)
SetColumnsContextMenu((_currentTreeNode.Tag as SqlViewInfo).Type == ResultType.Table, rowSelected);
else if (_currentTreeNode.Tag is SqlResultSet)
SetColumnsContextMenu(false, rowSelected);
}
}
becomes
if (_currentTreeNode != null)
{
if (_currentTreeNode.Tag != null)
{
if (_currentTreeNode.Tag is SqlTableInfo)
SetColumnsContextMenu((_currentTreeNode.Tag as SqlTableInfo).Type == ResultType.Table, rowSelected);
else if (_currentTreeNode.Tag is SqlViewInfo)
SetColumnsContextMenu((_currentTreeNode.Tag as SqlViewInfo).Type == ResultType.Table, rowSelected);
//else if (_currentTreeNode.Tag is SqlResultSet)
// SetColumnsContextMenu(false, rowSelected);
}
}
This is to allow a right-click->’Add to CSLA Object’ to be enabled for a Stored Procedure Result Set Colum.
Regards,
Bill
Jun 7, 2016 at 10:02 AM

Hi Bill,

As you might imagine, I’m not familiar with every bit of CGF. And to be honest, I don’t understand why your fix works. I would expect the ColumnsContextMenu to be build someway, but it seems the funtion SetColumnsContextMenu only disables items. Never mind.

Anyway, I prefer not to make bigs changes on code I don’t know so well. So I just changed

SetColumnsContextMenu(false, rowSelected);

to

SetColumnsContextMenu(true, rowSelected);

and it works as intended: Add to CSLA Object is now enable for columns of the result set.

Thanks.

Best regards,

Tiago Freitas Leal

Jun 7, 2016 at 10:52 AM
Hi Tiago,
That’s great, thanks.
Regards,
Bill
Jun 7, 2016 at 1:27 PM
Edited Jun 18, 2016 at 12:09 PM
Looking at the issue, this option shouldn’t be available, when the current CSLA object is a collection, since collections don’t have value properties. So the SetColumnsContextMenu method is needed after all. I'm glad I kept the method call. On another topic, I found out (again) that at startup, the Schema panel doesn’t know there is a select CSLA object. This is annoying and I’m a bit fed with it and it’s solved. Both issues will be only tomorrow.