示例#1
0
        public void Show_Result()
        {
            //String Result = "";
            String AnswerInfo_Name = "";

            if (list_answerInfo_Score != null && list_answerInfo_Score.Count > 0)
            {
                AnswerInfo_Name = "心血管";
                if (list_answerScore.ContainsKey(AnswerInfo_Name) && list_answerResult.ContainsKey(AnswerInfo_Name))
                {
                    int AnswerInfo_ScoreTotal = Convert.ToInt32(list_answerScore[AnswerInfo_Name]);
                    String AnswerInfo_ResultTotal = Convert.ToString(list_answerResult[AnswerInfo_Name]);

                    //Result += AnswerInfo_Name + ": " + AnswerInfo_ScoreTotal.ToString() + "分" + "  " + "属于: " + AnswerInfo_ResultTotal;
                    //Result += "\n";
                    label2.Text += AnswerInfo_Name + ": " + AnswerInfo_ResultTotal;
                    label2.Text += "  ";

                    //pictureBox2.Location = new Point(pictureBox1.Location.X + Convert.ToInt32(Convert.ToSingle(pictureBox1.Width) / Convert.ToSingle(300) * AnswerInfo_ScoreTotal - Convert.ToSingle(pictureBox2.Width) / Convert.ToSingle(2)), pictureBox2.Location.Y);
                    pictureBox2.Location = new Point(AnswerInfo_ResultLocation(AnswerInfo_ResultTotal), pictureBox2.Location.Y);
                }

                AnswerInfo_Name = "脑血管";
                if (list_answerScore.ContainsKey(AnswerInfo_Name) && list_answerResult.ContainsKey(AnswerInfo_Name))
                {
                    int AnswerInfo_ScoreTotal = Convert.ToInt32(list_answerScore[AnswerInfo_Name]);
                    String AnswerInfo_ResultTotal = Convert.ToString(list_answerResult[AnswerInfo_Name]);

                    //Result += AnswerInfo_Name + ": " + AnswerInfo_ScoreTotal.ToString() + "分" + "  " + "属于: " + AnswerInfo_ResultTotal;
                    //Result += "\n";

                    label2.Text += AnswerInfo_Name + ": " + AnswerInfo_ResultTotal;
                    label2.Text += "  ";

                    //pictureBox3.Location = new Point(pictureBox1.Location.X + Convert.ToInt32(Convert.ToSingle(pictureBox1.Width) / Convert.ToSingle(300) * AnswerInfo_ScoreTotal - Convert.ToSingle(pictureBox3.Width) / Convert.ToSingle(2)), pictureBox3.Location.Y);
                    pictureBox3.Location = new Point(AnswerInfo_ResultLocation(AnswerInfo_ResultTotal), pictureBox3.Location.Y);
                }

                AnswerInfo_Name = "老年痴呆";
                if (list_answerScore.ContainsKey(AnswerInfo_Name) && list_answerResult.ContainsKey(AnswerInfo_Name))
                {
                    int AnswerInfo_ScoreTotal = Convert.ToInt32(list_answerScore[AnswerInfo_Name]);
                    String AnswerInfo_ResultTotal = Convert.ToString(list_answerResult[AnswerInfo_Name]);

                    //if (AnswerInfo_ResultTotal == "健康")
                    //    Result += AnswerInfo_Name + "属于: " + AnswerInfo_ResultTotal;
                    //else
                    //    Result += AnswerInfo_Name + ": " + AnswerInfo_ScoreTotal.ToString() + "分" + "  " + "属于: " + AnswerInfo_ResultTotal;
                    //
                    //Result += "\n";

                    label2.Text += AnswerInfo_Name + ": " + AnswerInfo_ResultTotal;
                    label2.Text += "  ";

                    //pictureBox4.Location = new Point(pictureBox1.Location.X + Convert.ToInt32(Convert.ToSingle(pictureBox1.Width) / Convert.ToSingle(300) * AnswerInfo_ScoreTotal - Convert.ToSingle(pictureBox4.Width) / Convert.ToSingle(2)), pictureBox4.Location.Y);
                    pictureBox4.Location = new Point(AnswerInfo_ResultLocation(AnswerInfo_ResultTotal), pictureBox4.Location.Y);
                }

                //Label label_Result = new Label();
                //label_Result.Font = new System.Drawing.Font("宋体", 10.5F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
                //label_Result.AutoSize = true;
                //label_Result.Location = label3.Location;
                //label_Result.Text = Result;
                //Controls.Add(label_Result);

                if (!String.IsNullOrEmpty(QuestionCase_Manual))
                    Label_QuestionCase_Manual.Text = QuestionCase_Manual;

                if (QuestionCase_Description != null && QuestionCase_Description.Rows.Count > 0)
                {
                    for (int i = 0; i < QuestionCase_Description.Rows.Count; i++)
                    {
                        Label_QuestionCase_Description.Text += QuestionCase_Description.Rows[i]["QuestionDescription_ListID"].ToString() + "." + QuestionCase_Description.Rows[i]["QuestionDescription_Content"].ToString() + "\r\n";
                    }
                }

                RichTextBox_QuestionCase_Manual.Text = Label_QuestionCase_Manual.Text;
                RichTextBox_QuestionCase_Description.Text = Label_QuestionCase_Description.Text;

                Label_QuestionCase_Manual.Visible = false;
                Label_QuestionCase_Description.Visible = false;

                if (chart_dataTable != null && chart_dataTable.Rows.Count > 0)
                {
                    Class_Chart class_Chart = new Class_Chart(chart_dataTable, "DataX", "DataY", Color.BlueViolet, pictureBox10.Width, pictureBox10.Height);
                    Bitmap bitMap = class_Chart.Show_MSChart();

                    if (bitMap != null)
                    {
                        Image image = Image.FromHbitmap(bitMap.GetHbitmap());
                        pictureBox10.Image = image;
                        pictureBox10.Show();
                        pictureBox10.Refresh();
                    }
                }
            }
        }
