Graphical library with a designer (second surprise)

Hi,
I will ask in this thread if is possible to integrate some fancy gagues in glide? I will need it for my project and also I think some other users would like use it for some other indicators(temperature, motor rpm, water level, voltage level…)
For example when Im use DundasWinGauge library Im make fancy gagues like this in attachment. Can something like that be added into Glide?
they also use XML file where you configure all gauge parameters, design, sizes, colors…
I can also upload example XML if will help you…

Hi Dejan

You want to display a Dundas controls style gauge on the LCD ? and in real time ?

Will it not be better to send the data to a PC / Server and perform the charting there ? You could use the Dundas Controls to create a dashboard.

Just my thoughts.

-Rajesh

Hi Rajesh,
If I want display gauges from PC then I don’t need FEZ Cobra and 7" LCD for it. I can do on existing CarPC but problem is that it need 20-30 seconds to boot so in this time Im without dashboard in car(I miss oil checking and other things). With FEZ cobra and hibernate option I have working dashboard in few seconds so can use car as with original dashboard… Also if something die on CarPC I still have dashboard and see my speed and other things…
Afcourse must be real time because I need real time speed and rpm :slight_smile:
More Im describe here:
http://www.tinyclr.com/forum/10/3497/

The key to your question is that you use a library today on the big .Net, and you want to know if there’s equivalent functionality in the .netmf. Simply put, there’s not a core component that does what you want, so you’ll have to find a way to do what you want. Even as a proof of concept you could do numeric displays and / or bars that grow in length, that should work fine.

For this thread: you’d need to have Josh consider adding gauge types to Glide. Given you have two different types (180 degree bitmap ones plus the two larger full circle with 270 deg needle arc) you might need to document in more detail what you want. Gauges aren’t hard to draw yourself, especially if you can overlay the needle on a bitmap.

I think that draw only needle will be enought. I can use template like one in my previous post without needle’s as background and drawing only needle on top. This can’t be so complicated(I think). I don’t know what is easier:
1.)Use some image for needle and rotate it
2.)Completely draw needle

For second option we need a lot of more properties for needle.
“Gauge” control in Glide can be have next properties:
Radius
StartAngle
SweepAngle
Name
MaximumValue (For example if maxValue is 1000 this mean that from StartAngle to SweepAngle you have 1000 possible needle positions)
X
Y
height
width

If also drawing needle will be included then need for needle next properties:
Color(If possible that needle is not in one color but like on my picture: use fill color)
Width
Length
Name
CapColor(black cap on position where needle rotate if possible include some reflection like in my picture and fill color)
CapWidth

And maybe some other things which Im miss now that it can be fully customizable…

Adding those is very simple but you or by GHI to Glide.

About real-time, yes they will be updated in “real time”! They will be few milliseconds late but I doubt a human eye can see a 10ms difference :slight_smile:

In fact I would say that you have to be very careful on the refresh rate, so that you don’t confuse the human eye, particularly in dash-based scenarios where you have peripheral vision coming into play. You may in fact have to slow things down :slight_smile:

Agree, my point is that “realtime” is a very misused term. There is in fact no realtime processor, maybe better with FPGA. To some a 1ns delay is realtime but to others 1us delay is realtime. In human related interfaces, a 10ms is realtime. To others, simply knowing a “static determined lag” is enough to make it realtime.

Everything has a jitter and a delay…it is a matter of what you can live with.

[quote]Hi all

I have tried Glide example code with my 3.5" screen and cobra. It worked well. Then I set up the 7" lcd config code and tried the Glide with 7", I got an error as;

An unhandled exception of type ‘System.OutOfMemoryException’ occurred in Microsoft.SPOT.Graphics.dll

I changed

to

at window1.txt.[/quote]

I added

Configuration.Heap.SetCustomHeapSize(8 * 800 * 480);

but still same error ???
Also I suggest you to add the rotate function (either object or screen) to glide.
Have a nice working day

