예제 #1
0
 static void Main()
 {
     Application.EnableVisualStyles();
     Application.SetCompatibleTextRenderingDefault(false);
     BaseController bc = new BaseController();
     bc.start();
 }
예제 #2
0
        public SettingsView(BaseController baseController)
        {
            bc = baseController;

            // Initialize Panel
            SettingsPanel = new Panel();
            SettingsPanel.BackColor = Color.Transparent;
            SettingsPanel.Height = Screen.PrimaryScreen.Bounds.Height;
            SettingsPanel.Width = Screen.PrimaryScreen.Bounds.Width - 225;
            SettingsPanel.Location = new Point(225, 0);
            SettingsPanel.BorderStyle = BorderStyle.Fixed3D;

            // Initialize Label
            Title.Name = "Resolution_title";
            Title.Text = "Resolutie";
            Title.Location = new Point(100, 100);
            Title.Size = new Size(200, 50);
            Title.Font = new Font("Segoe Print", 23f);
            SettingsPanel.Controls.Add(Title);

            //Combobox for selecting the desired resolution.
            Resolution.Name = "Resolution_combobox";
            Resolution.Items.Add("1920x1080");
            Resolution.Items.Add("1600x900");
            Resolution.Items.Add("1366x768");
            Resolution.SelectedIndex = 0;
            Resolution.DropDownStyle = ComboBoxStyle.DropDownList;
            Resolution.Location = new Point(100, 165);
            Resolution.Size = new Size(200, 100);
            Resolution.Font = new Font("Arial", 18F);
            SettingsPanel.Controls.Add(Resolution);

            // Button for "cancel"
            var cancelButton = new Button();
            cancelButton.Font = new Font("Segoe print", 20F);
            cancelButton.Name = "cancelChanges";
            cancelButton.Text = "Annuleren";
            cancelButton.Location = new Point(1075, 950);
            cancelButton.Size = new Size(200, 55);
            cancelButton.FlatStyle = FlatStyle.Flat;
            cancelButton.BackgroundImage = Properties.Resources.grey_wash_wall;
            cancelButton.ForeColor = Color.White;
            cancelButton.FlatStyle = FlatStyle.Flat;
            cancelButton.MouseClick += new MouseEventHandler(cancel);
            SettingsPanel.Controls.Add(cancelButton);

            // Button for "save"
            var saveButton = new Button();
            saveButton.Font = new Font("Segoe print", 20F);
            saveButton.Name = "saveSettings";
            saveButton.Text = "Wijzigingen opslaan";
            saveButton.Location = new Point(1285, 950);
            saveButton.Size = new Size(400, 55);
            saveButton.FlatStyle = FlatStyle.Flat;
            saveButton.BackgroundImage = Properties.Resources.grey_wash_wall;
            saveButton.ForeColor = Color.White;
            saveButton.FlatStyle = FlatStyle.Flat;
            saveButton.MouseClick += new MouseEventHandler(saveSettings);
            SettingsPanel.Controls.Add(saveButton);
        }
예제 #3
0
        public CreateQuestionView(BaseController baseController, int questionlist)
        {
            bc = baseController;
            questionFlowPanel = new FlowLayoutPanel();
            questionCounter = 0;
            panelCounter = 0;
            this.questionlist = questionlist;
            // Panel settings
            questionFlowPanel.BackColor = Color.Transparent;
            questionFlowPanel.Height = Screen.PrimaryScreen.Bounds.Height;
            questionFlowPanel.Width = Screen.PrimaryScreen.Bounds.Width - 225;
            questionFlowPanel.Name = "MakeQuestion_Panel";
            questionFlowPanel.Location = new Point(225, 0);
            questionFlowPanel.AutoScroll = true;
            questionFlowPanel.Controls.Clear();
            questionFlowPanel.WrapContents = false;
            questionFlowPanel.FlowDirection = FlowDirection.TopDown;

            makeEmptyPanel(100);
            makeAddQuestionAndSave();
            foreach (Control c in questionFlowPanel.Controls)
            {
                if (c.Name == "")
                {
                    c.Controls.Clear();
                       questionFlowPanel.Controls.Remove(c);
                }
            }
        }
예제 #4
0
 public BaseView(BaseController bc)
 {
     InitializeComponent();
     this.bc = bc;
     this.bc.ClearCache();
     FormClosing += BaseView_FormClosing;
 }
예제 #5
0
 public PollPanel(BaseController bc, int id)
 {
     this.id = id;
     this.bc = bc;
     Name = "PollPanel";
     BackColor = Color.Transparent;
     Height = 700;
     Width = 750;
     Location = new Point(400, 220);
     fillData();
 }
예제 #6
0
        public OpenQuestionView(BaseController baseController, int id)
        {
            bc = baseController;
            questionID = id;
            testData = new Dictionary<string, string>();

            // Panel settings
            openQuestionPanel = new Panel();
            openQuestionPanel.BackColor = Color.Transparent;
            openQuestionPanel.Height = Screen.PrimaryScreen.Bounds.Height;
            openQuestionPanel.Width = Screen.PrimaryScreen.Bounds.Width - 225;
            openQuestionPanel.Location = new Point(225, 0);
            openQuestionPanel.AutoScroll = true;

            makeLabels();
            makeTable();
        }
예제 #7
0
        int timesOpenAnswer = 0; // Keeps track of wich open answer the student is

        #endregion Fields

        #region Constructors

        public ShowQuestionView(BaseController baseController, int id)
        {
            // Gets questionlist and questions
            bc = baseController;
            Questions = bc.sqc.getQuestions(id);
            Questionlists = bc.sqlc.get(id);
            idQuestionlist = id;

            // if not empty
            if (Questions.Count != 0)
            {
                // Initialize Panel
                CreateMainPanel();

                if (Questionlists.type == 0)
                {
                    // Niet synchroon

                    Next.Enabled = true;
                }
                else if (Questionlists.type == 1)
                {
                    // Synchroon

                    // Initialize loop
                    loopThread = new Thread(new ThreadStart(this.MainLoop));
                    loopThread.IsBackground = true;
                    loopThread.Start();
                    Next.Enabled = false;
                }
                else if (Questionlists.type == 2)
                {
                    // Timer
                }

                Handle_Question_Type();

            }
            else
            {
                MessageBox.Show("Hier staan geen vragen in!");
            }
        }
예제 #8
0
        public OverviewView(BaseController baseController, int id)
        {
            bc = baseController;

            questionlists = bc.qlc.getAll();
            questionlistLogs = bc.stc.getQuestionlistLogs();

            colleges = bc.cc.getColleges();

            OverviewViewPanelStatistiek = new CustomPanel();
            OverviewViewPanelStatistiek.BackColor = Color.Transparent;
            OverviewViewPanelStatistiek.Height = Screen.PrimaryScreen.Bounds.Height;
            OverviewViewPanelStatistiek.Width = Screen.PrimaryScreen.Bounds.Width - 225;
            OverviewViewPanelStatistiek.Location = new Point(225, 0);
            OverviewViewPanelStatistiek.BorderStyle = BorderStyle.Fixed3D;
            OverviewViewPanelStatistiek.AutoScroll = true;
            OverviewViewPanelStatistiek.AutoScrollMargin = new Size(0, 95);

            // Fills the table with data from "Colleges"
            foreach (College c in colleges)
            {
                Label collegeTitle = new Label();
                collegeTitle.BackColor = Color.Transparent;
                collegeTitle.Text = c.title;
                collegeTitle.Name = c.title;
                collegeTitle.Size = new Size(300, 75);
                collegeTitle.Font = new Font("Segoe print", 26F);
                collegeTitle.Location = new Point(x, y);
                OverviewViewPanelStatistiek.Controls.Add(collegeTitle);
                CustomPanel questionlistPanel = new CustomPanel();
                questionlistPanel.BackColor = Color.Transparent;
                questionlistPanel.Name = "listPanel" + c.id;
                questionlistPanel.Size = new Size(1000, 181);
                questionlistPanel.BackColor = Color.Transparent;
                questionlistPanel.Location = new Point(x, y + 75);
                createTable(questionlistPanel, c.id);
                questionlistPanel.AutoScrollMargin = new Size(0, 95);
                OverviewViewPanelStatistiek.Controls.Add(questionlistPanel);
                //Makes room for the next college
            }
        }
