using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Data;
using System.Text;
using System.Windows.Forms;

using FactorsNamespace;

namespace CodeGenerator
{
	public partial class FutureFactorControl : UserControl
	{
	  bool isLoaded;
	  protected bool IsLoaded
	  {
	    get { return isLoaded; }
	  }
	  
		public FutureFactorControl()
		{
			InitializeComponent();
			
			isLoaded = false;
		}

    internal virtual void LoadFactor(FutureFactor factor)
    {
      this.textBoxFactorName.Text = factor.Name;
      isLoaded = true;
    }

    internal virtual void StoreFactor(FutureFactor currentFactor)
    {
      if(IsLoaded)
      {
        currentFactor.Name = this.textBoxFactorName.Text;
      }
    }
  }
}
