Beispiel #1
0
        //Insert information entered in the pnlQuestionDetails into the question array when it is a questionObjectComplex
        private void applyChangesToQuesitonComplex(questionObjectComplex question)
        {
            question = new questionObjectComplex();
            question.questionText   = pnlQuestionDetails.Controls.Find("questionEdit", true)[0].Controls.Find("questionText", true)[0].Text;
            question.questionType   = questionEdit.GetChildAtPoint(new Point(68, 29)).Text;
            question.questionNumber = pnlQuestionDetails.Controls.Find("questionEdit", true)[0].Controls.Find("questionNum", true)[0].Text;
            question.weight         = int.Parse(pnlQuestionDetails.Controls.Find("questionEdit", true)[0].Controls.Find("weight", true)[0].Text);

            question.questionItems = new List <itemContainer>();
            int panelNumber = 0;

            foreach (Panel c in pnlQuestionDetails.Controls)
            {
                if (c.Name != "questionEdit")
                {
                    //Go through container panels and create new container based off the panel name (is number)
                    itemContainer tempContainer = new itemContainer();
                    tempContainer.itemContainerLabel = c.Controls[1].Text;
                    tempContainer.items = new List <questionItemBase>();
                    question.questionItems.Add(tempContainer);
                    //Go through each item panel, then add item to corresponding container object.
                    for (int t = 0; t < (c.Controls.Count - 4); t++)
                    {
                        var item = c.Controls[t + 4];
                        questionItemBase tempItem = new questionItemBase();
                        tempItem.itemText = item.Controls[1].Text;
                        question.questionItems[panelNumber - 1].items.Add(tempItem);
                    }
                }
                panelNumber++;
            }
            game[(int)lastSelected.Tag] = question;
        }
        //Insert information entered in the pnlQuestionDetails into the question array when it is a questionObjectComplex
        private void applyChangesToQuesitonComplex(questionObjectComplex question)
        {
            question = new questionObjectComplex();
            question.questionText = pnlQuestionDetails.Controls.Find("questionEdit", true)[0].Controls.Find("questionText", true)[0].Text;
            question.questionType = questionEdit.GetChildAtPoint(new Point(68, 29)).Text;
            question.questionNumber = pnlQuestionDetails.Controls.Find("questionEdit", true)[0].Controls.Find("questionNum", true)[0].Text;
            question.weight = int.Parse(pnlQuestionDetails.Controls.Find("questionEdit", true)[0].Controls.Find("weight", true)[0].Text);

            question.questionItems = new List<itemContainer>();
            int panelNumber = 0;
            foreach (Panel c in pnlQuestionDetails.Controls)
            {
                if (c.Name != "questionEdit")
                {
                    //Go through container panels and create new container based off the panel name (is number)
                    itemContainer tempContainer = new itemContainer();
                    tempContainer.itemContainerLabel = c.Controls[1].Text;
                    tempContainer.items = new List<questionItemBase>();
                    question.questionItems.Add(tempContainer);
                    //Go through each item panel, then add item to corresponding container object.
                    for (int t = 0; t < (c.Controls.Count - 4); t++)
                    {
                        var item = c.Controls[t + 4];
                        questionItemBase tempItem = new questionItemBase();
                        tempItem.itemText = item.Controls[1].Text;
                        question.questionItems[panelNumber - 1].items.Add(tempItem);
                    }
                }
                panelNumber++;
            }
            game[(int)lastSelected.Tag] = question;
        }
Beispiel #3
0
        //DnD item
        void addItem_Click(object sender, EventArgs e)
        {
            //Creates a panel for the user to enter items into a DND container. WILL SPAWN IN THE SELECTED CONTAINER
            questionObjectComplex question = game[(int)lastSelected.Tag] as questionObjectComplex;

            Panel pnlItem = new Panel();

            pnlItem.Name      = itemCount.ToString();
            pnlItem.Size      = new Size(315, 36);
            pnlItem.BackColor = System.Drawing.Color.DarkGray;

            //User can enter the items text
            Label itemNum = new Label();

            itemNum.Location = new Point(4, 10);
            itemNum.Text     = "#" + (itemCount + 1).ToString();
            itemNum.Name     = "itemNum";
            itemNum.Size     = new Size(29, 13);
            TextBox itemTextBox = new TextBox();

            itemTextBox.Name      = "itemBaseText";
            itemTextBox.Location  = new Point(33, 7);
            itemTextBox.Size      = new Size(253, 20);
            itemTextBox.MaxLength = 500;

            //Configure deleteItem
            Button deleteItem = new Button();

            deleteItem.Name      = "deleteItem";
            deleteItem.Text      = "X";
            deleteItem.Location  = new Point(292, 7);
            deleteItem.Size      = new Size(20, 20);
            deleteItem.FlatStyle = FlatStyle.Flat;
            deleteItem.FlatAppearance.BorderSize  = 0;
            deleteItem.FlatAppearance.BorderColor = System.Drawing.Color.Red;
            deleteItem.BackColor = System.Drawing.Color.Black;
            deleteItem.ForeColor = System.Drawing.Color.White;
            deleteItem.Click    += deleteABaseItem;
            itemCount++;

            if (question != null)
            {
                int box = int.Parse(((Button)sender).Parent.Name);
                //If the list of items doesn't exist, create it
                if (question.questionItems[box - 1].items == null)
                {
                    question.questionItems[box - 1].items = new List <questionItemBase>();
                }
                question.questionItems[box - 1].items.Add(new questionItemBase());
                game[(int)lastSelected.Tag] = question;
            }

            var panel = ((Button)sender).Parent;

            pnlItem.Controls.Add(itemNum);
            pnlItem.Controls.Add(itemTextBox);
            pnlItem.Controls.Add(deleteItem);
            panel.Controls.Add(pnlItem);
        }
Beispiel #4
0
        private void applyQuestionSettings()
        {
            try
            {
                var type = questionEdit.GetChildAtPoint(new Point(68, 29));
                var text = questionEdit.GetChildAtPoint(new Point(68, 6)).Text;

                //If user has not entered a question, throw error.
                if (text == "" || text == null)
                {
                    errorHandle("Please enter a question before continuing.");
                }
                else
                {
                    //If user has not selected a type, throw error.
                    if (type.Text == "" || type.Text == null)
                    {
                        errorHandle("Please select a question type before continuing.");
                    }
                    //Remove the apply button, disable changing the question type and store basic info into the array
                    else
                    {
                        var apply = questionEdit.GetChildAtPoint(new Point(245, 79));
                        questionEdit.Controls.Remove(apply);
                        type.Enabled = false;

                        var weight = questionEdit.GetChildAtPoint(new Point(68, 53)).Text;

                        if (type.Text == "Multiple Choice" || type.Text == "True or False")
                        {
                            questionObjectSimple question = new questionObjectSimple();
                            question.questionText   = text;
                            question.questionType   = type.Text;
                            question.questionNumber = lastSelected.Controls.Find("QuestionNumber", true)[0].Text;
                            int.TryParse(weight, out question.weight);
                            game[(int)lastSelected.Tag - 1] = question;
                        }
                        else if (type.Text == "Drag & Drop")
                        {
                            questionObjectComplex question = new questionObjectComplex();
                            question.questionText   = text;
                            question.questionType   = type.Text;
                            question.questionNumber = lastSelected.Controls.Find("QuestionNumber", true)[0].Text;
                            int.TryParse(weight, out question.weight);
                            game[(int)lastSelected.Tag - 1] = question;
                        }
                        lastSelected.Controls.Find("Question", true)[0].Text     = text;
                        lastSelected.Controls.Find("QuestionType", true)[0].Text = type.Text;
                        itemCount = 0;
                        pnlQuestionOptions.Controls.Find("btnAddOption", true)[0].Enabled = true;
                    }
                }
            }
            catch (Exception)
            {
                errorHandle("Could not configure the question\nPlease try again.");
            }
        }
Beispiel #5
0
        //Insert information entered in the pnlQuestionDetails into the question array when it is a questionObjectComplex
        private void applyChangesToQuesitonComplex(questionObjectComplex question)
        {
            question.questionText   = pnlQuestionDetails.Controls.Find("questionEdit", true)[0].Controls.Find("questionText", true)[0].Text;
            question.questionNumber = pnlQuestionDetails.Controls.Find("questionEdit", true)[0].Controls.Find("questionNum", true)[0].Text;
            question.weight         = int.Parse(pnlQuestionDetails.Controls.Find("questionEdit", true)[0].Controls.Find("weight", true)[0].Text);

            //Flag for if an error occurs
            bool emptyBox = false;

            foreach (Panel c in pnlQuestionDetails.Controls)
            {
                if (c.Name != "questionEdit")
                {
                    try
                    {
                        question.questionItems[int.Parse(c.Name) - 1].itemContainerLabel = c.Controls[1].Text;
                        //The number of items within a item box
                        int tempItemCount = c.Controls.Count - 4;
                        for (int i = 0; i < tempItemCount; i++)
                        {
                            var test = c.Controls[i + 4];
                            question.questionItems[int.Parse(c.Name) - 1].items[i].itemText = test.Controls[1].Text;
                        }
                    }
                    catch (Exception)
                    {
                        emptyBox = true;
                    }
                }
            }
            if (emptyBox == true)
            {
                errorHandle("One or More of the Drop boxes does not contain any items.\nPlease remove the box or add at least one item.");
            }
            game[(int)lastSelected.Tag - 1] = question;
        }
Beispiel #6
0
        //Apply the main settings to question before adding to the question
        private void applyQuestionSettings()
        {
            try
            {
                var type = questionEdit.GetChildAtPoint(new Point(68, 29));
                var text = questionEdit.GetChildAtPoint(new Point(68, 6)).Text;

                //If user has not entered a question, throw error.
                if (text == "" || text == null)
                {
                    errorHandle("Please enter a question before continuing.");
                    return;
                }
                else
                {
                    //If user has not selected a type, throw error.
                    if (type.Text == "" || type.Text == null)
                    {
                        errorHandle("Please select a question type before continuing.");
                        return;
                    }
                    //Remove the apply button, disable changing the question type and store basic info into the array
                    else
                    {
                        var apply = questionEdit.GetChildAtPoint(new Point(245, 79));
                        var weight = questionEdit.GetChildAtPoint(new Point(68, 53)).Text;

                        if (type.Text == "Multiple Choice" || type.Text == "True or False")
                        {
                            questionObjectSimple question = new questionObjectSimple();
                            question.questionText = text;
                            question.questionType = type.Text;
                            question.questionNumber = lastSelected.Controls.Find("QuestionNumber", true)[0].Text;
                            int.TryParse(weight, out question.weight);
                            game[(int)lastSelected.Tag] = question;
                        }
                        else if (type.Text == "Drag & Drop")
                        {
                            questionObjectComplex question = new questionObjectComplex();
                            question.questionText = text;
                            question.questionType = type.Text;
                            question.questionNumber = lastSelected.Controls.Find("QuestionNumber", true)[0].Text;
                            int.TryParse(weight, out question.weight);
                            game[(int)lastSelected.Tag] = question;
                        }
                        else
                        {
                        }
                        questionEdit.Controls.Remove(apply);
                        type.Enabled = false;
                        lastSelected.Controls.Find("Question", true)[0].Text = text;
                        lastSelected.Controls.Find("QuestionType", true)[0].Text = type.Text;
                        itemCount = 0;
                        pnlQuestionOptions.Controls.Find("btnAddOption", true)[0].Enabled = true;
                    }
                }
            }
            catch (Exception)
            {
                errorHandle("Could not configure the question\nPlease try again.");
            }
        }
        private void loadComplexQuestion()
        {
            questionObjectComplex question = game[(int)lastSelected.Tag];

            //Go through the game list, recreate the item boxes and their items in the ui for editting.
            for (int i = 0; i < question.questionItems.Count; i++)
            {
                itemContainerCount++;
                FlowLayoutPanel pnlItemContainer = new FlowLayoutPanel();
                pnlItemContainer.Name         = itemContainerCount.ToString();
                pnlItemContainer.Size         = new Size(320, 36);
                pnlItemContainer.AutoSize     = true;
                pnlItemContainer.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink;
                pnlItemContainer.BackColor    = System.Drawing.Color.DimGray;

                //User can enter the items text
                Label itemContainerNum = new Label();
                itemContainerNum.Location = new Point(4, 10);
                itemContainerNum.Text     = "#" + itemContainerCount.ToString();
                itemContainerNum.Name     = itemContainerCount.ToString();
                itemContainerNum.Size     = new Size(29, 13);
                TextBox itemContainerTextBox = new TextBox();
                itemContainerTextBox.Name      = "itemText";
                itemContainerTextBox.Text      = question.questionItems[i].itemContainerLabel;
                itemContainerTextBox.Location  = new Point(33, 7);
                itemContainerTextBox.Size      = new Size(177, 20);
                itemContainerTextBox.MaxLength = 100;

                //Configure addItemContainer
                Button addItem = new Button();
                addItem.Name      = "addItem";
                addItem.Text      = "Add Item";
                addItem.Location  = new Point(213, 7);
                addItem.Size      = new Size(60, 20);
                addItem.FlatStyle = FlatStyle.Flat;
                addItem.FlatAppearance.BorderSize  = 0;
                addItem.FlatAppearance.BorderColor = System.Drawing.Color.Red;
                addItem.BackColor = System.Drawing.Color.Black;
                addItem.ForeColor = System.Drawing.Color.White;
                addItem.Click    += addItem_Click;

                //Configure deleteItem
                Button deleteItemContainer = new Button();
                deleteItemContainer.Name      = "deleteItem";
                deleteItemContainer.Text      = "X";
                deleteItemContainer.Location  = new Point(292, 7);
                deleteItemContainer.Size      = new Size(20, 20);
                deleteItemContainer.FlatStyle = FlatStyle.Flat;
                deleteItemContainer.FlatAppearance.BorderSize  = 0;
                deleteItemContainer.FlatAppearance.BorderColor = System.Drawing.Color.Red;
                deleteItemContainer.BackColor = System.Drawing.Color.Black;
                deleteItemContainer.ForeColor = System.Drawing.Color.White;
                deleteItemContainer.Click    += deleteItemContainer_Click;

                pnlItemContainer.Controls.Add(itemContainerNum);
                pnlItemContainer.Controls.Add(itemContainerTextBox);
                pnlItemContainer.Controls.Add(addItem);
                pnlItemContainer.Controls.Add(deleteItemContainer);
                pnlQuestionDetails.Controls.Add(pnlItemContainer);

                for (int y = 0; y < question.questionItems[i].items.Count; y++)
                {
                    itemCount++;
                    Panel pnlItem = new Panel();
                    pnlItem.Name      = itemCount.ToString();
                    pnlItem.Size      = new Size(315, 36);
                    pnlItem.BackColor = System.Drawing.Color.DarkGray;

                    //User can enter the items text
                    Label itemNum = new Label();
                    itemNum.Location = new Point(4, 10);
                    itemNum.Text     = "#" + (itemCount).ToString();
                    itemNum.Name     = "itemNum";
                    itemNum.Size     = new Size(29, 13);
                    TextBox itemTextBox = new TextBox();
                    itemTextBox.Name      = "itemBaseText";
                    itemTextBox.Location  = new Point(33, 7);
                    itemTextBox.Size      = new Size(253, 20);
                    itemTextBox.MaxLength = 100;
                    itemTextBox.Text      = question.questionItems[i].items[y].itemText;

                    //Configure deleteItem
                    Button deleteItem = new Button();
                    deleteItem.Name      = "deleteItem";
                    deleteItem.Text      = "X";
                    deleteItem.Location  = new Point(292, 7);
                    deleteItem.Size      = new Size(20, 20);
                    deleteItem.FlatStyle = FlatStyle.Flat;
                    deleteItem.FlatAppearance.BorderSize  = 0;
                    deleteItem.FlatAppearance.BorderColor = System.Drawing.Color.Red;
                    deleteItem.BackColor = System.Drawing.Color.Black;
                    deleteItem.ForeColor = System.Drawing.Color.White;
                    deleteItem.Click    += deleteABaseItem;

                    pnlItem.Controls.Add(itemNum);
                    pnlItem.Controls.Add(itemTextBox);
                    pnlItem.Controls.Add(deleteItem);
                    pnlItemContainer.Controls.Add(pnlItem);
                }
            }
        }
