本文整理汇总了C#中Question.Set_Answers方法的典型用法代码示例。如果您正苦于以下问题:C# Question.Set_Answers方法的具体用法?C# Question.Set_Answers怎么用?C# Question.Set_Answers使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Question
的用法示例。
在下文中一共展示了Question.Set_Answers方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: addButton_Click
private void addButton_Click(object sender, EventArgs e)
{
Question added = new Question();
added.Question_ = questionAdd.Text;
added.Set_Answers(ans1Add.Text, ans2Add.Text, ans3Add.Text, ans4Add.Text);
_changed = true;
if (_list.Size == 15)
maxQuests.Visible = true;
else
{
AddE(added);
RefreshDialog();
}
}
示例2: Load
public void Load(QuestionList list)
{
_list = list;
_list.Clear();
Question tmp;
string QuestExpression = "SELECT * from mainTable";
using (SqlConnection connection = new SqlConnection(connectionString))
{
connection.Open();
SqlCommand command = new SqlCommand(QuestExpression, connection);
SqlDataReader reader = command.ExecuteReader();
if (reader.HasRows)
{
while (reader.Read())
{
tmp = new Question();
tmp.Question_ = reader.GetString(1);
tmp.Set_Answers(reader.GetString(2), reader.GetString(3), reader.GetString(4), reader.GetString(5));
list.Add(tmp);
}
}
}
}
示例3: editButton_Click
private void editButton_Click(object sender, EventArgs e)
{
Question edited = new Question();
edited.Question_ = questionEdit.Text;
edited.Set_Answers(ans1Edit.Text, ans2Edit.Text, ans3Edit.Text, ans4Edit.Text);
_changed = true;
if (questListEdit.SelectedIndex >= 0)
EditE(edited, questListEdit.SelectedIndex);
RefreshDialog();
}