Slxe wrote at 2014-05-21 19:08:
Here's the drawing toolbar example I was talking about a bit. Please let me know what you think, if I'm doing anything wrong, or if you know of any improvements I can make to it =). I might add a few more features depending on if I get some more free time.
Slxe wrote at 2014-05-26 15:40:
everytimer wrote at 2014-05-26 20:49:
objo wrote at 2014-05-26 20:58:
I have cloned your repository and had a look at the code. It is a really nice demo, and I hope we can include this in the 'official' demos later. But I have some comments after a first quick look:
- the architecture should be changed to use a
PlotController- this can make the annotation creation/editing reusable on all platforms!
- use some ui pattern (mvc, mvp, mvvm?) to separate all the logic from the views
- Convert.ToDouble is missing culture, it throws exceptions all the time on my machine. I got around by setting
System.Threading.Thread.CurrentThread.CurrentCulture = CultureInfo.InvariantCulture;in the Program.Main.
Please continue on this demo! I can do more code reviews later, but expect response to vary from 2min to weeks... :-)
Slxe wrote at 2014-05-26 21:23:
As far as coding style goes I use ReSharper myself, but I'll look into what StyleCop suggests just so it matches up to the requirements. Wasn't really sold on regions yet either, so I'll just remove them as per the guidelines. lol I come from Python which has the PEP8 Coding Guidelines and the "pythonic" way of coding, so I try and approach new languages looking for language specific idioms (if that's even the right way to word that? O_o), so any tips at all are always welcome.
objo wrote at 2014-06-06 21:25:
I can probably help setting up a little "skeleton example" using a
PlotController, but I have a few other tasks to finish first...
Slxe wrote at 2014-06-06 22:34:
They've actually asked me to make a generic custom control at work that will let them add axes and series through the designers properties browser, as well as include the annotation toolbar and a custom legend (it lists all axes and series in the plotmodel with visibility checkboxes and colour buttons for the series pic), so I'll probably end up taking some time to rework it into a proper mvc pattern for that and submit it afterwards. I'm just reading up on proper implementation of a custom control, properties and such in winforms (although it's kinda hard finding a good post on the subject after 2005ish, was hoping to find one with C# 4/5 features). It'll hopefully be pretty generic (although winforms based) so I'd be happy to submit it if It'd be useful.
Slxe wrote at 2014-06-11 19:10:
Been looking myself, but you wouldn't happen to have any good resources on pattern implementation for custom user controls in C#? Or I guess if it's even needed/recommended for user controls? Just going off a book a co worker let my borrow and various msdn posts.
objo wrote at 2014-06-11 22:02:
Slxe wrote at 2014-06-11 22:28:
Slxe wrote at 2014-06-13 18:07:
objo wrote at 2014-06-14 08:48:
Customer support service by UserEcho