예제 #9
0
        public ShowQuestionView(BaseController baseController, int id)
        {
            // Gets questionlist and questions
            bc = baseController;
            ListofQuestions = bc.qc.getQuestions(id);
            Questionlist = bc.qlc.get(id);

            CreateMainPanel();

            if (Questionlist.type == 0)
            {
             // Niet synchroon

             }
             else if (Questionlist.type == 1)
             {
                // Synchroon

                Next.Enabled = false;

                NextQuestion.Name = "NextQuestion";
                NextQuestion.Text = "Volgende vraag bij studenten";
                NextQuestion.Size = new Size(250, 50);
                NextQuestion.Font = new Font("Segoe Print", 10f);
                NextQuestion.ForeColor = Color.White;
                NextQuestion.FlatStyle = FlatStyle.Flat;
                NextQuestion.FlatAppearance.BorderColor = Color.White;
                NextQuestion.FlatAppearance.BorderSize = 2;
                NextQuestion.MouseClick += new MouseEventHandler(NextQuestion_Click);
                NextQuestion.BackgroundImage = Properties.Resources.grey_wash_wall_tablebanner;
                AnswerQuestionPanel.Controls.Add(NextQuestion);
            }
            else if (Questionlist.type == 2)
            {
                // Timer
            }

             Handle_Question_Type();
        }
