[第一组]用例文档+功能说明书+技术说明书

用例文档:

背景:查看即将考试科目的考场以及考试开始时间和截止时间

(1)典型用户:小明

(2)用户的需求/迫切需要解决的问题:

a.想了解即将考试的科目的考场,提前去考场看一看,在即将考试的教室自习找感觉

b.考试周,根据显示考试时间,安排复习顺序

c.根据考试时间长短,预测难易程度,分配时间

(3)假设:

a.用户已经成功登录

b.任课教师已经确认考试考场及时间并已向教务处提交

场景:即将到考试周,小明想再好好复习一下。依稀记得老师说考试安排在某天,但是好多考试日期比较近,有点忘记具体某科考试到底在哪天,上午还是下午,还有考场何在

主要成功场景:

小明打开老司机软件,登录自己的账号,点击考场查询,显示了未考试科目的考试时间。接着按照考试顺序来决定复习顺序。并且发现xx考试在xx教室考试,小明最近几天去那个教室自习,熟悉一下,以便考试时候更有感觉。

小明通过该软件知道明天下午有考试,决定明天安排,上午早起再复习一下,中午吃饭睡一小觉,定个闹钟,下午参加考试。

步骤:

a.打开NEU OLD DRIVER软件,点击登录,输入自己的学号和密码

b.登录成功后,点击考场查询

c.显示即将考试的安排

扩展场景:

错填学号和密码显示账号或密码不正确,无法进行考场查询

任课教师未向教务处提交考试安排或教务处未向系统提交,某学科无法查到

功能说明书:

功能:用户(学生)查看自己的考试安排情况

技术说明书:

界面:

a.采用10*4表格形式,10行,4列。行为各个即将考试的课程,列为即将考试课程的课程名称,考试时间,教学楼,教室。在<Gird>里面添加10<RowDefinition>4<ConlumnDefinition>HeightWidth均设置为Auto

b.背景颜色 Border Background