[h]
edit: I think this is a bug

[italic]Error 1 ‘Button’ is an ambiguous reference between ‘Microsoft.SPOT.Hardware.Button’ and ‘GHIElectronics.NETMF.Graphics.Glide.UI.Button’ C:\Users\EFE\Desktop\GlideExample\GlideExample\Program.cs 49 13 GlideExample[/italic]

Glide and the designer have been updated to V 0.1.0 with initial documentation. This is only a beta release. If you stumble across a problem please let us know.

http://www.ghielectronics.com/glide/

Josh Im quick check documentation and Im very suprised :slight_smile: I see Gauge control in documentation :clap: :clap: :clap: :clap: :clap:
Im just quick check it and see that we can set background and cap image. What about needle is it fixed or Im miss something(I didn’t try it in emulator) ?

Now THAT’S sweet! 8)
I can imagine some cool uses for the gauge ;D
One week left untill holidays, can’t wait to finally start playing with all the cool stuff recently released ::slight_smile:

@ Dejan

The needle position is set according to it’s Value property.

Josh I don’t talk about needle position but talk about needle image/style.

I upgraded to the latest and now am having a problem with the textbox control firing the tap event. Below is my code. This worked fine in the previous version except the tapEventHandler was called “OnTap”. The tap events all fire correctly for the button, radio button and checkbox control.

TextBox txtBox1 = (TextBox)_windows[0].GetChildByName(“txtBox1”);
txtBox1.TapEvent += new TapEventHandler(txtBox1_TapEvent);

static void txtBox1_TapEvent(object sender)
{
Glide.ShowKeyboard(sender);
}

Hi,

I’m testing Glide and I have a few questions:

I want to show date and time on my 7" display in a TextBlock.Is it possible to update the TestBlock every second without having to update the whole window. I’ve tried Invalidate() but that only overwrites the previous value without erasing it first. Is there another solution?

Is it possible to define a window of let’s say 100x100 that is displayed in the middle of the screen (for error messages)?.

Peter

Hi,

I’m trying the datagrid and want to change the font runtime by using:

        datagrid2.Font = FontManager.GetFont(FontManager.FontType.droid_reg16);
        datagrid2.Font = FontManager.GetFont(FontManager.FontType.droid_b16);
        datagrid2.Font = FontManager.GetFont(FontManager.FontType.droid_reg08);

but nothing happens. Is this the right way?

Is it possible to make the width of the scrollbar adjustible?

Regards

Peter

@ Dejan
I understand. The current needle isn’t customizable. This was done to get the idea across, but we’ll explore more options.

@ mcox
It appears there was a little bug. This will be fixed in the next release.

@ peterd
Updating a TextBlock requires the whole screen to be redrawn depending on the background. If your background is a solid color, simply do the following

// This overwrites the current text with the background color followed by drawing the text.
Glide.MainWindow.Graphics.DrawRectangle(0, 0, txtBlock.X, txtBlock.Y, txtBlock.Width, txtBlock.Height, 0, 0, Glide.MainWindow.BackColor, 0, 0, Glide.MainWindow.BackColor, 0, 0, 255);
txtBlock.Text = "New Text";
txtBlock.Invalidate();

As for the data grid font, you found a bug. This will be fixed in the next release.

Josh thanks for your time and help.
Only ideas to improve gauge component:
-Add option tu use image as needle
-Add outer padding I don’t know if this is right name that you can create needle like on this attachment(without cap and not start on center gauge)

Maybe next gauges will give you some ideas:
http://www.instablogsimages.com/images/2009/05/20/3d-gauge-cluster-concept_NCf37_5965.jpg
http://www.pojokgarasi.com/wp-content/uploads/2011/01/Nvidia_panel01_610x405-600x398.jpg

http://dribbble.com/system/users/13553/screenshots/125698/shot_1299528115.jpg?1299631445

My favorite one: