当前位置: 首页>>代码示例>>C#>>正文


C# Question.Get_Answer方法代码示例

本文整理汇总了C#中Question.Get_Answer方法的典型用法代码示例。如果您正苦于以下问题:C# Question.Get_Answer方法的具体用法?C# Question.Get_Answer怎么用?C# Question.Get_Answer使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Question的用法示例。


在下文中一共展示了Question.Get_Answer方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: Edit

        public void Edit(Question item, int pos)
        {
            DB.Tables[0].Rows[pos]["question"] = item.Question_;
            DB.Tables[0].Rows[pos]["trueAnswer"] = item.Get_true_answer();
            DB.Tables[0].Rows[pos]["answer2"] = item.Get_Answer(1);
            DB.Tables[0].Rows[pos]["answer3"] = item.Get_Answer(2);
            DB.Tables[0].Rows[pos]["answer4"] = item.Get_Answer(3);

            Save();
        }
开发者ID:ReflectedReality,项目名称:Millionaire,代码行数:10,代码来源:DB_Disconnected.cs

示例2: Add

        public void Add(Question item)
        {
            DataRow row = DB.Tables[0].NewRow();

            row["id"] = DB.Tables[0].Rows.Count;
            row["question"] = item.Question_;
            row["trueAnswer"] = item.Get_true_answer();
            row["answer2"] = item.Get_Answer(1);
            row["answer3"] = item.Get_Answer(2);
            row["answer4"] = item.Get_Answer(3);
            DB.Tables[0].Rows.Add(row);

            Save();
        }
开发者ID:ReflectedReality,项目名称:Millionaire,代码行数:14,代码来源:DB_Disconnected.cs

示例3: Add

        public void Add(Question item)
        {
            string Expression = string.Format("INSERT INTO mainTable (question, trueAnswer, answer2, answer3, answer4) values ('{0}', '{1}', '{2}', '{3}', '{4}')",
                item.Question_, item.Get_Answer(0), item.Get_Answer(1), item.Get_Answer(2), item.Get_Answer(3));

            using (SqlConnection connection = new SqlConnection(connectionString))
            {
                connection.Open();
                SqlCommand command = new SqlCommand(Expression, connection);

                int num = command.ExecuteNonQuery();
            }

            Load(_list);
        }
开发者ID:ReflectedReality,项目名称:Millionaire,代码行数:15,代码来源:DB_Connected.cs

示例4: Edit

        public void Edit(Question item, int pos)
        {
            _list[pos].Question_ = item.Question_;

            for (int i = 0; i < 4; i++)
                _list[pos].Set_Answer(i, item.Get_Answer(i));
        }
开发者ID:ReflectedReality,项目名称:Millionaire,代码行数:7,代码来源:DB_File.cs

示例5: Edit

        public void Edit(Question item, int pos)
        {
            int num;
            string ExpU = string.Format("update mainTable set question = '{0}', trueAnswer = '{1}', answer2 = '{2}', answer3 = '{3}', answer4 = '{4}' where question like '{4}'",
                item.Question_, item.Get_Answer(0), item.Get_Answer(1), item.Get_Answer(2), item.Get_Answer(3), _list[pos].Question_);

            using (SqlConnection connection = new SqlConnection(connectionString))
            {
                connection.Open();

                SqlCommand command = new SqlCommand(ExpU, connection);

                num = command.ExecuteNonQuery();
                if(num == 0)
                    throw new Exception(num + " items updated");
            }

            Load(_list);
        }
开发者ID:ReflectedReality,项目名称:Millionaire,代码行数:19,代码来源:DB_Connected.cs

示例6: SetNewQuestion

        public void SetNewQuestion(Question item)
        {
            _LastClick.Image = million.Properties.Resources.button;
            _answers_name[Convert.ToInt32(_LastClick.Name[_LastClick.Name.Length - 1].ToString()) - 1].Image = million.Properties.Resources.button;
            friend.Visible = false;
            friend_answer.Visible = false;
            layer_auditory.Visible = false;
            QUESTION.Text = item.Question_;

            for (int i = 0; i < 4; i++)
            {
                _answers[i].Text = item.Get_Answer(i);

                if (_fify_fifty)
                    _answers_name[i].Visible = true;
            }

            _fify_fifty_used = false;
            _clicked = false;
        }
开发者ID:ReflectedReality,项目名称:Millionaire,代码行数:20,代码来源:MainForm.cs


注:本文中的Question.Get_Answer方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。