예제 #10
0
        public AddQuestionPanel(BaseController baseControlle, int index)
        {
            this.index = index;
            //properties for panel and everthing on it
            bc = baseControlle;
            AddQuestion_Panel = new Panel();
            AddQuestion_Panel.BackColor = Color.Transparent;
            AddQuestion_Panel.Height = Screen.PrimaryScreen.Bounds.Height;
            AddQuestion_Panel.Width = Screen.PrimaryScreen.Bounds.Width - 225;
            AddQuestion_Panel.Location = new Point(225, 0);

            QuestionNameLabel = new Label();
            QuestionNameLabel.Font = new Font("Segoe print", 26F);
            QuestionNameLabel.Name = "QuestionNameLabel";
            QuestionNameLabel.Size = new Size(230, 60);
            QuestionNameLabel.Location = new Point(90, 20);
            QuestionNameLabel.Text = "Vraag:";

            QuestionName = new TextBox();
            QuestionName.Font = new Font("Segoe print", 26F);
            QuestionName.Name = "QuestionNameLabel";
            QuestionName.Size = new Size(850, 60);
            QuestionName.Location = new Point(320, 20);

            QuestionType = new Label();
            QuestionType.Font = new Font("Segoe print", 26F);
            QuestionType.Name = "QuestionTypeLabel";
            QuestionType.Size = new Size(280, 60);
            QuestionType.Location = new Point(90, 145);
            QuestionType.Text = "Type vraag:";

            combobox = new ComboBox();
            combobox.DisplayMember = "Text";
            combobox.Items.Add(new { Text = "Open vraag" });
            combobox.Items.Add(new { Text = "Stelling" });
            combobox.Items.Add(new { Text = "2 Meerkeuzevraag" });
            combobox.Items.Add(new { Text = "3 Meerkeuzevraag" });
            combobox.Items.Add(new { Text = "4 Meerkeuzevraag" });
            combobox.Items.Add(new { Text = "5 Meerkeuzevraag" });
            combobox.Items.Add(new { Text = "6 Meerkeuzevraag" });
            combobox.Location = new Point(375, 150);
            combobox.Size = new Size(280, 60);
            combobox.Font = new Font("Segoe print", 18F);

            AddQuestion_Panel.Controls.Add(QuestionNameLabel);
            AddQuestion_Panel.Controls.Add(QuestionName);
            AddQuestion_Panel.Controls.Add(QuestionType);
            AddQuestion_Panel.Controls.Add(combobox);

            this.combobox.SelectedIndexChanged +=
            new System.EventHandler(comboBox_SelectedIndex);

            Answer1.AutoSize = true;
            Answer1.Location = new Point(245, 250);
            Answer1.Name = "Answer1#";
            Answer1.Size = new Size(61, 13);
            Answer1.Text = "Antwoord 1";
            Answer1.Font = new Font("Segoe Print", 12F);
            Answer1.BackColor = Color.Transparent;

            Answer2.AutoSize = true;
            Answer2.Location = new Point(245, 310);
            Answer2.Name = "Answer2#";
            Answer2.Size = new Size(61, 13);
            Answer2.Text = "Antwoord 2";
            Answer2.Font = new Font("Segoe Print", 12F);
            Answer2.BackColor = Color.Transparent;

            Answer3.AutoSize = true;
            Answer3.Location = new Point(245, 370);
            Answer3.Name = "Answer3#";
            Answer3.Size = new Size(61, 13);
            Answer3.Text = "Antwoord 3";
            Answer3.Font = new Font("Segoe Print", 12F);
            Answer3.BackColor = Color.Transparent;

            Answer4.AutoSize = true;
            Answer4.Location = new Point(245, 430);
            Answer4.Name = "Answer4#";
            Answer4.Size = new Size(61, 13);
            Answer4.TabIndex = 2;
            Answer4.Text = "Antwoord 4";
            Answer4.Font = new Font("Segoe Print", 12F);
            Answer4.BackColor = Color.Transparent;

            Answer5.AutoSize = true;
            Answer5.Location = new Point(245, 490);
            Answer5.Name = "Answer5#";
            Answer5.Size = new Size(61, 13);
            Answer5.TabIndex = 2;
            Answer5.Text = "Antwoord 5";
            Answer5.Font = new Font("Segoe Print", 12F);
            Answer5.BackColor = Color.Transparent;

            Answer6.AutoSize = true;
            Answer6.Location = new Point(245, 550);
            Answer6.Name = "Answer6#";
            Answer6.Size = new Size(61, 13);
            Answer6.TabIndex = 2;
            Answer6.Text = "Antwoord 6";
            Answer6.Font = new Font("Segoe Print", 12F);
            Answer6.BackColor = Color.Transparent;

            // Answer textboxes
            RightAnswer.AutoSize = true;
            RightAnswer.Location = new Point(820, 200);
            RightAnswer.Name = "RightAnswer#";
            RightAnswer.Size = new Size(81, 13);
            RightAnswer.Text = "Juiste antwoord";
            RightAnswer.Font = new Font("Segoe Print", 12F);
            RightAnswer.BackColor = Color.Transparent;

            Answer1Textbox.Location = new Point(400, 250);
            Answer1Textbox.Name = "Answer1Textbox#";
            Answer1Textbox.Size = new Size(430, 20);
            Answer1Textbox.Font = new Font("Segoe Print", 12F);

            Answer2Textbox.Location = new Point(400, 310);
            Answer2Textbox.Name = "Answer2Textbox#";
            Answer2Textbox.Size = new Size(430, 20);
            Answer2Textbox.Font = new Font("Segoe Print", 12F);

            Answer3Textbox.Location = new Point(400, 370);
            Answer3Textbox.Name = "Answer3Textbox#";
            Answer3Textbox.Size = new Size(430, 20);
            Answer3Textbox.Font = new Font("Segoe Print", 12F);

            Answer4Textbox.Location = new Point(400, 430);
            Answer4Textbox.Name = "Answer4Textbox#";
            Answer4Textbox.Size = new Size(430, 20);
            Answer4Textbox.Font = new Font("Segoe Print", 12F);

            Answer5Textbox.Location = new Point(400, 490);
            Answer5Textbox.Name = "Answer5Textbox#";
            Answer5Textbox.Size = new Size(430, 20);
            Answer5Textbox.Font = new Font("Segoe Print", 12F);

            Answer6Textbox.Location = new Point(400, 550);
            Answer6Textbox.Name = "Answer6Textbox#";
            Answer6Textbox.Size = new Size(430, 20);
            Answer6Textbox.Font = new Font("Segoe Print", 12F);

            Answer1Radiobuttons.AutoSize = true;
            Answer1Radiobuttons.Location = new Point(890, 260);
            Answer1Radiobuttons.Name = "Answer1Radiobutton#";
            Answer1Radiobuttons.Size = new Size(15, 14);
            Answer1Radiobuttons.UseVisualStyleBackColor = true;

            Answer2Radiobuttons.AutoSize = true;
            Answer2Radiobuttons.Location = new Point(890, 320);
            Answer2Radiobuttons.Name = "Answer2Radiobutton#";
            Answer2Radiobuttons.Size = new Size(15, 14);
            Answer2Radiobuttons.UseVisualStyleBackColor = true;

            Answer3Radiobuttons.AutoSize = true;
            Answer3Radiobuttons.Location = new Point(890, 380);
            Answer3Radiobuttons.Name = "Answer3Radiobutton#";
            Answer3Radiobuttons.Size = new Size(15, 14);
            Answer3Radiobuttons.UseVisualStyleBackColor = true;

            Answer4Radiobuttons.AutoSize = true;
            Answer4Radiobuttons.Location = new Point(890, 440);
            Answer4Radiobuttons.Name = "Answer4Radiobutton#";
            Answer4Radiobuttons.Size = new Size(15, 14);
            Answer4Radiobuttons.UseVisualStyleBackColor = true;

            Answer5Radiobuttons.AutoSize = true;
            Answer5Radiobuttons.Location = new Point(890, 500);
            Answer5Radiobuttons.Name = "Answer5Radiobutton#";
            Answer5Radiobuttons.Size = new Size(15, 14);
            Answer5Radiobuttons.UseVisualStyleBackColor = true;

            Answer6Radiobuttons.AutoSize = true;
            Answer6Radiobuttons.Location = new Point(890, 560);
            Answer6Radiobuttons.Name = "Answer6Radiobutton#";
            Answer6Radiobuttons.Size = new Size(15, 14);
            Answer6Radiobuttons.UseVisualStyleBackColor = true;

            AnswerOpenQuestionTextbox.Location = new Point(320, 250);
            AnswerOpenQuestionTextbox.Name = "AnswerOpenQuestionTextbox";
            AnswerOpenQuestionTextbox.Multiline = true;
            AnswerOpenQuestionTextbox.Size = new Size(600, 150);
            AnswerOpenQuestionTextbox.Font = new Font("Segoe Print", 12F);

            OpenQuestion.Font = new Font("Segoe print", 26F);
            OpenQuestion.Name = "OpenQuestionLabel";
            OpenQuestion.Size = new Size(280, 60);
            OpenQuestion.Location = new Point(90, 250);
            OpenQuestion.Text = "Antwoord:";

            Answer1Thesis.Font = new Font("Segoe print", 26F);
            Answer1Thesis.Name = "Answer1Thesis";
            Answer1Thesis.Size = new Size(280, 60);
            Answer1Thesis.Location = new Point(90, 250);
            Answer1Thesis.Text = "Eerste optie:";

            Answer2Thesis.Font = new Font("Segoe print", 26F);
            Answer2Thesis.Name = "Answer2Thesis";
            Answer2Thesis.Size = new Size(280, 60);
            Answer2Thesis.Location = new Point(90, 340);
            Answer2Thesis.Text = "Tweede optie:";

            Answer1TextboxThesis.Location = new Point(375, 250);
            Answer1TextboxThesis.Name = "Answer1TextboxThesis";
            Answer1TextboxThesis.Size = new Size(600, 60);
            Answer1TextboxThesis.Font = new Font("Segoe Print", 20F);

            Answer2TextboxThesis.Location = new Point(375, 340);
            Answer2TextboxThesis.Name = "Answer2TextboxThesis";
            Answer2TextboxThesis.Size = new Size(600, 60);
            Answer2TextboxThesis.Font = new Font("Segoe Print", 20F);

            Save.Size = new Size(150, 50);
            Save.Text = "Opslaan";
            Save.Font = new Font("Segoe Print", 17f);
            Save.ForeColor = Color.White;
            Save.FlatStyle = FlatStyle.Flat;
            Save.FlatAppearance.BorderColor = Color.White;
            Save.FlatAppearance.BorderSize = 2;
            Save.MouseClick += new MouseEventHandler(SaveAll_Click);
            Save.BackgroundImage = Properties.Resources.grey_wash_wall_tablebanner;

            Stop.Name = "Stop";
            Stop.Text = char.ConvertFromUtf32(8592);
            Stop.Location = new Point(15, 20);
            Stop.Size = new Size(75, 50);
            Stop.Font = new Font("Segoe Print", 17f);
            Stop.ForeColor = Color.White;
            Stop.FlatStyle = FlatStyle.Flat;
            Stop.FlatAppearance.BorderColor = Color.White;
            Stop.FlatAppearance.BorderSize = 2;
            Stop.MouseClick += new MouseEventHandler(Stop_Click);
            Stop.BackgroundImage = Properties.Resources.grey_wash_wall_tablebanner;

            AddQuestion_Panel.Controls.Add(Answer1);
            AddQuestion_Panel.Controls.Add(Answer2);
            AddQuestion_Panel.Controls.Add(Answer3);
            AddQuestion_Panel.Controls.Add(Answer4);
            AddQuestion_Panel.Controls.Add(Answer5);
            AddQuestion_Panel.Controls.Add(Answer6);
            AddQuestion_Panel.Controls.Add(RightAnswer);
            AddQuestion_Panel.Controls.Add(Answer1Textbox);
            AddQuestion_Panel.Controls.Add(Answer2Textbox);
            AddQuestion_Panel.Controls.Add(Answer3Textbox);
            AddQuestion_Panel.Controls.Add(Answer4Textbox);
            AddQuestion_Panel.Controls.Add(Answer5Textbox);
            AddQuestion_Panel.Controls.Add(Answer6Textbox);
            AddQuestion_Panel.Controls.Add(Answer1Radiobuttons);
            AddQuestion_Panel.Controls.Add(Answer2Radiobuttons);
            AddQuestion_Panel.Controls.Add(Answer3Radiobuttons);
            AddQuestion_Panel.Controls.Add(Answer4Radiobuttons);
            AddQuestion_Panel.Controls.Add(Answer5Radiobuttons);
            AddQuestion_Panel.Controls.Add(Answer6Radiobuttons);
            AddQuestion_Panel.Controls.Add(AnswerOpenQuestionTextbox);
            AddQuestion_Panel.Controls.Add(OpenQuestion);
            AddQuestion_Panel.Controls.Add(Answer1Thesis);
            AddQuestion_Panel.Controls.Add(Answer2Thesis);
            AddQuestion_Panel.Controls.Add(Answer1TextboxThesis);
            AddQuestion_Panel.Controls.Add(Answer2TextboxThesis);
            AddQuestion_Panel.Controls.Add(Save);
            AddQuestion_Panel.Controls.Add(Stop);

            DisableAll();
        }
예제 #11
0
 //AuthController constructor
 public AuthController(BaseController bc)
 {
     this.bc = bc;
 }
