Пример #1
0
        public SelectBallot(User user)
        {
            InitializeComponent();

            this.user     = user;
            this.database = DatabaseInterface.getInstance();
        }
Пример #2
0
        public ViewBallot(Ballot ballot, User user)
        {
            this.ballot = ballot;
            this.user   = user;

            InitializeComponent();
            database = DatabaseInterface.getInstance();

            ballotNameLabel.Text = "Ballot: " + ballot.Name;
        }
Пример #3
0
        public CreateBallot()
        {
            InitializeComponent();

            ballot   = new Ballot();                         // Create a new ballot option to store the questions and options as they're created
            database = DatabaseInterface.getInstance();      // Get the instance of the database interface

            questionSource.DataSource = ballot.Questions;    // Set the ballot's list of questions to the source for the question list box

            questionsListBox.DisplayMember = "QuestionText"; // Have the question list box display the question's text instead of an object id
            questionsListBox.DataSource    = questionSource;

            optionsListBox.DisplayMember = "OptionText";    // Have the option list box display the option's text instead of an object id
            optionsListBox.DataSource    = optionSource;
        }
Пример #4
0
        public Login()
        {
            InitializeComponent();

            database = DatabaseInterface.getInstance(); // Get the instance of the database interface
        }