Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Signal tracing GUI widget

Posted on 2011-09-06
4
Medium Priority
?
458 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

In a previously published article (http://www.experts-exchange.com/articles/10331/Automatic-Duplex-Scanning-in-PaperPort-Versions-11-12-14.html) here at Experts Exchange, I explained how to achieve duplex (double-sided) scanning in Nuance's PaperPor…
Exception Handling is in the core of any application that is able to dignify its name. In this article, I'll guide you through the process of writing a DRY (Don't Repeat Yourself) Exception Handling mechanism, using Aspect Oriented Programming.
The goal of this is to tech the user how to export photos out of Lightroom and the different options they have. Select which photos you want to export : Select where you want to export and with which options : Export :
The goal of the tutorial is to teach the user what exposure is and how to use the exposure slider. Analyze the photo that you want to edit, then adjust the exposure slider to your liking.

670 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