Beispiel #8
0
        private void loadComplexQuestion(questionObjectComplex question)
        {
            //Go through the game list, recreate the item boxes and their items in the ui for editting.
            for (int i = 0; i < question.questionItems.Count; i++)
            {
                FlowLayoutPanel pnlItemContainer = new FlowLayoutPanel();
                pnlItemContainer.Name = itemContainerCount.ToString();
                pnlItemContainer.Size = new Size(320, 36);
                pnlItemContainer.AutoSize = true;
                pnlItemContainer.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink;
                pnlItemContainer.BackColor = System.Drawing.Color.DimGray;

                //User can enter the items text
                Label itemContainerNum = new Label();
                itemContainerNum.Location = new Point(4, 10);
                itemContainerNum.Text = "#" + itemContainerCount.ToString();
                itemContainerNum.Name = "Box" + itemContainerCount.ToString();
                itemContainerNum.Size = new Size(29, 13);
                TextBox itemContainerTextBox = new TextBox();
                itemContainerTextBox.Name = "itemText";
                itemContainerTextBox.Text = question.questionItems[i].itemContainerLabel;
                itemContainerTextBox.Location = new Point(33, 7);
                itemContainerTextBox.Size = new Size(177, 20);
                itemContainerTextBox.MaxLength = 100;

                //Configure addItemContainer
                Button addItem = new Button();
                addItem.Name = "addItem";
                addItem.Text = "Add Item";
                addItem.Location = new Point(213, 7);
                addItem.Size = new Size(60, 20);
                addItem.FlatStyle = FlatStyle.Flat;
                addItem.FlatAppearance.BorderSize = 0;
                addItem.FlatAppearance.BorderColor = System.Drawing.Color.Red;
                addItem.BackColor = System.Drawing.Color.Black;
                addItem.ForeColor = System.Drawing.Color.White;
                addItem.Click += addItem_Click;

                //Configure deleteItem
                Button deleteItemContainer = new Button();
                deleteItemContainer.Name = "deleteItem";
                deleteItemContainer.Text = "X";
                deleteItemContainer.Location = new Point(292, 7);
                deleteItemContainer.Size = new Size(20, 20);
                deleteItemContainer.FlatStyle = FlatStyle.Flat;
                deleteItemContainer.FlatAppearance.BorderSize = 0;
                deleteItemContainer.FlatAppearance.BorderColor = System.Drawing.Color.Red;
                deleteItemContainer.BackColor = System.Drawing.Color.Black;
                deleteItemContainer.ForeColor = System.Drawing.Color.White;
                deleteItemContainer.Click += deleteItemContainer_Click;

                pnlItemContainer.Controls.Add(itemContainerNum);
                pnlItemContainer.Controls.Add(itemContainerTextBox);
                pnlItemContainer.Controls.Add(addItem);
                pnlItemContainer.Controls.Add(deleteItemContainer);
                pnlQuestionDetails.Controls.Add(pnlItemContainer);
                itemContainerCount++;

                for (int y = 0; y < question.questionItems[i].items.Count; y++)
                {
                    Panel pnlItem = new Panel();
                    pnlItem.Name = itemCount.ToString();
                    pnlItem.Size = new Size(315, 36);
                    pnlItem.BackColor = System.Drawing.Color.DarkGray;

                    //User can enter the items text
                    Label itemNum = new Label();
                    itemNum.Location = new Point(4, 10);
                    itemNum.Text = "#" + (itemCount + 1).ToString();
                    itemNum.Name = "itemNum";
                    itemNum.Size = new Size(29, 13);
                    TextBox itemTextBox = new TextBox();
                    itemTextBox.Name = "itemBaseText";
                    itemTextBox.Location = new Point(33, 7);
                    itemTextBox.Size = new Size(253, 20);
                    itemTextBox.MaxLength = 100;
                    itemTextBox.Text = question.questionItems[i].items[y].itemText;

                    //Configure deleteItem
                    Button deleteItem = new Button();
                    deleteItem.Name = "deleteItem";
                    deleteItem.Text = "X";
                    deleteItem.Location = new Point(292, 7);
                    deleteItem.Size = new Size(20, 20);
                    deleteItem.FlatStyle = FlatStyle.Flat;
                    deleteItem.FlatAppearance.BorderSize = 0;
                    deleteItem.FlatAppearance.BorderColor = System.Drawing.Color.Red;
                    deleteItem.BackColor = System.Drawing.Color.Black;
                    deleteItem.ForeColor = System.Drawing.Color.White;
                    deleteItem.Click += deleteABaseItem;
                    itemCount++;

                    pnlItem.Controls.Add(itemNum);
                    pnlItem.Controls.Add(itemTextBox);
                    pnlItem.Controls.Add(deleteItem);
                    pnlItemContainer.Controls.Add(pnlItem);
                }
            }
        }
