Wednesday, September 3, 2008

The C# Plotting Toy Gets Better And Better

The C# Plotting Toy Gets Better And Better

I'm not going to inflict the source on the blog from now on; you can read it, and see the details of how to install the executable here. Recent improvements:

1. I am now using the ClientSize method for getting the inside of various objects when figuring out how much room there is to plot. This is more accurate, and doesn't require as much fudging.

2. When you start the program, instead of using a Panel on which to draw the graphs, it graphs directly into the Form. I had hoped that some of the failure to refresh problems would go away, but they really didn't. It did simplify the code a bit, as did removing Panel from the various popup windows.

3. Instead of a fixed sized Panel, the area used for plotting the graphs expands to fill the available Form--and if you resize the window, everything inside resizes and redraws.

4. I've mentioned the problems with getting refresh to work more consistently. At the moment, the choice is either a bit too much flicker (because every mouse movement event causes refresh), or waiting for you to move the mouse outside of the window, or release the mouse button, or any of several other events, to cause refresh. There has to be a more elegant way to do this.

5. There is a new File, Open Web Page command that lets you grab CSV files in the appropriate format from a web page. There's a default URL as well. The behavior when you give an invalid URL isn't quite as elegant as I would like, but that's for tomorrow.

No comments:

Post a Comment