Code Search for Developers
 
 
  

MainFormManager.cs from MASE: Agile Software Engineering at Krugle


Show MainFormManager.cs syntax highlighted

using System;
using System.Windows.Forms;

namespace New_Study_Project
{
	public class MainFormManager : ApplicationContext
	{
		protected bool exitAppOnClose;

		public Form CurrentForm
		{
			get {return MainForm;}
			set
			{
				if (MainForm != null)
				{
					// close the current form, but don't exit the application
					exitAppOnClose=false;
					MainForm.Close();
					exitAppOnClose=true;
				}
				// switch to the new form
				MainForm=value;
				MainForm.Show();
			}
		}

		public MainFormManager()
		{
			exitAppOnClose=true;
		}

		// when a form is closed, bring up the first form in the array,
		// or close the application.
		protected override void OnMainFormClosed(object sender, EventArgs e)
		{
			if (exitAppOnClose)
			{
				base.OnMainFormClosed(sender, e);
			}
		}
	}
}




See more files for this project here

MASE: Agile Software Engineering

The MASE project investigates methods to support the coordination and executable acceptance testing of software projects. Keywords: Agile methods, distributed teams, Extreme Programming. See http://ebe.cpsc.ucalgary.ca/ebe for more information.

Project homepage: http://sourceforge.net/projects/mase
Programming language(s): Java,XML
License: other

  App.cs
  Form1.cs
  Form1.resx
  MainFormManager.cs