Localization and Messaging Editor Search


Author
Message
Derek Price
Derek Price
StrataFrame User (195 reputation)StrataFrame User (195 reputation)StrataFrame User (195 reputation)StrataFrame User (195 reputation)StrataFrame User (195 reputation)StrataFrame User (195 reputation)StrataFrame User (195 reputation)StrataFrame User (195 reputation)StrataFrame User (195 reputation)
Group: Forum Members
Posts: 51, Visits: 376
I must be missing something here, but when using the Localization and Messaging Editor, how do I search for a value or key? In Visual Studio in the Forms Designer, it's possible to right-click on a control and get the search key or value functionality. Where is this in the actual Localization Editor?



Thanks,

Derek
Replies
Trent Taylor
Trent Taylor
StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)
Group: StrataFrame Developers
Posts: 6.6K, Visits: 7K
Well, this is easier said than done. It is my opinion that new development is a good place to start. So new classes, controls, etc. would be created in C# instead of VB. I do not recommend scrapping all of your VB code and starting totally over as that would be painful.



VB.NET is a good language and once it is compiled down, there are very few differences (though there are some). In our medical application, we have been writing all new development in C# for a while now and it grows really fast. We still have more VB.NET code than C#, but it is quickly evening out. Then once the release it 100% out the door, certified, released, etc. then we will start rewriting the base classes in C#.



Here is one thing that is important to keep in mind, it isn't bad to have VB.NET code within your application. For example, if you are moving an application over from Visual FoxPro to .NET...yeah, you would need to kill VFP quick as possible! However, VB.NET code is still .NET and a very powerful language, so it isn't like you are running on an antiquated platform.
Greg McGuffey
Greg McGuffey
Strategic Support Team Member (4.8K reputation)
Group: Forum Members
Posts: 2K, Visits: 6.6K
Thanks Trent.
Greg McGuffey
Greg McGuffey
Strategic Support Team Member (4.8K reputation)
Group: Forum Members
Posts: 2K, Visits: 6.6K
OK, so I decided to give C# a little test drive. I have a little research project I'm working on and I thought I'd just whip up a C# version.



Now the language isn't to hard, I'm picking that right up. However, I'm about to start drinking over how the editor is handling formatting. Crazy



In VB, when I type, I don't really even think about things like indenting, it just happens. When I type, it just puts where I want. So, If I type:



Public Sub TryMe()

      Dim result As Integer

End Sub




I get...

Public Sub TryMe()

  Dim result As Integer

End Sub




When I do something similar in C#...

public void TryMe()

{

      int result;

}




I get...

public void TryMe()

{

      int result;

}




and not...

public void TryMe()

{

  int result;

}




* This is with Enable Virtual Space checked



Also, when I use code snippets, it doesn't fix the indentation! Which means I have to highlight the code and manually manage this. Very frustrating.



I've also read about how you can use Ctl K, Ctl D or Ctl K, Ctl F to format something...I'm not sure because neither do a damned thing.



So, what sort of settings might I use to enable the sort of smart formatting I'm used to with VB? I'm not really interested in having to type every single character exactly like I want it to appear. I'm building apps here, not ASCII art!



Angry
Trent Taylor
Trent Taylor
StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)
Group: StrataFrame Developers
Posts: 6.6K, Visits: 7K

Now the language isn't to hard, I'm picking that right up. However, I'm about to start drinking over how the editor is handling formatting.

The editor is actually far better once you get used to it and get it setup.  I might recommend getting CodeRush from DevExpress.  It is horriblly irritating with VB.NET, but works very well with C#.  You can make the text editor look a lot better, change how regions looks, colors, etc.  And it makes moving to C# a lot easier.  You will have to turn off a lot of irritating junk that is enabled by default, like templates...they REALLY annoyed me.  But once you get it setup and configured to your liking, it is much better.

But before you haul off and get that, the settings you are talking about are standard .NET options.  Click on Tools -> Options and go to the Text Editor options for C#.

