Example #1
0
        public frmQuesChange(Problem problem)
        {
            InitializeComponent();
            InitCombText();

            this.Typecombo.SelectedIndex = 0;
            this.Diffcombo.SelectedIndex = 0;
            this.Textcombo.SelectedIndex = 0;

            if (problem != null)
            {
                int quesType = Convert.ToInt32(problem.type);
                this.Typecombo.SelectedIndex = quesType;
                this.scoreBox.Text = Convert.ToString(problem.score);
            }
            else
            {
                this.scoreBox.Text = "";
            }

            aList = (ListItem)this.Unitcombo.SelectedItem;
            pointWords = this.PcontentText.Text;
            theType = this.Typecombo.SelectedIndex;
            InitList(this.Typecombo.SelectedIndex, Convert.ToInt32(aList.key), Convert.ToInt32(bList.key), this.Diffcombo.SelectedIndex, pointWords, 1);
            this.Pagecombo.Items.Clear();
            InitCombPage(quesNum);
        }
Example #2
0
 private void SearchBut_Click(object sender, EventArgs e)
 {
     aList = (ListItem)this.Unitcombo.SelectedItem;
     pointWords = this.PcontentText.Text;
     theType = this.Typecombo.SelectedIndex;
     InitList(this.Typecombo.SelectedIndex, Convert.ToInt32(aList.key), Convert.ToInt32(bList.key), this.Diffcombo.SelectedIndex, pointWords, 1);
     this.Pagecombo.Items.Clear();
     InitCombPage(quesNum);
 }