private void button2_Click(object sender, EventArgs e)
 {
     model.serverHostname = textBox1.Text;
     model.serverPort     = int.Parse(textBox2.Text);
     controller.QueryServer();
     MessageBox.Show(controller.GetServerStatusText(), "Server Status");
     model.LoadSettings(); // Restores model.
 }
        private static void Main()
        {
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);
            AppModel model = new AppModel();

            model.LoadSettings();
            AppContext    context    = new AppContext();
            AppController controller = new AppController();

            controller.Connect(context, model);
            context.Connect(model, controller);
            controller.StartApp();
            Application.Run(context);
        }