public Configure() { InitializeComponent(); settings = new UserPreferences(); settings.GetRegistrySettings(); foreach (Troll troll in settings.trolls) { listTrolls.Items.Add(troll.Name); } txtSteps.Text = settings.nSteps.ToString(); txtMoveInterval.Text = settings.nMoveInterval.ToString(); gbTrolls.Name = "Trolls (" + settings.nTrolls.ToString() + ")"; }
public ScreenSaverForm(Screen screen) { InitializeComponent(); // need to keep a reference this.screen = screen; // load in user preferences this.settings = new UserPreferences(); settings.GetRegistrySettings(); // lets cover the screeeeeeeeeeeeeeeeeeen... this.StartPosition = FormStartPosition.Manual; this.Left = screen.Bounds.Left; this.Top = screen.Bounds.Top; this.Width = screen.Bounds.Width; this.Height = screen.Bounds.Height; // start the show, give us our playground sandpit = new PlayGround(this.CreateGraphics(), this.settings); }