예제 #12
0
 //Constructor LoginView, sets BaseController after initializing it.
 public LoginView(BaseController bc)
 {
     bc.init();
     this.bc = bc;
     InitializeComponent();
 }
예제 #13
0
        public CreateQuestionlistView(BaseController baseController)
        {
            bc = baseController;

            // Initialize Panel
            QuestionList_Panel = new Panel();
            QuestionList_Panel.BackColor = Color.Transparent;
            QuestionList_Panel.Height = Screen.PrimaryScreen.Bounds.Height;
            QuestionList_Panel.Width = Screen.PrimaryScreen.Bounds.Width -225;
            QuestionList_Panel.Location = new Point(225, 0);
            QuestionList_Panel.BorderStyle = BorderStyle.Fixed3D;

            //  LABELS

            // Title
            Label Title = new Label();
            Title.Name = "Title";
            Title.Text = "Vragenlijst aanmaken";
            Title.Location = new Point(200, 100);
            Title.Size = new Size(500, 50);
            Title.Font = new Font("Segoe Print", 20f);
            QuestionList_Panel.Controls.Add(Title);

            // Name
            Label name = new Label();
            name.Name = "Name";
            name.Text = "Naam";
            name.Location = new Point(200, 250);
            name.Size = new Size(100, 50);
            name.Font = new Font("Segoe Print", 13f);
            QuestionList_Panel.Controls.Add(name);

            // Type Questionlist
            Type = new Label();
            Type.Name = "Type";
            Type.Text = "Type";
            Type.Location = new Point(200, 300);
            Type.Size = new Size(100, 50);
            Type.Font = new Font("Segoe Print", 13f);
            QuestionList_Panel.Controls.Add(Type);

            // IconName
            IconName = new Label();
            IconName.Name = "IconName";
            IconName.Text = "Icoon";
            IconName.Location = new Point(200, 360);
            IconName.Size = new Size(100, 50);
            IconName.Font = new Font("Segoe Print", 13f);
            QuestionList_Panel.Controls.Add(IconName);

            // Preview window

            Label Preview = new Label();
            Preview.Name = "Preview";
            Preview.Text = "Icoon Voorbeeld";
            Preview.Location = new Point(1000, 175);
            Preview.Size = new Size(5000, 50);
            Preview.Font = new Font("Segoe Print", 13f);
            QuestionList_Panel.Controls.Add(Preview);

            // TEXTBOXES

            // Name Textbox
            input = new TextBox();
            input.Name = "Name_Input";
            input.Location = new Point(325, 254);
            input.Size = new Size(150, 10);
            input.BorderStyle = BorderStyle.Fixed3D;
            QuestionList_Panel.Controls.Add(input);

            // Add Input
            Timer_Input = new NumericUpDown();
            Timer_Input.Name = "Timer_Input";
            Timer_Input.Text = "0";
            Timer_Input.Location = new Point(325, 304);
            Timer_Input.Size = new Size(150, 10);
            Timer_Input.BorderStyle = BorderStyle.Fixed3D;
            Timer_Input.Visible = false;
            QuestionList_Panel.Controls.Add(Timer_Input);

            // COMBOBOXES
            // Type Select
            Select_Type = new ComboBox();
            Select_Type.Name = "Selecteer_Status";
            Select_Type.Items.Add("Niet Synchroon");
            Select_Type.Items.Add("Synchroon");
            Select_Type.Items.Add("Timer");
            Select_Type.SelectedIndex = 0;
            Select_Type.SelectedIndexChanged += new EventHandler(Add_Timer);
            Select_Type.DropDownStyle = ComboBoxStyle.DropDownList;
            Select_Type.Location = new Point(325, 304);
            Select_Type.Size = new Size(150, 100);
            QuestionList_Panel.Controls.Add(Select_Type);

            // PICTUREBOXES

            // Preview Window
            PictureBox Icon = new PictureBox();
            Icon.Name = "Icon";
            Icon.Location = new Point(830, 250);
            Icon.Size = new Size(500, 500);
            Icon.BorderStyle = BorderStyle.FixedSingle;
            Icon.Image = temp_Image;
            QuestionList_Panel.Controls.Add(Icon);

            // BUTTONS

            // Make List
            MakeList = new Button();
            MakeList.Name = "MakeList";
            MakeList.Text = "Maak aan";
            MakeList.Location = new Point(200, 600);
            MakeList.Size = new Size(300, 100);
            MakeList.Font = new Font("Segoe Print", 20f);
            MakeList.FlatStyle = FlatStyle.Flat;
            MakeList.BackgroundImage = Properties.Resources.grey_wash_wall_tablebanner;
            MakeList.FlatAppearance.BorderColor = Color.White;
            MakeList.ForeColor = Color.White;
            MakeList.FlatAppearance.BorderSize = 2;
            MakeList.MouseClick += new MouseEventHandler(MakeList_Click);
            MakeList.MouseHover += new EventHandler(MakeList_Hover);
            MakeList.MouseLeave += new EventHandler(MakeList_Leave);
            QuestionList_Panel.Controls.Add(MakeList);

            // Choose Icon
            Choose_Icon = new Button();
            Choose_Icon.Name = "Choose_Icon";
            Choose_Icon.Text = "Kies Icoon";
            Choose_Icon.Location = new Point(325, 355);
            Choose_Icon.Size = new Size(154, 50);
            Choose_Icon.Font = new Font("Segoe Print", 12f);
            Choose_Icon.FlatStyle = FlatStyle.Flat;
            Choose_Icon.BackgroundImage = Properties.Resources.grey_wash_wall_tablebanner;
            Choose_Icon.FlatAppearance.BorderColor = Color.White;
            Choose_Icon.ForeColor = Color.White;
            Choose_Icon.FlatAppearance.BorderSize = 2;
            Choose_Icon.MouseClick += new MouseEventHandler(Icon_Click);
            Choose_Icon.MouseHover += new EventHandler(Choose_Icon_Hover);
            Choose_Icon.MouseLeave += new EventHandler(Choose_Icon_Leave);
            QuestionList_Panel.Controls.Add(Choose_Icon);
        }
