Solved

Signal tracing GUI widget

Posted on 2011-09-06
4
451 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:sae1962at
  • 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:sae1962at
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 250 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:sae1962at
ID: 36520972
The example given showed me clearly how to proceed. Thank you for your help, zvytas!
0

Featured Post

Top 6 Sources for Identifying Threat Actor TTPs

Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

Join & Write a Comment

I. Introduction In a previous article (http://www.experts-exchange.com/Web_Development/Document_Imaging/A_6537-PaperPort-Upgrade-How-to-download-and-install-updated-versions-of-PaperPort-11-and-12.html) (now deprecated), I discussed how to upgrad…
In a previous article published here at Experts Exchange, Signature Image with Transparent Background (http://www.experts-exchange.com/Web_Development/Document_Imaging/A_12380-Signature-Image-with-Transparent-Background.html), I explained how to cre…
Learn how to automatically add page numbers in your next InDesign project. This can be very helpful in multi-page books and magazines that you are designing. Make sure your Pages window visible.:  In the document you wish to add page numbers to. Act…
In this sixth video of the Xpdf series, we discuss and demonstrate the PDFtoPNG utility, which converts a multi-page PDF file to separate color, grayscale, or monochrome PNG files, creating one PNG file for each page in the PDF. It does this via a c…

708 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

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now