100 likes | 203 Views
A .NET desktop application and it’s future. And solutions for command line application interoperability. About the application. Command line number-cruncher tool Written in C++ Multi-threaded computation Digests data coming from MRI scans Inputs Configurable by an XML file
E N D
A .NET desktop application and it’s future And solutions for command line application interoperability
About the application • Command line number-cruncher tool • Written in C++ • Multi-threaded computation • Digests data coming from MRI scans • Inputs • Configurable by an XML file • Has CSV input files • Has some optional command line parameters • Outputs • Produces CSV output files • Gives feedback on the stdout
About the application • GUI written in .NET • Goal is to control the command-line tool • Nice user editor for the command line tool’s XML configuration file • Uses WinForms • Provides also graphical display of the end results • Interfaces simply • Starts it with .NET Process class • Gives feedback based on standard output • *picture
GUI – General and Listbox • XML file editing • WinForms forms, controls and layouting • ListBox is capable of drag-and-drop operation • Taken from codeproject.com and codeguru.com • -> demo • *picture
GUI - interconnection • Progress indicator is controlled by stdout • Process class has many settings: • UseShellExecute • RedirectStandardOutput • RedirectStandardError • OutputDataReceived event handler • ErrorDataReceived event handler • StartInfo.CreateNoWindow • EnableRaisingEvents • Exited event handler • Magic: setvbuf(stdout, NULL, _IONBF, 0); • -> demo
GUI - Data visualization • Canvas class • Taken from codeproject.com and codeguru.com • Capable of zooming and scrollbars • Coloring: converting the value domain to hue, and using HSV2RGB • *picture
GUI - Data visualization • Graph • Using Perpetuum Software’s .NET ModelKitSuite (won at one of the UG events this year) • It has several components, one of them is the Graph • Highly configurable, produces an output file, it is loaded from the resx resource by the actual control • Graphs picture can be saved in different formats • -> demo • *picture
Future • Small things • Color scale display • Mouse wheel zoom handling over the canvas • Resize handling of the canvas? • The whole package • Moving everything to .NET ? • Going multi-platform • XML parameter editor
Future of the whole package • Moving everything into one software • Moving the number cruncher core into .NET • C++ code uses the QueueUserWorkItemWin32 API and plain old C arrays (!) • We can use parallel capabilities of .NET but arrays should be synchronized, not sure about the performance implications • Going multi platform • Moving to Qt and C++? Qt has nice signal-slot (eventsource-observer pattern) UI • If I move to .NET I can go to Silverlight • From UI viewpoint it’s almost like moving to WPF • What happens with the Canvas and the Graph?
Future – XML editor • Lots of boilerplate code; how to avoid? • Thought about property editor-like interface • Complete solution: something which • Interprets the XSD and automatically generates classes for them – exists for Java • Interprets XSD and automatically generates GUI! – many solutions exist, lot for Java, most of them are commercial • -> demo, pictures