Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Signal tracing GUI widget

Posted on 2011-09-06
4
Medium Priority
?
460 Views
Last Modified: 2012-05-12
Hello!

I am new for C# and .NET, currently using v3.5. For an embedded application writtenin Windows Forms of which I am implementing the GUI, I am asked to display a few dozen signals (up to fifty) comming from a file on the device in a two-dimensional coordinate system. The vertical scale(s) will be some electrical properties (A, V, VA, ...), the time scale will be in milliseconds. It is prescribed to have for each signal a value each 10 ms. There will be no server part, but a part written in C++ that prepares the measured values in text files for the GUI.

Below the drawing, a table should show the signals and their corresponding colours so that the user can easily match them, as there will be no legend information (like signal names) visible in the drawing. If two vertical scales exist, the table will also show which of the vertical scales each signal is using.

The widget should also have twovertical  (white) lines. If the user moves them apart, a zoom into the waverforms on the time axis (x) is achieved. No zooming plans for the Y axis exist - the user may copy the information on a USB stick and analyze it on their PC further, if needed.

Question:
How would you implement such a widget? Just by using a pictureBox, making the drawing and catching the mouse clicks/touch events, or by deriving a new widget class from an existing one?

Thank you for your information!
0
Comment
Question by:Ahmet Ekrem SABAN
  • 2
  • 2
4 Comments
 
LVL 5

Expert Comment

by:zvytas
ID: 36488652
This sounds like an ideal candidate for Windows Presentation Foundation (WPF) project, there are plenty of reading material online. I personally would go ahead with WPF.
Another viable option is using any canvas (image box, etc) to draw everything you need.
0
 
LVL 1

Author Comment

by:Ahmet Ekrem SABAN
ID: 36489072
OK. Originally, WPF was also my favorite, but our customer decided to "reduce" it all to WinForms. So, I have to find out what's up there...

I currently use a pictureBox.Image that I load (all black). I couldn't find a way to create a bitmap directly, but it may also be OK to load the resource image.
0
 
LVL 5

Accepted Solution

by:
zvytas earned 1000 total points
ID: 36489187
I would rather use Panel to be honest, but picture box should be OK too. You can draw pretty much whatever you want on these "surfaces", please see some examples here:

http://www.java2s.com/Code/CSharp/2D-Graphics/Drawaline.htm
0
 
LVL 1

Author Closing Comment

by:Ahmet Ekrem SABAN
ID: 36520972
The example given showed me clearly how to proceed. Thank you for your help, zvytas!
0

Featured Post

New feature and membership benefit!

New feature! Upgrade and increase expert visibility of your issues with Priority Questions.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In a previous article here at Experts Exchange (http://www.experts-exchange.com/articles/18414/Create-a-PDF-file-with-Contact-Sheets-montage-of-thumbnails-for-all-JPG-files-in-a-folder-and-each-of-its-subfolders-using-an-automated-batch-method.html)…
The article shows the basic steps of integrating an HTML theme template into an ASP.NET MVC project
This Micro Tutorial will give you a basic overview how to record your screen with Microsoft Expression Encoder. This program is still free and open for the public to download. This will be demonstrated using Microsoft Expression Encoder 4.
The goal of the tutorial is to teach the user what gradient filters are and how to use them. When you have a photo and some part of the photo is either over exposed or under exposed, you use a gradient filter to help mask the need to touch up th…

963 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question