I just got rid of all my compiler errors. One of the problems was that I accidentally renamed the visual form instead of one of the individual text fields in my GUI. When I went to change what I messed up in the code, it seemed to work again. However, whenever I remove F5 for debugging, I get a smaller, blank window as my GUI, and not the one I developed in Visual Studio. Any suggestions?
Here is my main (Forms) class code:
using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text; using System.Windows.Forms; namespace beehive1 { public partial class Form1 : Form { public Form1() { InitializeComponent(); Worker[] workers = new Worker[4]; workers[0] = new Worker(new string[] { "Nectar collector", "Honey Manufacturing" }); workers[1] = new Worker(new string[] { "Egg Care", "Baby Bee Tutoring" }); workers[2] = new Worker(new string[] { "Hive Maintenance", "Sting Patrol" }); workers[3] = new Worker(new string[] { "Nectar Collector", "Honey Manufacturing", "Egg Care", "Baby Bee Manufacturing", "Hive Maintenance", "Sting Patrol" }); queen = new Queen(workers); } Queen queen; private void assignJob_Click(object sender, EventArgs e) { if (queen.AssignWork(workerBeeJob.Text, (int)shifts.Value) == false) MessageBox.Show("No Workers Are Available To Do The Job " + workerBeeJob.Text + "", "The Queen Bee Says..."); else MessageBox.Show("The job " + workerBeeJob.Text + " will be done in " + shifts.Value + " shifts", "The Queen Bee Says..."); } private void button2_Click(object sender, EventArgs e) { report.Text = queen.WorkTheNextShift(); } } }
EDIT: Designer Code:
namespace beehive1 { partial class Form1 {
Maybe the application is no longer associated with this Form class? I tried Clean Build and ReBuild, but it didn't seem to work.
source share