I'd like to try and help you get started on planning how to use multiple Forms (you could use the same strategy with UserControls).
Let's say you have these Forms and Classes defined:
1. Class DataManager : gets requests for Database access from the Controller, pulls the data, sends it to the Controller ...
2. Class Controller :
a. creates and manages all secondary Forms
b. makes requests for data from the DataManager, and injects data received into Controls on the secondary Forms.
c. receives notifications from the secondary Forms when navigation buttons are clicked, or other events occur you need to take action based on.
3. Secondary Forms: assuming they are all identical in terms of Controls and layout:
a. you define a basic template that the Controller will create multiple instances of.
b. navigation buttons, etc.
4. The Main Form: possibly handle:
a. log-in ?
b. request the Controller to establish a valid connection to the DB ?
c. provide facility for user to edit application preferences ?
d. enable the user to start/stop presentation of the secondary Forms in some sequence based on user actions
How the Secondary Forms notify the Controller:
public Action<int> GoBack;
public Action<int> GoNext;
public Action<int> GoStart;
public Action<int> GoEnd;
private void btnNext_MouseClick(object sender, MouseEventArgs e)
{
GoNext(ID);
}
private void btnBack_MouseClick(object sender, MouseEventArgs e)
{
GoBack(ID);
}
private void btnStart_MouseClick(object sender, MouseEventArgs e)
{
GoNext(ID);
}
private void btnLast_MouseClick(object sender, MouseEventArgs e)
{
GoBack(ID);
}
In the Controller you will inject executable code into the Action delegates as you create the secondary forms ... in this example the secondary Form template is named 'Slide:
public const int NumberOfSlides = 10;
private LIst<slide> Slides = new List<slide>();
private Slide currentSlide, nextSlide;
private int LastSlideID;
public void CreateSlides()
{
LastSlideID = NumberOfSlides - 1;
for (int i = 0; i < NumberOfSlides; i++)
{
var slide = new Slide();
slide.Owner = MainForm;
Slides.Add(slide);
slide.GoBack = HandleBack;
slide.GoNext = HandleNext;
slide.GoStart = HandleStart;
slide.GoEnd = HandleEnd;
}
SuspendLayout();
foreach (var slide in Slides)
{
slide.Show();
}
currentSlide = Slides[0];
nextSlide = Slides[1];
currentSlide.BringToFront();
ResumeLayout();
currentSlide.Activate();
currentSlide.Focus();
}
private void HandleNext(int slideId)
{
nextSlide = (currentSlide.ID == LastSlideID) ? Slides[0] : Slides[currentSlide.ID + 1];
Transition();
}