<Page

    x:Class="NeuOldDriver.Pages.AAOSubPage.ExamRoom"

    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"

    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"

    xmlns:local="using:NeuOldDriver.Pages.AAOSubPage"

    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"

    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"

    mc:Ignorable="d"

    Loaded="Page_Loaded">

 

    <Grid Background="{ThemeResource ApplicationPageBackgroundThemeBrush}">

        <Grid.RowDefinitions>

            <RowDefinition Height="Auto"/>

            <RowDefinition/>

        </Grid.RowDefinitions>

 

        <Grid>

            <Grid.ColumnDefinitions>

                <ColumnDefinition Width="2*"/>

                <ColumnDefinition Width="8*"/>

            </Grid.ColumnDefinitions>

 

            <Border Grid.Row="0" Grid.Column="0" Background="#1c445c"/>

            <Border Grid.Row="0" Grid.Column="1" Background="#1c445c"/>

            <TextBlock Foreground="#49edde" Grid.Column="0" FontSize="40" HorizontalAlignment="Center" VerticalAlignment="Center">查考场</TextBlock>

            <TextBlock Name="StudentInformation" Foreground="#49edde" Grid.Column="0" FontSize="30" HorizontalAlignment="Right" VerticalAlignment="Center"></TextBlock>

 

        </Grid>

 

        <Grid Grid.Row="1">

            <Grid.ColumnDefinitions>

                <ColumnDefinition/>

                <ColumnDefinition/>

                <ColumnDefinition/>

                <ColumnDefinition/>

            </Grid.ColumnDefinitions>

 

            <Grid.RowDefinitions>

                <RowDefinition Height="Auto"/>

                <RowDefinition/>

                <RowDefinition/>

                <RowDefinition/>

                <RowDefinition/>

                <RowDefinition/>

                <RowDefinition/>

                <RowDefinition/>

                <RowDefinition/>

                <RowDefinition/>

                <RowDefinition/>

            </Grid.RowDefinitions>

 

            <Border Grid.Row="0" Grid.Column="0" Background="#2f5cb6"/>

            <Border Grid.Row="0" Grid.Column="1" Background="#2f5cb6"/>

            <Border Grid.Row="0" Grid.Column="2" Background="#2f5cb6"/>

            <Border Grid.Row="0" Grid.Column="3" Background="#2f5cb6"/>

 

            <Border Grid.Row="1" Grid.Column="0" Background="#70dcdc"/>

            <Border Grid.Row="1" Grid.Column="1" Background="#70dcdc"/>

            <Border Grid.Row="1" Grid.Column="2" Background="#70dcdc"/>

            <Border Grid.Row="1" Grid.Column="3" Background="#70dcdc"/>

 

            <Border Grid.Row="2" Grid.Column="0" Background="#0078D7"/>

            <Border Grid.Row="2" Grid.Column="1" Background="#0078D7"/>

            <Border Grid.Row="2" Grid.Column="2" Background="#0078D7"/>

            <Border Grid.Row="2" Grid.Column="3" Background="#0078D7"/>

 

            <Border Grid.Row="3" Grid.Column="0" Background="#70dcdc"/>

            <Border Grid.Row="3" Grid.Column="1" Background="#70dcdc"/>

            <Border Grid.Row="3" Grid.Column="2" Background="#70dcdc"/>

            <Border Grid.Row="3" Grid.Column="3" Background="#70dcdc"/>

 

            <Border Grid.Row="4" Grid.Column="0" Background="#0078D7"/>

            <Border Grid.Row="4" Grid.Column="1" Background="#0078D7"/>

            <Border Grid.Row="4" Grid.Column="2" Background="#0078D7"/>

            <Border Grid.Row="4" Grid.Column="3" Background="#0078D7"/>

 

            <Border Grid.Row="5" Grid.Column="0" Background="#70dcdc"/>

            <Border Grid.Row="5" Grid.Column="1" Background="#70dcdc"/>

            <Border Grid.Row="5" Grid.Column="2" Background="#70dcdc"/>

            <Border Grid.Row="5" Grid.Column="3" Background="#70dcdc"/>

 

            <Border Grid.Row="6" Grid.Column="0" Background="#0078D7"/>

            <Border Grid.Row="6" Grid.Column="1" Background="#0078D7"/>

            <Border Grid.Row="6" Grid.Column="2" Background="#0078D7"/>

            <Border Grid.Row="6" Grid.Column="3" Background="#0078D7"/>

 

            <Border Grid.Row="7" Grid.Column="0" Background="#70dcdc"/>

            <Border Grid.Row="7" Grid.Column="1" Background="#70dcdc"/>

            <Border Grid.Row="7" Grid.Column="2" Background="#70dcdc"/>

            <Border Grid.Row="7" Grid.Column="3" Background="#70dcdc"/>

 

            <Border Grid.Row="8" Grid.Column="0" Background="#0078D7"/>

            <Border Grid.Row="8" Grid.Column="1" Background="#0078D7"/>

            <Border Grid.Row="8" Grid.Column="2" Background="#0078D7"/>

            <Border Grid.Row="8" Grid.Column="3" Background="#0078D7"/>

 

            <Border Grid.Row="9" Grid.Column="0" Background="#70dcdc"/>

            <Border Grid.Row="9" Grid.Column="1" Background="#70dcdc"/>

            <Border Grid.Row="9" Grid.Column="2" Background="#70dcdc"/>

            <Border Grid.Row="9" Grid.Column="3" Background="#70dcdc"/>

 

            <Border Grid.Row="10" Grid.Column="0" Background="#0078D7"/>

            <Border Grid.Row="10" Grid.Column="1" Background="#0078D7"/>

            <Border Grid.Row="10" Grid.Column="2" Background="#0078D7"/>

            <Border Grid.Row="10" Grid.Column="3" Background="#0078D7"/>

 

 

 

 

            <TextBlock Foreground="White" FontSize="25" Grid.Column="0" HorizontalAlignment="Center" VerticalAlignment="Center" >课程名称</TextBlock>

            <TextBlock Foreground="White" FontSize="25" Grid.Column="1" HorizontalAlignment="Center" VerticalAlignment="Center" >考试时间</TextBlock>

            <TextBlock Foreground="White" FontSize="25" Grid.Column="2" HorizontalAlignment="Center" VerticalAlignment="Center" >教学楼</TextBlock>

            <TextBlock Foreground="White" FontSize="25" Grid.Column="3" HorizontalAlignment="Center" VerticalAlignment="Center" >教室</TextBlock>

 

            <TextBlock Name="C00" Grid.Row="1" Grid.Column="0" Foreground="White" HorizontalAlignment="Left" VerticalAlignment="Center" ></TextBlock>

            <TextBlock Name="C01" Grid.Row="1" Grid.Column="1" Foreground="White" HorizontalAlignment="Center" VerticalAlignment="Center" ></TextBlock>

            <TextBlock Name="C02" Grid.Row="1" Grid.Column="2" Foreground="White" HorizontalAlignment="Center" VerticalAlignment="Center" ></TextBlock>

            <TextBlock Name="C03" Grid.Row="1" Grid.Column="3" Foreground="White" HorizontalAlignment="Center" VerticalAlignment="Center" ></TextBlock>

 

 

            <TextBlock Name="C10" Grid.Row="2" Grid.Column="0" Foreground="White" HorizontalAlignment="Left" VerticalAlignment="Center" ></TextBlock>

            <TextBlock Name="C11" Grid.Row="2" Grid.Column="1" Foreground="White" HorizontalAlignment="Center" VerticalAlignment="Center" ></TextBlock>

            <TextBlock Name="C12" Grid.Row="2" Grid.Column="2" Foreground="White" HorizontalAlignment="Center" VerticalAlignment="Center" ></TextBlock>

            <TextBlock Name="C13" Grid.Row="2" Grid.Column="3" Foreground="White" HorizontalAlignment="Center" VerticalAlignment="Center" ></TextBlock>

 

 

            <TextBlock Name="C20" Grid.Row="3" Grid.Column="0" Foreground="White" HorizontalAlignment="Left" VerticalAlignment="Center" ></TextBlock>

            <TextBlock Name="C21" Grid.Row="3" Grid.Column="1" Foreground="White" HorizontalAlignment="Center" VerticalAlignment="Center" ></TextBlock>

            <TextBlock Name="C22" Grid.Row="3" Grid.Column="2" Foreground="White" HorizontalAlignment="Center" VerticalAlignment="Center" ></TextBlock>

            <TextBlock Name="C23" Grid.Row="3" Grid.Column="3" Foreground="White" HorizontalAlignment="Center" VerticalAlignment="Center" ></TextBlock>

 

 

            <TextBlock Name="C30" Grid.Row="4" Grid.Column="0" Foreground="White" HorizontalAlignment="Left" VerticalAlignment="Center" ></TextBlock>

            <TextBlock Name="C31" Grid.Row="4" Grid.Column="1" Foreground="White" HorizontalAlignment="Center" VerticalAlignment="Center" ></TextBlock>

            <TextBlock Name="C32" Grid.Row="4" Grid.Column="2" Foreground="White" HorizontalAlignment="Center" VerticalAlignment="Center" ></TextBlock>

            <TextBlock Name="C33" Grid.Row="4" Grid.Column="3" Foreground="White" HorizontalAlignment="Center" VerticalAlignment="Center" ></TextBlock>

 

 

            <TextBlock Name="C40" Grid.Row="5" Grid.Column="0" Foreground="White" HorizontalAlignment="Left" VerticalAlignment="Center" ></TextBlock>

            <TextBlock Name="C41" Grid.Row="5" Grid.Column="1" Foreground="White" HorizontalAlignment="Center" VerticalAlignment="Center" ></TextBlock>

            <TextBlock Name="C42" Grid.Row="5" Grid.Column="2" Foreground="White" HorizontalAlignment="Center" VerticalAlignment="Center" ></TextBlock>

            <TextBlock Name="C43" Grid.Row="5" Grid.Column="3" Foreground="White" HorizontalAlignment="Center" VerticalAlignment="Center" ></TextBlock>

 

 

            <TextBlock Name="C50" Grid.Row="6" Grid.Column="0" Foreground="White" HorizontalAlignment="Left" VerticalAlignment="Center" ></TextBlock>

            <TextBlock Name="C51" Grid.Row="6" Grid.Column="1" Foreground="White" HorizontalAlignment="Center" VerticalAlignment="Center" ></TextBlock>

            <TextBlock Name="C52" Grid.Row="6" Grid.Column="2" Foreground="White" HorizontalAlignment="Center" VerticalAlignment="Center" ></TextBlock>

            <TextBlock Name="C53" Grid.Row="6" Grid.Column="3" Foreground="White" HorizontalAlignment="Center" VerticalAlignment="Center" ></TextBlock>

 

 

            <TextBlock Name="C60" Grid.Row="7" Grid.Column="0" Foreground="White" HorizontalAlignment="Left" VerticalAlignment="Center" ></TextBlock>

            <TextBlock Name="C61" Grid.Row="7" Grid.Column="1" Foreground="White" HorizontalAlignment="Center" VerticalAlignment="Center" ></TextBlock>

            <TextBlock Name="C62" Grid.Row="7" Grid.Column="2" Foreground="White" HorizontalAlignment="Center" VerticalAlignment="Center" ></TextBlock>

            <TextBlock Name="C63" Grid.Row="7" Grid.Column="3" Foreground="White" HorizontalAlignment="Center" VerticalAlignment="Center" ></TextBlock>

 

 

            <TextBlock Name="C70" Grid.Row="8" Grid.Column="0" Foreground="White" HorizontalAlignment="Left" VerticalAlignment="Center" ></TextBlock>

            <TextBlock Name="C71" Grid.Row="8" Grid.Column="1" Foreground="White" HorizontalAlignment="Center" VerticalAlignment="Center" ></TextBlock>

            <TextBlock Name="C72" Grid.Row="8" Grid.Column="2" Foreground="White" HorizontalAlignment="Center" VerticalAlignment="Center" ></TextBlock>

            <TextBlock Name="C73" Grid.Row="8" Grid.Column="3" Foreground="White" HorizontalAlignment="Center" VerticalAlignment="Center" ></TextBlock>

 

 

            <TextBlock Name="C80" Grid.Row="9" Grid.Column="0" Foreground="White" HorizontalAlignment="Left" VerticalAlignment="Center" ></TextBlock>

            <TextBlock Name="C81" Grid.Row="9" Grid.Column="1" Foreground="White" HorizontalAlignment="Center" VerticalAlignment="Center" ></TextBlock>

            <TextBlock Name="C82" Grid.Row="9" Grid.Column="2" Foreground="White" HorizontalAlignment="Center" VerticalAlignment="Center" ></TextBlock>

            <TextBlock Name="C83" Grid.Row="9" Grid.Column="3" Foreground="White" HorizontalAlignment="Center" VerticalAlignment="Center" ></TextBlock>

 

 

            <TextBlock Name="C90" Grid.Row="10" Grid.Column="0" Foreground="White" HorizontalAlignment="Left" VerticalAlignment="Center" ></TextBlock>

            <TextBlock Name="C91" Grid.Row="10" Grid.Column="1" Foreground="White" HorizontalAlignment="Center" VerticalAlignment="Center" ></TextBlock>

            <TextBlock Name="C92" Grid.Row="10" Grid.Column="2" Foreground="White" HorizontalAlignment="Center" VerticalAlignment="Center" ></TextBlock>

            <TextBlock Name="C93" Grid.Row="10" Grid.Column="3" Foreground="White" HorizontalAlignment="Center" VerticalAlignment="Center" ></TextBlock>

 

 

        </Grid>

 

    </Grid>