示例#2
0
        public void Show_Result()
        {
            String AnswerInfo_Name = "";

            if (list_answerInfo_Score != null && list_answerInfo_Score.Count > 0)
            {
                AnswerInfo_Name = "上火症状";
                if (list_answerScore.ContainsKey(AnswerInfo_Name) && list_answerResult.ContainsKey(AnswerInfo_Name))
                {
                    int AnswerInfo_ScoreTotal = Convert.ToInt32(list_answerScore[AnswerInfo_Name]);
                    String AnswerInfo_ResultTotal = Convert.ToString(list_answerResult[AnswerInfo_Name]);
                    label2.Text += AnswerInfo_ScoreTotal.ToString();
                    pictureBox2.Location = new Point(pictureBox1.Location.X + Convert.ToInt32(Convert.ToSingle(pictureBox1.Width) / Convert.ToSingle(100) * AnswerInfo_ScoreTotal - Convert.ToSingle(pictureBox2.Width) / Convert.ToSingle(2)), pictureBox2.Location.Y);
                }

                AnswerInfo_Name = "危险因数";
                if (!String.IsNullOrEmpty(QuestionCase_Manual))
                    Label_QuestionCase_Manual.Text = QuestionCase_Manual;

                if (QuestionCase_Description != null && QuestionCase_Description.Rows.Count > 0)
                {
                    for (int i = 0; i < QuestionCase_Description.Rows.Count; i++)
                    {
                        Label_QuestionCase_Description.Text += QuestionCase_Description.Rows[i]["QuestionDescription_ListID"].ToString() + "." + QuestionCase_Description.Rows[i]["QuestionDescription_Content"].ToString() + "\r\n";
                    }
                }

                RichTextBox_QuestionCase_Manual.Text = Label_QuestionCase_Manual.Text;
                RichTextBox_QuestionCase_Description.Text = Label_QuestionCase_Description.Text;

                Label_QuestionCase_Manual.Visible = false;
                Label_QuestionCase_Description.Visible = false;

                if (chart_dataTable != null && chart_dataTable.Rows.Count > 0)
                {
                    Class_Chart class_Chart = new Class_Chart(chart_dataTable, "DataX", "DataY", Color.BlueViolet, pictureBox5.Width, pictureBox5.Height);
                    Bitmap bitMap = class_Chart.Show_MSChart();

                    if (bitMap != null)
                    {
                        Image image = Image.FromHbitmap(bitMap.GetHbitmap());
                        pictureBox5.Image = image;
                        pictureBox5.Show();
                        pictureBox5.Refresh();
                    }
                }
            }
        }