gui-cs / TerminalGuiDesigner

Forms Designer for Terminal.Gui (aka gui.cs)
MIT License
438 stars 29 forks source link

MenuBar private variables should be cammel case #151

Closed tznind closed 1 year ago

tznind commented 1 year ago

Currently naming starts with caps which is wrong for private variables:

private Terminal.Gui.MenuBar menubar;
private Terminal.Gui.MenuBarItem _FileF9;
private Terminal.Gui.MenuItem RunnewTask;
private Terminal.Gui.MenuItem Exit;
BDisp commented 1 year ago

Do you mean that private variables should be started with lower case without underscore and subsequent with upper case, like this bellow?

menuBar
fileF9
runnewTask
exit

Otherwise I think only public variables should be start with a upper case letter.

tznind commented 1 year ago

Otherwise I think only public variables should be start with a upper case letter.

Yup that is the case after #154

There is also a suffix added now.

This is now matching what you get with Winforms:

image

private MenuStrip menuStrip1;
private ToolStripMenuItem testToolStripMenuItem;
private ToolStripMenuItem doubleTestToolStripMenuItem;

windows forms designer generated code

image

private Terminal.Gui.MenuBar menubar;
private Terminal.Gui.MenuBarItem testMenu;
private Terminal.Gui.MenuItem doubletestMenuItem;

Terminal gui designer generated code

tznind commented 1 year ago

Although now I can see that the winforms designer is also auto capitalizing where it takes out a space, I think I will add that in.