</Page>

 

 

 

 

 

using System;

using System.Collections.Generic;

using System.IO;

using System.Linq;

using System.Runtime.InteropServices.WindowsRuntime;

using Windows.Foundation;

using Windows.Foundation.Collections;

using Windows.UI.Xaml;

using Windows.UI.Xaml.Controls;

using Windows.UI.Xaml.Controls.Primitives;

using Windows.UI.Xaml.Data;

using Windows.UI.Xaml.Input;

using Windows.UI.Xaml.Media;

using Windows.UI.Xaml.Navigation;

using NeuOldDriver.Source.Parser;

using NeuOldDriver.Net;

 

// “空白页”项模板在 http://go.microsoft.com/fwlink/?LinkId=234238 上有介绍

 

namespace NeuOldDriver.Pages.AAOSubPage {

    /// <summary>

    /// 可用于自身或导航至 Frame 内部的空白页。

    /// </summary>

    public sealed partial class ExamRoom : Page

    {

 

        TextBlock[][] textBlocks = new TextBlock[10][];

 

        public ExamRoom()

        {

            this.InitializeComponent();

        }

 

        private void Page_Loaded(object sender, RoutedEventArgs e)

        {

            for (int i = 0; i < 10; i++)

            {

                textBlocks[i] = new TextBlock[4];

            }

 

            //行,列

            textBlocks[0][0] = C00;

            textBlocks[0][1] = C01;

            textBlocks[0][2] = C02;

            textBlocks[0][3] = C03;

 

            textBlocks[1][0] = C10;

            textBlocks[1][1] = C11;

            textBlocks[1][2] = C12;

            textBlocks[1][3] = C13;

 

            textBlocks[2][0] = C20;

            textBlocks[2][1] = C21;

            textBlocks[2][2] = C22;

            textBlocks[2][3] = C23;

 

            textBlocks[3][0] = C30;

            textBlocks[3][1] = C31;

            textBlocks[3][2] = C32;

            textBlocks[3][3] = C33;

 

            textBlocks[4][0] = C40;

            textBlocks[4][1] = C41;

            textBlocks[4][2] = C42;

            textBlocks[4][3] = C43;

 

            textBlocks[5][0] = C50;

            textBlocks[5][1] = C51;

            textBlocks[5][2] = C52;

            textBlocks[5][3] = C53;

 

            textBlocks[6][0] = C60;

            textBlocks[6][1] = C61;

            textBlocks[6][2] = C62;

            textBlocks[6][3] = C63;

 

            textBlocks[7][0] = C70;

            textBlocks[7][1] = C71;

            textBlocks[7][2] = C72;

            textBlocks[7][3] = C73;

 

            textBlocks[8][0] = C80;

            textBlocks[8][1] = C81;

            textBlocks[8][2] = C82;

            textBlocks[8][3] = C83;

 

            textBlocks[9][0] = C90;

            textBlocks[9][1] = C91;

            textBlocks[9][2] = C92;

            textBlocks[9][3] = C93;

 

            ExamRoomHTML();

        }

 

 

        private async void ExamRoomHTML()

        {

            string html = await AAOAPI.RequestInfomation("考试日程查询");  //把考试日程查询页面的HTML返回给成string

            

 

            int[] selectNum = { 2, 4, 5, 6};

            for (int row = 2; row < 12; row++)

            {

                for (int column = 0; column < selectNum.Length; column++)

                {

                    //循环改变Xpath表达式路径

                    string xpath1 = "html/body/table/tr[";

                    string xpath2 = "]/td[";

                    string xpath3 = "]";

                    string xpathGradeCheck = xpath1 + row + xpath2 + selectNum[column] + xpath3;

 

                    List<string> GradeCheckText = HTMLParser.ParseHTML(html, xpathGradeCheck);  //返回当前路径下标签里的文本

                    string GradeCheckStr = string.Join(" ", GradeCheckText.ToArray());

                    GradeCheckStr = GradeCheckStr.Replace(" ", " ");

                    if (column == 0)

                    {

                        textBlocks[row - 2][column].Text = "     " + GradeCheckStr;

                    }

                    else textBlocks[row - 2][column].Text = GradeCheckStr;

 

                }

            }

        }

    }

 

    }

posted on 2017-07-27 11:31  20143674安迪  阅读(186)  评论(1)    收藏  举报