Beispiel #9
0
        //Insert information entered in the pnlQuestionDetails into the question array when it is a questionObjectComplex
        private void applyChangesToQuesitonComplex(questionObjectComplex question)
        {
            question.questionText = pnlQuestionDetails.Controls.Find("questionEdit", true)[0].Controls.Find("questionText", true)[0].Text;
            question.questionNumber = pnlQuestionDetails.Controls.Find("questionEdit", true)[0].Controls.Find("questionNum", true)[0].Text;
            question.weight = int.Parse(pnlQuestionDetails.Controls.Find("questionEdit", true)[0].Controls.Find("weight", true)[0].Text);

            //Flag for if an error occurs
            bool emptyBox = false;
            foreach (Panel c in pnlQuestionDetails.Controls)
            {
                if (c.Name != "questionEdit")
                {
                    try
                    {
                            question.questionItems[int.Parse(c.Name) - 1].itemContainerLabel = c.Controls[1].Text;
                            //The number of items within a item box
                            int tempItemCount = c.Controls.Count - 4;
                            for (int i = 0; i < tempItemCount; i++)
                            {
                                var test = c.Controls[i + 4];
                                question.questionItems[int.Parse(c.Name) - 1].items[i].itemText = test.Controls[1].Text;
                            }
                    }
                    catch (Exception)
                    {
                        emptyBox = true;
                    }
                }
            }
            if (emptyBox == true)
            {
                errorHandle("One or More of the Drop boxes does not contain any items.\nPlease remove the box or add at least one item.");
            }
            game[(int)lastSelected.Tag - 1] = question;
        }
Beispiel #10
0
        //DnD box
        private void newItemComplex()
        {
            questionObjectComplex question = game[(int)lastSelected.Tag - 1] as questionObjectComplex;

            if (question != null)
            {
                if (question.questionItems == null)
                {
                    question.questionItems = new List <itemContainer>();
                }
                question.questionItems.Add(new itemContainer());
                itemContainerCount++;
            }
            FlowLayoutPanel pnlItemContainer = new FlowLayoutPanel();

            pnlItemContainer.Name         = itemContainerCount.ToString();
            pnlItemContainer.Size         = new Size(320, 36);
            pnlItemContainer.AutoSize     = true;
            pnlItemContainer.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink;
            pnlItemContainer.BackColor    = System.Drawing.Color.DimGray;

            //User can enter the items text
            Label itemContainerNum = new Label();

            itemContainerNum.Location = new Point(4, 10);
            itemContainerNum.Text     = "#" + itemContainerCount.ToString();
            itemContainerNum.Name     = "Box" + itemContainerCount.ToString();
            itemContainerNum.Size     = new Size(29, 13);
            TextBox itemContainerTextBox = new TextBox();

            itemContainerTextBox.Name      = "itemText";
            itemContainerTextBox.Location  = new Point(33, 7);
            itemContainerTextBox.Size      = new Size(177, 20);
            itemContainerTextBox.MaxLength = 100;

            //Configure addItemContainer
            Button addItem = new Button();

            addItem.Name      = "addItem";
            addItem.Text      = "Add Item";
            addItem.Location  = new Point(213, 7);
            addItem.Size      = new Size(60, 20);
            addItem.FlatStyle = FlatStyle.Flat;
            addItem.FlatAppearance.BorderSize  = 0;
            addItem.FlatAppearance.BorderColor = System.Drawing.Color.Red;
            addItem.BackColor = System.Drawing.Color.Black;
            addItem.ForeColor = System.Drawing.Color.White;
            addItem.Click    += addItem_Click;

            //Configure deleteItem
            Button deleteItemContainer = new Button();

            deleteItemContainer.Name      = "deleteItem";
            deleteItemContainer.Text      = "X";
            deleteItemContainer.Location  = new Point(292, 7);
            deleteItemContainer.Size      = new Size(20, 20);
            deleteItemContainer.FlatStyle = FlatStyle.Flat;
            deleteItemContainer.FlatAppearance.BorderSize  = 0;
            deleteItemContainer.FlatAppearance.BorderColor = System.Drawing.Color.Red;
            deleteItemContainer.BackColor = System.Drawing.Color.Black;
            deleteItemContainer.ForeColor = System.Drawing.Color.White;
            deleteItemContainer.Click    += deleteItemContainer_Click;

            pnlItemContainer.Controls.Add(itemContainerNum);
            pnlItemContainer.Controls.Add(itemContainerTextBox);
            pnlItemContainer.Controls.Add(addItem);
            pnlItemContainer.Controls.Add(deleteItemContainer);
            pnlQuestionDetails.Controls.Add(pnlItemContainer);
        }