예제 #14
0
        // OverViewCollegeView constructor,
        public OverviewCollegeView(BaseController Basecontroller)
        {
            bc = Basecontroller;
            //Gets all the colleges for the student.
            colleges = bc.scc.getColleges(bc.user.id);

            OverviewCollegePanel = new CustomPanel();
            OverviewCollegePanel.BackColor = Color.Transparent;
            OverviewCollegePanel.Height = Screen.PrimaryScreen.Bounds.Height;
            OverviewCollegePanel.Width = Screen.PrimaryScreen.Bounds.Width - 225;
            OverviewCollegePanel.Location = new Point(225, 0);
            OverviewCollegePanel.BorderStyle = BorderStyle.Fixed3D;
            OverviewCollegePanel.AutoScroll = true;
            OverviewCollegePanel.AutoScrollMargin = new Size(0, 95);

            //input label for subject code
            codeLabel = new Label();
            codeLabel.Name = "Name_Input";
            codeLabel.Location = new Point(100, 90);
            codeLabel.Font = new Font("Segoe print", 26F);
            codeLabel.Size = new Size(250, 75);
            codeLabel.Text = "Unieke code:";
            OverviewCollegePanel.Controls.Add(codeLabel);

            //Input screen for subject-code
            code = new TextBox();
            code.Name = "code_Input";
            code.Location = new Point(350, 90);
            code.Font = new Font("Ariel", 30F);
            code.Size = new Size(185, 55);
            code.MaxLength = 5;
            code.CharacterCasing = CharacterCasing.Upper;
            code.Multiline = true;
            code.BorderStyle = BorderStyle.Fixed3D;
            OverviewCollegePanel.Controls.Add(code);

            //Button for submitting subject-code
            var addCollegeButton = new Button();
            addCollegeButton.Font = new Font("Segoe print", 20F);
            addCollegeButton.Location = new Point(550, 90);
            addCollegeButton.Size = new Size(200, 55);
            addCollegeButton.Name = "add";
            addCollegeButton.Text = "Toevoegen";
            addCollegeButton.MouseClick += new MouseEventHandler(addCollegeButton_Click);
            addCollegeButton.BackgroundImage = Properties.Resources.grey_wash_wall;
            addCollegeButton.ForeColor = Color.White;
            addCollegeButton.FlatStyle = FlatStyle.Flat;
            OverviewCollegePanel.Controls.Add(addCollegeButton);

            //Makes table for each college
            foreach (College c in colleges)
            {
                Label collegeTitle = new Label();
                collegeTitle.BackColor = Color.Transparent;
                collegeTitle.Text = c.title;
                collegeTitle.Name = c.title;
                collegeTitle.Size = new Size(300, 75);
                collegeTitle.Font = new Font("Segoe print", 26F);
                collegeTitle.Location = new Point(x, y);
                OverviewCollegePanel.Controls.Add(collegeTitle);

                CustomPanel questionlistPanel = new CustomPanel();
                questionlistPanel.BackColor = Color.Transparent;
                questionlistPanel.Name = "listPanel" + c.id;
                questionlistPanel.Size = new Size(1000, 181);
                questionlistPanel.BackColor = Color.Transparent;
                questionlistPanel.Location = new Point(x, y + 75);
                createTable(questionlistPanel, c.id);
                questionlistPanel.AutoScrollMargin = new Size(0, 95);
                OverviewCollegePanel.Controls.Add(questionlistPanel);
            }
        }
예제 #15
0
        public OverviewCollegeView(BaseController Basecontroller)
        {
            bc = Basecontroller;
            colleges = bc.cc.getColleges();

            mainPanel = new CustomPanel();
            mainPanel.BackColor = Color.Transparent;
            mainPanel.Height = Screen.PrimaryScreen.Bounds.Height;
            mainPanel.Width = Screen.PrimaryScreen.Bounds.Width - 225;
            mainPanel.Location = new Point(225, 0);
            mainPanel.BorderStyle = BorderStyle.Fixed3D;
            mainPanel.AutoScroll = true;
            mainPanel.AutoScrollMargin = new Size(0,95);

            foreach (College c in colleges)
            {
                // initialize title
                Label collegeTitle = new Label();
                collegeTitle.BackColor = Color.Transparent;
                collegeTitle.Text = c.title;
                collegeTitle.Name = c.title;
                collegeTitle.Size = new Size(300, 75);
                collegeTitle.Font = new Font("Segoe print", 26F);
                collegeTitle.Location = new Point(x, y);
                mainPanel.Controls.Add(collegeTitle);

                // initialize setActive butoon
                Button setActive = new Button();
                setActive.Name = "Actief#" + c.id;
                setActive.Font = new Font("Segoe Print", 8F);
                // check if there is a code already
                if(c.status == false)
                {
                    setActive.Text = "Zet Actief";
                } else
                {
                    setActive.Text = "Zet Inactief";
                }

                setActive.Location = new Point(x + 300, y + 20);
                setActive.Size = new Size(100, 30);
                setActive.FlatStyle = FlatStyle.Flat;
                setActive.BackgroundImage = Properties.Resources.grey_wash_wall_tablebanner;
                setActive.FlatAppearance.BorderColor = Color.White;
                setActive.ForeColor = Color.White;
                setActive.FlatAppearance.BorderSize = 1;
                setActive.MouseClick += new MouseEventHandler(setActiveClick);
                mainPanel.Controls.Add(setActive);

                // initialize code
                Code = new Label();
                Code.Name = "Code#" + c.id;
                Code.Font = new Font("Arial", 9F);
                Code.Text = c.code;
                Code.Location = new Point(x + 450, y + 25);
                Code.Size = new Size(55, 50);
                codeList.Add(Code);
                mainPanel.Controls.Add(Code);

                // initialize edit
                Button Edit = new Button();
                Edit.Name = "Bewerk#" + c.id;
                Edit.Font = new Font("Segoe Print", 8F);
                Edit.Text = "Bewerk";
                Edit.Location = new Point(x + 720, y + 20);
                Edit.Size = new Size(100, 30);
                Edit.FlatStyle = FlatStyle.Flat;
                Edit.BackgroundImage = Properties.Resources.grey_wash_wall_tablebanner;
                Edit.FlatAppearance.BorderColor = Color.White;
                Edit.ForeColor = Color.White;
                Edit.FlatAppearance.BorderSize = 1;
                Edit.MouseClick += new MouseEventHandler(setEditClick);
                mainPanel.Controls.Add(Edit);

                // initialize delete
                Button Delete = new Button();
                Delete.Name = "Verwijder #" + c.id;
                Delete.Font = new Font("Segoe Print", 8F);
                Delete.Text = "Verwijder";
                Delete.Location = new Point(x + 875, y + 20);
                Delete.Size = new Size(100, 30);
                Delete.FlatStyle = FlatStyle.Flat;
                Delete.BackgroundImage = Properties.Resources.grey_wash_wall_tablebanner;
                Delete.FlatAppearance.BorderColor = Color.White;
                Delete.ForeColor = Color.White;
                Delete.FlatAppearance.BorderSize = 1;
                Delete.MouseClick += new MouseEventHandler(setDeleteClick);
                mainPanel.Controls.Add(Delete);

                // initialize panel
                CustomPanel questionlistPanel = new CustomPanel();
                questionlistPanel.BackColor = Color.Transparent;
                questionlistPanel.Name = "listPanel" + c.id;
                questionlistPanel.Size = new Size(1000, 181);
                questionlistPanel.BackColor = Color.Transparent;
                questionlistPanel.Location = new Point(x, y + 75);
                createTable(questionlistPanel, c.id);
                questionlistPanel.AutoScrollMargin = new Size(0, 95);
                mainPanel.Controls.Add(questionlistPanel);
                //Makes room for the next college
            }
        }
