Avatar of Ahmet Ekrem SABAN
Ahmet Ekrem SABANFlag for Austria

asked on 

Signal tracing GUI widget

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!
C#.NET ProgrammingPhotos / Graphics Software

Avatar of undefined
Last Comment
Ahmet Ekrem SABAN
Avatar of zvytas
zvytas
Flag of United Kingdom of Great Britain and Northern Ireland image

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.
Avatar of Ahmet Ekrem SABAN

ASKER

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.
ASKER CERTIFIED SOLUTION
Avatar of zvytas
zvytas
Flag of United Kingdom of Great Britain and Northern Ireland image

Blurred text
THIS SOLUTION IS ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
Avatar of Ahmet Ekrem SABAN

ASKER

The example given showed me clearly how to proceed. Thank you for your help, zvytas!
.NET Programming
.NET Programming

The .NET Framework is not specific to any one programming language; rather, it includes a library of functions that allows developers to rapidly build applications. Several supported languages include C#, VB.NET, C++ or ASP.NET.

137K
Questions
--
Followers
--
Top Experts
Get a personalized solution from industry experts
Ask the experts
Read over 600 more reviews

TRUSTED BY

IBM logoIntel logoMicrosoft logoUbisoft logoSAP logo
Qualcomm logoCitrix Systems logoWorkday logoErnst & Young logo
High performer badgeUsers love us badge
LinkedIn logoFacebook logoX logoInstagram logoTikTok logoYouTube logo