public override void Initialize() { base.Initialize(); SetBackground(ResourceManager.CreateImage("Background"), Adjustment.NONE); canv = new MyCanvas((int)Preferences.ViewportManager.VirtualScreenWidth, (int)Preferences.ViewportManager.VirtualScreenHeight); canv.BringToFront = false; AddComponent(canv, 0, 0); colors = new List<Label>(); Image img = ResourceManager.CreateImage("color"); Image aux = img.SubImage(0, 0, img.Width, img.Height); aux.Color = Color.Red; colors.Add(new Label(aux)); aux = img.SubImage(0, 0, img.Width, img.Height); aux.Color = Color.Gray; colors.Add(new Label(aux)); aux = img.SubImage(0, 0, img.Width, img.Height); aux.Color = Color.Yellow; colors.Add(new Label(aux)); aux = img.SubImage(0, 0, img.Width, img.Height); aux.Color = Color.Blue; colors.Add(new Label(aux)); for (int i = 0; i < colors.Count; i++) { AddComponent(colors[i], i * colors[i].Size.X, Preferences.ViewportManager.VirtualScreenHeight - colors[i].Size.Y); colors[i].Released -= Application_Released; colors[i].Released += new Component.ComponentEventHandler(Application_Released); } }