All of the frustrations you mentioned can be fixed here.  You might add a frustration or two while figuring it out also BigGrin

I've also read about how you can use Ctl K, Ctl D or Ctl K, Ctl F to format something...I'm not sure because neither do a damned thing.

LOL...the Ctrl K+D is something I use a lot...a whole lot.  The ONLY reason it will not work is if there is an error within the syntax...or you have your formatting setup to do just what you mentioned. 

I am not generally a big fan of too many tools, but CodeRush from DevExpress is really a nice Add-In for VS and makes formatting code, snippets, etc. really nice.  You can move methods around between regions, change declaration types, etc. with inline editor tools (if turned on) through this add-on.  Check it out, it really is nice for C#.  I will tell you this, however, if you leave it on for VB.NET....well...prepare for a few cuss words to pop out of your mouth. BigGrin

Greg McGuffey
Greg McGuffey
Strategic Support Team Member (4.8K reputation)
Group: Forum Members
Posts: 2K, Visits: 6.6K
I've done some more test driving, this time on another machine. All the weird stuff I previously posed about isn't happening here. So, I must have something weird setup on the first machine. In any case....



I'm liking it! BigGrin



My brain still wants to put types after the variable when declaring them and I'm kind of bummed you can't declare/initialize in one step:



'-- VB: I like that I can do initialization during declare

Dim boss As New Employ()




//-- C#: have to identify type, then initialize

Employ boss = new Employ();




But mostly I'm liking it. Amazing how much some IDE niceties were causing pain (when it wasn't indenting correctly on first machine, especially when using code snippets).



I really like how constructors are handled, were you can identify other constructors to run:



