I am using a Spider board with a T35 LCD display
I’m trying to produce an application that has 3 differnet ’ user screens’
1st Screen will be a bitmap image as a ‘splash’ screen’
2nd Screen will be a screen to set date and time
3rd Screen will be a screen to display some data from an RS232 Module
Pressing a button will move between the screens
Now… I can get each screen running individually but when I try and create 3 screens in the same program I can’t get them to work.
I’ve tried setting up 3 seperate windows and using the visible property
I’ve tried setting up 1 window with 3 Canvas and using the visible property.
I can manipulate elements on a Canvas using the visible property but that seems a bit long winded to manipulate elements on a canvas or window, surely there is a way to facilitate multiple screens.
It’s driving me crazy!
Anyone got a good example of how to implement multiple ‘user Screens’
I assume with “multiple screens” you mean multiple forms on a single screen.
What UI librariy do you use?
Glide, WPF, Clix?
What is the exact problem when creating more than 1 screen?
I’ve been using Glide and I hade no problems setting up 3 forms at the same time and switching between them by assigning them as the active window.
I agree with Reinhard that GLIDE the easiest way is.
It schould work with WPF as well.
Canvas layout1 = new Canvas();
Canvas layout2 = new Canvas();
Canvas layout3 = new Canvas();
mainWindow = display.PFWWindow;
mainWindow.Child = layout2
I’m using WPF (but have now had a quick look at Glide and it looks like it offers a lot of nice functionality. One question - it says you need to compile it to create the DLL, sorry to be a numpty but how do you do this?)
I’ve also managed to find an excellent T35 multiple ‘screen’ WPF example on the GHI codeshare website as follows:
I’ve now got the basics of my user screens up and running with touch events that are unique to each screen. Fantastic!
I keep saying this but this Gadgeteeer stuff is really a lot of fun and the support via the forum is fantastic.
Hopefully one day I’ll be able to answer some questions rather than just asking them
forgot to include this in my reply. It is the ‘method’ that I have used to set up the 3 ‘user screens’.
Thought it might be useul to share.
private void SetupMultipleCanvas()
//Set up Splash Screen
lcdSplashWindow = display_T35.WPFWindow;
lcdSplashWindow = new Window();
lcdSplashWindow.Width = display_T35.WPFWindow.Width;
lcdSplashWindow.Height = display_T35.WPFWindow.Height;
CanvasSplash = new Canvas();
CanvasSplash.Width = (int)lcdSplashWindow.Width;
CanvasSplash.Height = (int)lcdSplashWindow.Height;
lcdSplashWindow.Child = CanvasSplash;
lcdSplashWindow.Top = 0;
Image SplashScreenImg = new Image(Resources.GetBitmap(Resources.BitmapResources.SpashScreen));
SplashProgressBar.Height = 5;
SplashProgressBar.Width = 30;
SplashProgressBar.BorderBrush = new SolidColorBrush(Colors.Green);
lcdSplashWindow.Visibility = Visibility.Visible;
//Set up Data Screen
lcdDataWindow = display_T35.WPFWindow;
lcdDataWindow = new Window();
lcdDataWindow.Width = display_T35.WPFWindow.Width;
lcdDataWindow.Height = display_T35.WPFWindow.Height;
CanvasData = new Canvas();
CanvasData.Width = (int)lcdDataWindow.Width;
CanvasData.Height = (int)lcdDataWindow.Height;
lcdDataWindow.Child = CanvasData;
lcdDataWindow.Top = 0;
lcdDataWindow.Background = new SolidColorBrush(Colors.LightGray);
txtCurrentDateTime = new Text(FontNinaB, "lcdDataWindow");
txtCurrentDateTime.ForeColor = Colors.White;
CurrentDateTimeBorder.Height = 20;
CurrentDateTimeBorder.Width = 320;
CurrentDateTimeBorder.BorderBrush = new SolidColorBrush(Colors.Blue);
Canvas.SetTop(txtCurrentDateTime , 2);
txtCurrentDateTime.TouchDown += new TouchEventHandler(txtCurrentDateTime_TouchDown);
lcdDataWindow.Visibility = Visibility.Hidden;
//Set up screen to set date/time
lcdSetDateTimeWindow = display_T35.WPFWindow;
lcdSetDateTimeWindow = new Window();
lcdSetDateTimeWindow.Width = display_T35.WPFWindow.Width;
lcdSetDateTimeWindow.Height = display_T35.WPFWindow.Height;
CanvasSetDateTime = new Canvas();
CanvasSetDateTime.Width = (int)lcdSetDateTimeWindow.Width;
CanvasSetDateTime.Height = (int)lcdSetDateTimeWindow.Height;
lcdSetDateTimeWindow.Child = CanvasSetDateTime;
lcdSetDateTimeWindow.Top = 0;
lcdSetDateTimeWindow.Background = new SolidColorBrush(Colors.Green);
text3 = new Text(FontNinaB, "lcdSetDateTimeWindow");
text3.ForeColor = Colors.White;
text3.TouchDown += new TouchEventHandler(text3_TouchDown);
lcdSetDateTimeWindow.Visibility = Visibility.Hidden;
To compile glide, get the latest version from codeplex.com, open the sln file in Visual studio and compile it.
You can find the glide dll in the bin/Debug or bin/release folder then.
From your project go to add reference, browse and select the glide dll.
Now you can start using glide like in the docs and tutorial on the GHI site.