예제 #16
0
        // AnswerQuestionView Constructor
        public AnswerQuestionView(BaseController baseController, string code)
        {
            bc = baseController;
            stats = bc.stc.getAnswersPerStudent(code);
            x = bc.sqlc.get(stats[0].questionlist);

            // Makes the main Panel
            mainPanel = new Panel();
            mainPanel.BackColor = Color.Transparent;
            mainPanel.Height = Screen.PrimaryScreen.Bounds.Height;
            mainPanel.Width = Screen.PrimaryScreen.Bounds.Width - 225;
            mainPanel.Location = new Point(225, 0);

            //header Label with all styling.
            header = new Label();
            header.Font = new Font("Segoe print", 26F);
            header.Location = new Point(100, 25);
            header.Name = "Statistics";
            header.Text = "Statistieken van: " + x.title;
            header.Size = new Size(1000, 60);
            mainPanel.Controls.Add(header);

            //generalDataHeader Label with all styling.
            generalDataHeader = new Label();
            generalDataHeader.Font = new Font("Segoe print", 26F);
            generalDataHeader.Location = new Point(1220, 25);
            generalDataHeader.Name = "generalData";
            generalDataHeader.Text = "Algeme statistieken";
            generalDataHeader.Size = new Size(1000, 60);
            mainPanel.Controls.Add(generalDataHeader);

            //generalDataText Label with all styling.
            generalDataText = new Label();
            generalDataText.Font = new Font("Segoe print", 13F);
            generalDataText.Location = new Point(1205, 85);
            generalDataText.Name = "generalData";
            generalDataText.Text = "";
            generalDataText.Size = new Size(375, 62);

            //Back button.
            Stop = new Button();
            Stop.Name = "Stop";
            Stop.Text = char.ConvertFromUtf32(8592) + "Terug naar overzicht";
            Stop.Size = new Size(300, 50);
            Stop.Location = new Point(1920 - 545, Screen.PrimaryScreen.Bounds.Height - 130);
            Stop.Font = new Font("Segoe Print", 17f);
            Stop.ForeColor = Color.White;
            Stop.FlatStyle = FlatStyle.Flat;
            Stop.FlatAppearance.BorderColor = Color.White;
            Stop.FlatAppearance.BorderSize = 2;
            Stop.MouseClick += new MouseEventHandler(Stop_Click);
            Stop.BackgroundImage = Properties.Resources.grey_wash_wall_tablebanner;
            mainPanel.Controls.Add(Stop);

            // Makes new Labels and the Table Panel
            Table = new TableLayoutPanel();
            CorrectOrIncorrect = new Label();
            Question = new Label();
            StudentAnswer = new Label();
            CorrectAnswer = new Label();

            // Table Layout
            Table.BackgroundImageLayout = ImageLayout.None;
            Table.CellBorderStyle = TableLayoutPanelCellBorderStyle.Single;
            Table.ColumnCount = 4;
            Table.ColumnStyles.Add(new ColumnStyle(SizeType.Absolute, 375F));
            Table.ColumnStyles.Add(new ColumnStyle(SizeType.Absolute, 250F));
            Table.ColumnStyles.Add(new ColumnStyle(SizeType.Absolute, 250F));
            Table.ColumnStyles.Add(new ColumnStyle(SizeType.Absolute, 120F));
            Table.Controls.Add(Question, 0, 0);
            Table.Controls.Add(CorrectAnswer, 1, 0);
            Table.Controls.Add(CorrectOrIncorrect, 3, 0);
            Table.Controls.Add(StudentAnswer, 2, 0);
            Table.Location = new Point(100, 100);
            Table.Name = "Table";
            Table.RowCount = 4;
            Table.RowStyles.Add(new RowStyle(SizeType.Absolute, 27F));
            Table.Size = new Size(1000, y);
            Table.TabIndex = 1;

            // Properties for Question
            Question.Font = new Font("Segoe print", 12F);
            Question.ForeColor = Color.White;
            Question.Name = "Question";
            Question.AutoSize = false;
            Question.Size = new Size(375, 27);
            Question.TabIndex = 0;
            Question.Text = "Vraag";

            // Properties for CorrectAnswer
            CorrectAnswer.Font = new Font("Segoe print", 12F);
            CorrectAnswer.ForeColor = Color.White;
            CorrectAnswer.Name = "OpenQuestionList";
            CorrectAnswer.Size = new Size(250, 27);
            CorrectAnswer.TabIndex = 1;
            CorrectAnswer.Text = "Juiste antwoord";

            // Properties for StudentAnswer
            StudentAnswer.Font = new Font("Segoe print", 12F);
            StudentAnswer.ForeColor = Color.White;
            StudentAnswer.Name = "StudentAnswer";
            StudentAnswer.Size = new Size(250, 27);
            StudentAnswer.TabIndex = 2;
            StudentAnswer.Text = "Jouw antwoord";

            // Properties for CorrectOrIncorrect
            CorrectOrIncorrect.Font = new Font("Segoe print", 12F);
            CorrectOrIncorrect.ForeColor = Color.White;
            CorrectOrIncorrect.Name = "CorrectOrIncorrect";
            CorrectOrIncorrect.Size = new Size(125, 27);
            CorrectOrIncorrect.TabIndex = 3;
            CorrectOrIncorrect.Text = "Goed/Fout";

            Table.ResumeLayout(true);
            Table.BackgroundImage = Properties.Resources.grey_wash_wall_tablebanner;
            mainPanel.Controls.Add(Table);

            FillTable();
        }
        public QuestionlistsStatisticsView(BaseController baseController, int id)
        {
            bc = baseController;
            q = bc.stc.getQuestionlists(1);
            x = bc.sqlc.get(id);
            QuestionlistsStatisticsView_Panel = new Panel();
            QuestionlistsStatisticsView_Panel.BackColor = Color.Transparent;
            QuestionlistsStatisticsView_Panel.Height = Screen.PrimaryScreen.Bounds.Height;
            QuestionlistsStatisticsView_Panel.Width = Screen.PrimaryScreen.Bounds.Width - 225;
            QuestionlistsStatisticsView_Panel.Location = new Point(225, 0);

            // Makes new Labels and the Table Panel
            Table = new TableLayoutPanel();
            Question = new Label();
            QuestionExpanded = new Label();
            CorrectAnswer = new Label();
            MultiPerChoice = new Label();
            Score = new Label();
            Type = new Label();

            //Header Label with all styling.
            Header = new Label();
            Header.Font = new Font("Segoe print", 20F);
            Header.Location = new Point(100, 25);
            Header.Name = "Statistics";
            Header.Text = "Statistieken van: " + x.title;
            Header.Size = new Size(1000, 60);
            QuestionlistsStatisticsView_Panel.Controls.Add(Header);

            //Back to overview button.
            Stop = new Button();
            Stop.Name = "Stop";
            Stop.Text = char.ConvertFromUtf32(8592) + "Terug naar overzicht";
            Stop.Size = new Size(300, 50);
            Stop.Location = new Point(Screen.PrimaryScreen.Bounds.Width - 535,Screen.PrimaryScreen.Bounds.Height - 125);
            Stop.Font = new Font("Segoe Print", 17f);
            Stop.ForeColor = Color.White;
            Stop.FlatStyle = FlatStyle.Flat;
            Stop.FlatAppearance.BorderColor = Color.White;
            Stop.FlatAppearance.BorderSize = 2;
            Stop.MouseClick += new MouseEventHandler(Stop_Click);
            Stop.BackgroundImage = Properties.Resources.grey_wash_wall_tablebanner;
            QuestionlistsStatisticsView_Panel.Controls.Add(Stop);

            //More details button.
            MoreDetails = new Button();
            MoreDetails.Name = "More Details";
            MoreDetails.Text = "Meer Details";
            MoreDetails.Size = new Size(300, 50);
            MoreDetails.Location = new Point(650, Screen.PrimaryScreen.Bounds.Height - 125);
            MoreDetails.Font = new Font("Segoe Print", 17f);
            MoreDetails.ForeColor = Color.White;
            MoreDetails.FlatStyle = FlatStyle.Flat;
            MoreDetails.FlatAppearance.BorderColor = Color.White;
            MoreDetails.FlatAppearance.BorderSize = 2;
            MoreDetails.MouseClick += new MouseEventHandler(MoreDetails_Click);
            MoreDetails.BackgroundImage = Properties.Resources.grey_wash_wall_tablebanner;
            QuestionlistsStatisticsView_Panel.Controls.Add(MoreDetails);

            // Table Layout
            Table.BackgroundImageLayout = ImageLayout.None;
            Table.CellBorderStyle = TableLayoutPanelCellBorderStyle.Single;
            Table.ColumnCount = 5;
            Table.ColumnStyles.Add(new ColumnStyle(SizeType.Absolute, 50F));
            Table.ColumnStyles.Add(new ColumnStyle(SizeType.Absolute, 400F));
            Table.ColumnStyles.Add(new ColumnStyle(SizeType.Absolute, 350F));
            Table.ColumnStyles.Add(new ColumnStyle(SizeType.Absolute, 100F));
            Table.ColumnStyles.Add(new ColumnStyle(SizeType.Absolute, 110F));
            Table.Controls.Add(Question, 0, 0);
            Table.Controls.Add(QuestionExpanded, 1, 0);
            Table.Controls.Add(CorrectAnswer, 2, 0);
            Table.Controls.Add(MultiPerChoice, 3, 0);
            Table.Controls.Add(Score, 4, 0);
            Table.Location = new Point(100, 100);
            Table.Name = "Table";
            Table.RowCount = 5;
            Table.RowStyles.Add(new RowStyle(SizeType.Absolute, 27F));
            Table.Size = new Size(1000, y);
            Table.TabIndex = 1;

            // Properties for Question
            Question.Font = new Font("Segoe print", 12F);
            Question.ForeColor = Color.White;
            Question.Name = "Question";
            Question.AutoSize = false;
            Question.Size = new Size(50, 27);
            Question.TabIndex = 0;
            Question.Text = "Nr";

            // Properties for vraag
            QuestionExpanded.Font = new Font("Segoe print", 12F);
            QuestionExpanded.ForeColor = Color.White;
            QuestionExpanded.Name = "OpenQuestionList";
            QuestionExpanded.Size = new Size(400, 27);
            QuestionExpanded.TabIndex = 1;
            QuestionExpanded.Text = "Vraag";

            // Properties for correct antwoord
            CorrectAnswer.Font = new Font("Segoe print", 12F);
            CorrectAnswer.ForeColor = Color.White;
            CorrectAnswer.Name = "StudentAnswer";
            CorrectAnswer.Size = new Size(350, 27);
            CorrectAnswer.TabIndex = 3;
            CorrectAnswer.Text = "Correct Antwoord";

            // Properties for Multiperchoice
            MultiPerChoice.Font = new Font("Segoe print", 12F);
            MultiPerChoice.ForeColor = Color.White;
            MultiPerChoice.Name = "MultiPerChoice";
            MultiPerChoice.Size = new Size(100, 27);
            MultiPerChoice.TabIndex = 4;
            MultiPerChoice.Text = "A   B   C   D";

            // Properties for Multiperchoice
            Score.Font = new Font("Segoe print", 12F);
            Score.ForeColor = Color.White;
            Score.Name = "Score";
            Score.Size = new Size(110, 27);
            Score.TabIndex = 5;
            Score.Text = "Goed/Fout";

            Table.ResumeLayout(true);
            Table.BackgroundImage = Properties.Resources.grey_wash_wall_tablebanner;
            QuestionlistsStatisticsView_Panel.Controls.Add(Table);

            FillTable();
        }