''' VB: Have to explicitly call other constructors

Public Class MyClass

  Public Sub New()

    Me.New(0, String.Empty)

  End Sub



  Public Sub New(id As Integer)

    Me.New(id, String.Empty)

  End Sub



  Public Sub New(id As Integer, name As String)

    Me.ID = id

    Me.Name = name

  End Sub

End Class




///C#: For a constructor you can just identify what other

/// constructor to call

public class MyClass

{

  public MyClass() : this (0, String.Empty) {}



  public MyClass(int ID) : this (id, String.Empty) {}



  public MyClass(int ID, String name)

  {

    this.ID = id;

    this.Name = name;

  }

}




I also found a cool site that compares VB to C# side by side. Very quick way to look up how to do something in the "other" language.



http://www.harding.edu/fmccown/vbnet_csharp_comparison.html



Thanks for the info and encouragement! I'm looking forward to the new 1.7 release and to doing more in C#! w00t
Trent Taylor
Trent Taylor
StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)
Group: StrataFrame Developers
Posts: 6.6K, Visits: 7K
My brain still wants to put types after the variable when declaring them and I'm kind of bummed you can't declare/initialize in one step:




Truthfully once I got used to it I liked C# better anyway on this. In truth it is actually more readable and still requires less typing because some of the editor features (i.e. the tab after "new" command, etc.).



Anyway, glad you are enjoying it...I have "drank the Kool-aid" so to speak. BigGrin In fact, my first .NET was actually C# before we went into main development and moved to VB.NET...glad to be back! BigGrin
Greg McGuffey
Greg McGuffey
Strategic Support Team Member (4.8K reputation)
Group: Forum Members
Posts: 2K, Visits: 6.6K
Ohhh...tab after new...nice BigGrin Yeah that makes it way more palatable. Thanks for the tip!
Trent Taylor
Trent Taylor
StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)
Group: StrataFrame Developers
Posts: 6.6K, Visits: 7K
Yeah...and it will ALWAYS bring up the right object and include any required namespacing, etc. Me likey! BigGrin
Edhy Rijo
E
StrataFrame VIP (6.4K reputation)StrataFrame VIP (6.4K reputation)StrataFrame VIP (6.4K reputation)StrataFrame VIP (6.4K reputation)StrataFrame VIP (6.4K reputation)StrataFrame VIP (6.4K reputation)StrataFrame VIP (6.4K reputation)StrataFrame VIP (6.4K reputation)StrataFrame VIP (6.4K reputation)
Group: StrataFrame Users
Posts: 2.4K, Visits: 23K
A year ago when I was getting into .NET I knew I should go with VB.NET since coming from a VFP environment the majority suggested VB.NET instead of C#, so far I love the whole .NET and specially when comparing the VS IDE with the VFP IDE I am more than happy I made the jump, still I am getting to know VB and will wait for a new small project to start working on C#, also I want to see all the new improvement to both languages coming in the new VS2010 before getting too deep Hehe.



Thanks both for sharing those experiences.

Edhy Rijo

Greg McGuffey
Greg McGuffey
Strategic Support Team Member (4.8K reputation)
Group: Forum Members
Posts: 2K, Visits: 6.6K
Edhy Rijo (07/08/2009)
A year ago when I was getting into .NET I knew I should go with VB.NET since coming from a VFP environment the majority suggested VB.NET instead of C#, so far I love the whole .NET and specially when comparing the VS IDE with the VFP IDE I am more than happy I made the jump, still I am getting to know VB and will wait for a new small project to start working on C#, also I want to see all the new improvement to both languages coming in the new VS2010 before getting too deep Hehe.




I have to say I'm happy that I started with VB. Keeping the language sort of close limited what I was learning, which was a ton. There was all the OOP features, the .NET framework and the SF framework.



Now that I'm much more comfy with .NET OOP, and the frameworks, the jump to C# has been pretty easy. Now, when I go back to vb, there seem to be a lot of extra semi-colons! Blink



The latest thing I'm not liking about C# (though I mostly like it better now) is the switch statement. This is somewhat analogous to the select/case statement but it is more limited. Here is something I do often in VB that is not possible in C#:



Select Case Me.PanelManager1.CurrentPage.Name

  Case Me.PanelManagerPage1.Name

  Case Me.PanelManagerPage2.Name

End Select




This is not possible in C#. The case elements must be resolvable at compile time. Thus they can use variables of strings of primitive types, strings or other primitive types. Oh well.
Trent Taylor
Trent Taylor
StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)
Group: StrataFrame Developers
Posts: 6.6K, Visits: 7K
Unless you are dynamically changing the panel names, then this is totally possible. You would just entry it as a string:



switch(panelName)

{

case "Panel1":

{

}break;

case "Panel2":

{

}break;



}

Greg McGuffey
Greg McGuffey
Strategic Support Team Member (4.8K reputation)
Group: Forum Members
Posts: 2K, Visits: 6.6K
Well, I'm not dynamically changing the panel names, I just really hate things like this as constants. So what you suggest is exactly what I was attempting to avoid. Sad What does happen a lot during development is that I might change the name of the control (in this case the panel page) and in VB the automatic refactoring just handles it (the case statement is updated). With this (string contants) I'd have to remember to go fix it. Likely I wouldn't remember and I'd have to track down the bug. Hopefully they'll update this soon in C# (as they've stated that VB and C# will be equivalent languages, with features being introduced in both at the same time...not sure it applies to this but a guy can hope). Oh well. At this point I mostly prefer to work in C#, but I'm more convinced now that which language you choose is really just a preference (except for the stupid compile all the time thing with vb). Thanks for the info.
Trent Taylor
Trent Taylor
StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)
Group: StrataFrame Developers
Posts: 6.6K, Visits: 7K
Well, when you are in the middle of development and changing names, OK. But if you go back in after this is working and start changing names then that is like playing Russian Roulette. The very same argument could be made for any single piece of code that has a string key, dictionary, etc. So while you may refactor your code while developing it you would also still recall this needs to be modified. But if you are changing "keys" after this code is already working, then you obviously would have a good reason, but this really should be a moot point. But that is just my point of view. Smile
GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...




Threaded View
Threaded View
Derek Price - 16 Years Ago
Trent L. Taylor - 16 Years Ago
Derek Price - 16 Years Ago
Derek Price - 16 Years Ago
Trent L. Taylor - 16 Years Ago
Derek Price - 16 Years Ago
                         I have already added the search...it makes life MUCH nicer!!! It will...
Trent L. Taylor - 16 Years Ago
                             Hi Trent,

Could you mention some of the things that will...
Edhy Rijo - 16 Years Ago
                                 It would be easier to just look at the What's New topic once released....
Trent L. Taylor - 16 Years Ago
Keith Chisarik - 16 Years Ago
Trent L. Taylor - 16 Years Ago
Keith Chisarik - 16 Years Ago
Trent L. Taylor - 16 Years Ago
                 OK, I give....what's a root data type? :ermm:
Greg McGuffey - 16 Years Ago
Trent L. Taylor - 16 Years Ago
                         Almost ;)

So, is a root type just a structure? Is there...
Greg McGuffey - 16 Years Ago
                             Correct. But the one thing you cannot do in VB has to do with an...
Trent L. Taylor - 16 Years Ago
                                 Just wanted to clarify one thing on this as well, doing this type of...
Trent L. Taylor - 16 Years Ago
                                     I've been reading up on this and I'm not sure I'm seeing what C# can...
Greg McGuffey - 16 Years Ago
                                         Yeah, I suppose that the Narrowing would be similar. In truth, didn't...
Trent L. Taylor - 16 Years Ago
                                             I was just curious. I had read a lot about the differences between C#...
Greg McGuffey - 16 Years Ago
                                                 Well, let me give my two cents on the languages...and give you some...
Trent L. Taylor - 16 Years Ago
                                                     Great post Trent! Much to chew on.

I do have a few...
Greg McGuffey - 16 Years Ago
                                                         [quote]I believe if this was solved, we probably wouldn't be having...
Trent L. Taylor - 16 Years Ago
                                                             So, the next step: suggestions to a developer to move from VB to C#....
Greg McGuffey - 16 Years Ago
                                                                 Well, this is easier said than done. It is my opinion that new...
Trent L. Taylor - 16 Years Ago
                                                                     Thanks Trent.
Greg McGuffey - 16 Years Ago
                                                                         OK, so I decided to give C# a little test drive. I have a little...
Greg McGuffey - 16 Years Ago
                                                                             [quote] Now the language isn't to hard, I'm picking that right up....
Trent L. Taylor - 16 Years Ago
                                                                                 I've done some more test driving, this time on another machine. All...
Greg McGuffey - 16 Years Ago
                                                                                     [codesnippet]My brain still wants to put types after the variable when...
Trent L. Taylor - 16 Years Ago
                                                                                         Ohhh...tab after new...nice :D Yeah that makes it way more palatable....
Greg McGuffey - 16 Years Ago
                                                                                             Yeah...and it will ALWAYS bring up the right object and include any...
Trent L. Taylor - 16 Years Ago
                                                                                                 A year ago when I was getting into .NET I knew I should go with VB.NET...
Edhy Rijo - 16 Years Ago
                                                                                                     [quote][b]Edhy Rijo (07/08/2009)[/b][hr]A year ago when I was getting...
Greg McGuffey - 16 Years Ago
                                                                                                         Unless you are dynamically changing the panel names, then this is...
Trent L. Taylor - 16 Years Ago
                                                                                                             Well, I'm not dynamically changing the panel names, I just really hate...
Greg McGuffey - 16 Years Ago
                                                                                                                 Well, when you are in the middle of development and changing names,...
Trent L. Taylor - 16 Years Ago
Derek Price - 16 Years Ago
Derek Price - 16 Years Ago
Trent L. Taylor - 16 Years Ago

Similar Topics

Reading This Topic

Login

Explore
Messages
Mentions
Search