private Model model; // The associated model. #endregion Fields #region Constructors /// <summary> /// Initializes a new instance of the <see cref="View"/> class. /// </summary> /// <param name="model"> The associated model. </param> public View(Model model) { this.model = model; // Subscribe to changes in the model. model.SubModelOpened += this.OpenView; model.SubModelClosed += this.CloseView; // Initiate default sub-view this.vsView = new VoterSelectionWindow(model.VoterSelection); }
private Model model; // The associated model. /// <summary> /// Initializes a new instance of the <see cref="View"/> class. /// </summary> /// <param name="model"> The associated model. </param> public View(Model model) { this.model = model; // Subscribe to changes in the model. model.SubModelOpened += this.OpenView; model.SubModelClosed += this.CloseView; // Initiate default sub-view this.vsView = new VoterSelectionWindow(model.VoterSelection); }