예제 #18
0
        public EditQuestionlistView(BaseController baseControlle, int index)
        {
            this.index = index;
            index2 = index;

            bc = baseControlle;
            EditQuestionlistView_Panel = new Panel();
            EditQuestionlistView_Panel.BackColor = Color.Transparent;
            EditQuestionlistView_Panel.Height = Screen.PrimaryScreen.Bounds.Height;
            EditQuestionlistView_Panel.Width = Screen.PrimaryScreen.Bounds.Width - 225;
            EditQuestionlistView_Panel.Location = new Point(225, 0);

            Section = new Label();
            Question = new Label();
            Type = new ComboBox();
            Edit = new Label();
            Delete = new Label();
            Table = new TableLayoutPanel();

            questionlist = new Questionlist();

            int Height = (Question.Text.Length + 100);

            // Properties for table
            Table.BackgroundImageLayout = ImageLayout.None;
            Table.CellBorderStyle = TableLayoutPanelCellBorderStyle.Single;
            Table.ColumnCount = 3;
            Table.ColumnStyles.Add(new ColumnStyle(SizeType.Absolute, 800F));
            Table.ColumnStyles.Add(new ColumnStyle(SizeType.Absolute, 100F));
            Table.ColumnStyles.Add(new ColumnStyle(SizeType.Absolute, 100F));
            Table.Controls.Add(Question, 0, 0);
            Table.Controls.Add(Edit, 1, 0);
            Table.Controls.Add(Delete, 2, 0);
            Table.Location = new Point(100, 250);
            Table.Name = "Table";
            Table.RowCount = 2;
            Table.RowStyles.Add(new RowStyle(SizeType.Absolute, 27F));
            Table.Size = new Size(1000, y);
            Table.TabIndex = 1;

            // Properties for Section
            Section.Font = new Font("Segoe print", 26F);
            Section.Name = "Section";
            Section.Size = new Size(810, 60);
            Section.Location = new Point(90, 20);
            Section.Text = bc.qlc.get(index).title;
            Section.MouseClick += new MouseEventHandler(EditNameByLabel);

            //Select_College.SelectedValue = bc.qlc.get(index).college;
            // Type Questionlist
            Label TypeLabel = new Label();
            TypeLabel.Name = "Type";
            TypeLabel.Text = "Type";
            TypeLabel.Location = new Point(100, 140);
            TypeLabel.Size = new Size(100, 50);
            TypeLabel.Font = new Font("Segoe Print", 13f);

            // Type Select
            Type = new ComboBox();
            Type.Name = "Selecteer_Status";
            Type.Items.Add("Synchroon");
            Type.Items.Add("Niet Synchroon");
            Type.Items.Add("Timer");
            Type.SelectedIndex = bc.cc.get(bc.qlc.get(index).type).id;
            Type.SelectedIndexChanged += new EventHandler(Add_Timer);
            Type.DropDownStyle = ComboBoxStyle.DropDownList;
            Type.Location = new Point(200, 150);
            Type.Size = new Size(150, 100);

            // Label timer
            Timer = new Label();
            Timer.Name = "Timer";
            Timer.Text = "Timer";
            Timer.Location = new Point(100, 190);
            Timer.Size = new Size(100, 50);
            Timer.Font = new Font("Segoe Print", 13f);
            Timer.Visible = false;

            //dropdown timer
            Timer_Input = new NumericUpDown();
            Timer_Input.Name = "College";
            Timer_Input.Text = "0";
            Timer_Input.Location = new Point(200, 200);
            Timer_Input.Size = new Size(150, 10);
            Timer_Input.BorderStyle = BorderStyle.Fixed3D;
            Timer_Input.Visible = false;

            // TextBox for changing name
            TextBox1 = new TextBox();
            TextBox1.Font = new Font("Segoe print", 26F);
            TextBox1.Name = "TextBox";
            TextBox1.Size = new Size(600, 100);
            TextBox1.Location = new Point(100, 20);
            TextBox1.Text = bc.qlc.get(index).title;
            TextBox1.Visible = false;

            // Button for "EditName"
            EditName = new Button();
            EditName.Font = new Font("Segoe print", 10F);
            EditName.Name = "Bewerk Naam Vragenlijst";
            EditName.Text = "Bewerk vragenlijst naam";
            EditName.Size = new Size(200, 50);
            EditName.Margin = new Padding(0);
            EditName.Location = new Point(900, 30);
            EditName.ForeColor = Color.White;
            EditName.FlatStyle = FlatStyle.Flat;
            EditName.FlatAppearance.BorderColor = Color.White;
            EditName.FlatAppearance.BorderSize = 2;
            EditName.BackgroundImage = Properties.Resources.grey_wash_wall_tablebanner;

            // Properties for save button
            Save = new Button();
            Save.Font = new Font("Segoe print", 10F);
            Save.Name = "Save";
            Save.Text = "Opslaan";
            Save.Size = new Size(100, 50);
            Save.Margin = new Padding(0);
            Save.Location = new Point(785, 30);
            Save.ForeColor = Color.White;
            Save.FlatStyle = FlatStyle.Flat;
            Save.FlatAppearance.BorderColor = Color.White;
            Save.FlatAppearance.BorderSize = 2;
            Save.BackgroundImage = Properties.Resources.grey_wash_wall_tablebanner;
            Save.Visible = false;

            // Properties for Question
            Question.Font = new Font("Segoe print", 12F);
            Question.Name = "Question";
            Question.Size = new Size(164, 30);
            Question.ForeColor = Color.White;
            Question.TabIndex = 0;
            Question.Text = "Vraag";

            // Properties for Edit
            Edit.Font = new Font("Segoe print", 12F);
            Edit.Name = "Edit";
            Edit.Size = new Size(126, 30);
            Edit.ForeColor = Color.White;
            Edit.TabIndex = 1;
            Edit.Text = "Bewerk";

            // Properties for Delete
            Delete.Font = new Font("Segoe print", 12F);
            Delete.Name = "Delete";
            Delete.Size = new Size(130, 30);
            Delete.ForeColor = Color.White;
            Delete.TabIndex = 2;
            Delete.Text = "Verwijder";

            // Properties for Stop button
            Stop.Name = "Stop";
            Stop.Text = char.ConvertFromUtf32(8592);
            Stop.Location = new Point(15, 20);
            Stop.Size = new Size(75, 50);
            Stop.Font = new Font("Segoe Print", 17f);
            Stop.ForeColor = Color.White;
            Stop.FlatStyle = FlatStyle.Flat;
            Stop.FlatAppearance.BorderColor = Color.White;
            Stop.FlatAppearance.BorderSize = 2;
            Stop.MouseClick += new MouseEventHandler(Stop_Click);
            Stop.BackgroundImage = Properties.Resources.grey_wash_wall_tablebanner;

            //add everything to panel
            Table.BackgroundImage = Properties.Resources.grey_wash_wall_tablebanner;
            Table.ResumeLayout(true);
            EditQuestionlistView_Panel.Controls.Add(Table);
            EditQuestionlistView_Panel.Controls.Add(Section);
            EditQuestionlistView_Panel.Controls.Add(TextBox1);
            EditQuestionlistView_Panel.Controls.Add(Save);
            EditQuestionlistView_Panel.Controls.Add(TypeLabel);
            EditQuestionlistView_Panel.Controls.Add(Type);
            EditQuestionlistView_Panel.Controls.Add(Timer);
            EditQuestionlistView_Panel.Controls.Add(Timer_Input);
            EditQuestionlistView_Panel.Controls.Add(EditName);
            EditQuestionlistView_Panel.Controls.Add(Stop);

            EditQuestionlistView_Panel.AutoScroll = true;
            EditQuestionlistView_Panel.AutoScrollMargin = new Size(0, 65);
        }
