public TreeInfoForm(TradingDataForm form) { InitializeComponent(); // Sets the texboxes to display the correct data TreeCountTB.Text = form.getCount().ToString(); TreeHeightTB.Text = form.getHeight().ToString(); TradePotentialTB.Text = form.GetBestTradePotential(); }
// pass in an instance of the main form to access all required methods public AddCountryForm(TradingDataForm form) { InitializeComponent(); AddTPTB.Text = "Add Trade Partner..."; this.MainForm = form; }