Esempio n. 1
0
        public VoterBoxManagerController(VoterBoxManager model, VoterBoxManagerWindow view)
        {
            this.model = model;
            this.view  = view;

            view.AddConnectHandler(this.Connect);
            view.AddUploadHandler(this.Upload);
            view.AddValidateHandler(this.Validate);

            view.Show();
            if (model.Filter != null)
            {
                view.UpdateProgressText("Selecting municipality: " + model.Filter.Municipality);
                view.UpdateProgressText("Selecting polling station: " + model.Filter.PollingStation);
                view.UpdateProgressText("Selecting voter: " + model.Filter.CPRNO);
            }
            else
            {
                view.UpdateProgressText("Please specify a filter in the previous window.");
            }
        }
Esempio n. 2
0
 /// <summary>
 /// Initializes a new instance of the <see cref="VoterBoxManagerWindow"/> class.
 /// </summary>
 /// <param name="model">The associated model. </param>
 public VoterBoxManagerWindow(VoterBoxManager model)
 {
     InitializeComponent();
     this.model = model;
 }