예제 #19
0
 //StatisticsController constructor
 public StatisticsController(BaseController baseController)
 {
     bc = baseController;
 }
예제 #20
0
        public EditCollege(BaseController baseController, int id)
        {
            bc = baseController;
            CollegeID = id;
            d = bc.cc.getColleges();
            ql = bc.qlc.getAll();
            College c = bc.cc.get(CollegeID);
            tempQL = new List<Questionlist>();
            // Initialize Panel
            mainPanel = new Panel();
            mainPanel.Name = "EditCollege";
            mainPanel.BackColor = Color.Transparent;
            mainPanel.Height = Screen.PrimaryScreen.Bounds.Height;
            mainPanel.Width = Screen.PrimaryScreen.Bounds.Width - 225;
            mainPanel.Location = new Point(225, 0);
            mainPanel.BorderStyle = BorderStyle.Fixed3D;

            // Make Title
            Title = new Label();
            Title.Name = "Title";
            Title.Text = "College bewerken";
            Title.Location = new Point(200, 100);
            Title.Size = new Size(500, 50);
            Title.Font = new Font("Segoe Print", 20f);
            mainPanel.Controls.Add(Title);

            // Make Name Label
            Name = new Label();
            Name.Name = "Name";
            Name.Text = "Naam";
            Name.Location = new Point(200, 200);
            Name.Size = new Size(100, 50);
            Name.Font = new Font("Segoe Print", 13f);
            mainPanel.Controls.Add(Name);

            // Make Name Input
            Input_Name = new TextBox();
            Input_Name.Name = "Name_Input";
            Input_Name.Text = c.title;
            Input_Name.Location = new Point(325, 204);
            Input_Name.Size = new Size(150, 10);
            Input_Name.BorderStyle = BorderStyle.Fixed3D;
            mainPanel.Controls.Add(Input_Name);

            // Make Table
            QuestionListShow = new CustomTableLayoutPanel();
            QuestionListShow.Name = "QuestionListShow";
            QuestionListShow.Location = new Point(200, 300);
            QuestionListShow.Size = new Size(750, 250);
            QuestionListShow.MaximumSize = new Size(750, 250);
            QuestionListShow.AutoScroll = true;
            QuestionListShow.VerticalScroll.Enabled = true;
            QuestionListShow.VerticalScroll.Visible = true;
            QuestionListShow.BackgroundImageLayout = ImageLayout.None;
            QuestionListShow.CellBorderStyle = TableLayoutPanelCellBorderStyle.None;
            QuestionListShow.ColumnCount = 2;
            QuestionListShow.ColumnStyles.Add(new ColumnStyle(SizeType.Percent, 97));
            QuestionListShow.ColumnStyles.Add(new ColumnStyle(SizeType.Percent, 3));
            QuestionListShow.RowStyles.Add(new RowStyle(SizeType.Absolute, 27f));
            QuestionListShow.BackColor = Color.White;
            QuestionListShow.BackgroundImage = Properties.Resources.grey_wash_wall_tablebanner;
            QuestionListShow.Controls.Add(new Label() { Text = "VragenLijsten", Font = new Font("Segoe Print", 12f), AutoSize = true, ForeColor = Color.White, BackColor = Color.Transparent }, 1, -1);
            QuestionListShow.Controls.Add(new Label() { Text = "", Font = new Font("Segoe Print", 12f), AutoSize = true }, 2, -1);
            QuestionListShow.ResumeLayout(true);

            List<Questionlist> collegeQuestionlists = bc.qlc.getQuestionlistsByCollege(CollegeID);
            foreach (Questionlist q in ql)
            {
                QuestionListShow.RowStyles.Add(new RowStyle(SizeType.Absolute, 27F));
                QuestionListShow.Controls.Add(new Label() { Text = q.title, Font = new Font("Segoe Print", 12f), Size = new Size(970, 30), Margin = new Padding(-1), BackColor = Color.White, Name = SelectCounter.ToString() }, 1, QuestionListShow.RowCount - 1);
                CheckBox Select = new CheckBox();
                Select.Size = new Size(30, 30);
                Select.Margin = new Padding(-1);
                Select.Name = "Select#" + SelectCounter.ToString();
                foreach(Questionlist ql in collegeQuestionlists)
                {
                    if(ql.id == q.id)
                    {
                        Select.Checked = true;
                        tempQL.Add(q);
                    }
                }
                cb.Add(Select);
                QuestionListShow.Controls.Add(Select, 2, QuestionListShow.RowCount - 1);
                Select.CheckStateChanged += new EventHandler(addToDatabase);
                SelectCounter++;
            }
            QuestionListShow.Controls.Add(new Label() { Text = "", Font = new Font("Segoe Print", 12f) }, 1, QuestionListShow.RowCount - 1);

            mainPanel.Controls.Add(QuestionListShow);

            // Make Button
            Save = new Button();
            Save.Name = "Save";
            Save.Text = "Opslaan";
            Save.Location = new Point(550, 700);
            Save.Size = new Size(154, 50);
            Save.Font = new Font("Segoe Print", 12f);
            Save.FlatStyle = FlatStyle.Flat;
            Save.BackgroundImage = Properties.Resources.grey_wash_wall_tablebanner;
            Save.FlatAppearance.BorderColor = Color.White;
            Save.ForeColor = Color.White;
            Save.FlatAppearance.BorderSize = 2;
            Save.MouseClick += new MouseEventHandler(SaveQuestionList);
            mainPanel.Controls.Add(Save);
        }