Ejemplo n.º 1
0
        public String GetRecLine(StGraphItem item, StResult result)
        {
            String retval = "";

            String countingCorrectness = "";
            String correctness         = "";

            if (result.CountingCorrectness)
            {
                countingCorrectness = "1";
            }
            else
            {
                countingCorrectness = "0";
            }

            if (result.Correctness)
            {
                correctness = "1";
            }
            else
            {
                correctness = "0";
            }

            retval += result.SpanWidth + "\t" + result.PractiseMode + "\t" + result.GroupNum + "\t" + result.GroupSeq + "\t" +
                      item.TarCount + "\t" + item.InterCircleCount + "\t" + item.InterTriCount + "\t" +
                      (((item.InterTriCount + item.InterCircleCount)) / item.TarCount).ToString() + "\t" +
                      item.DistanceTar + "\t" + item.DistanceComm + "\t" + result.ClickOnType + "\t" + result.ClickOnPosition + "\t" +
                      countingCorrectness + "\t" + result.GraphRT + "\t" +
                      correctness + "\t" + result.RT + "\t" + result.UserSerialCorrectCount + "\t" +
                      result.StdSerial + "\t" + result.UserSerial + "\t" + result.UserSerialCorrectMask;

            return(retval);
        }
Ejemplo n.º 2
0
        private List <StGraphItem> doRead(String addr)
        {
            List <StGraphItem> retval = new List <StGraphItem>();

            StreamReader SR = File.OpenText(addr);

            String Line = null;
            Regex  rex  = new Regex("[^\t]+");

            while ((Line = SR.ReadLine()) != null)
            {
                MatchCollection mts = rex.Matches(Line);
                StGraphItem     sgi = new StGraphItem();

                sgi.TarCount         = Int32.Parse(mts[0].Value);
                sgi.InterCircleCount = Int32.Parse(mts[1].Value);
                sgi.InterTriCount    = Int32.Parse(mts[2].Value);
                sgi.DistanceTar      = (short)Int32.Parse(mts[3].Value);
                sgi.DistanceComm     = (short)Int32.Parse(mts[4].Value);

                retval.Add(sgi);
            }

            SR.Close();

            return(retval);
        }
Ejemplo n.º 3
0
        private void amBtnDo_Click(object sender, RoutedEventArgs e)
        {
            StGraphItem item = new StGraphItem();

            item.DistanceComm     = short.Parse(amTBDisComm.Text);
            item.DistanceTar      = short.Parse(amTBDisTar.Text);
            item.InterCircleCount = int.Parse(amTBInterCir.Text);
            item.InterTriCount    = int.Parse(amTBInterTri.Text);
            item.TarCount         = int.Parse(amTBTarCount.Text);

            mLocations = mOrg.ShowGraph(item);
            mItem      = item;
        }
Ejemplo n.º 4
0
        public List <CSPoint> ShowGraph(StGraphItem item)
        {
            List <CSPoint> retval = null;

            //graph
            mGC.Clear();
            retval = mGC.DrawScene(item);
            //button
            mPage.amBaseCanvas.Children.Add(mConfirmBtn);
            Canvas.SetTop(mConfirmBtn, FEITStandard.PAGE_BEG_Y + 530);
            Canvas.SetLeft(mConfirmBtn, FEITStandard.PAGE_BEG_X + 730);

            return(retval);
        }
Ejemplo n.º 5
0
        public StGraphItem GenOneRandomItem(short distanceTar, short distanceComm)
        {
            StGraphItem retval = new StGraphItem();

            retval.DistanceComm     = distanceComm;
            retval.DistanceTar      = distanceTar;
            retval.TarCount         = mRDM.Next(3, 10);
            retval.InterCircleCount = mRDM.Next(1, 6);
            int triangleIdx = mRDM.Next(0, 5);

            retval.InterTriCount = triangleCountArr[triangleIdx];

            return(retval);
        }
Ejemplo n.º 6
0
 public List <CSPoint> DrawScene(StGraphItem item)
 {
     return(DrawScene(item.TarCount, item.InterCircleCount, item.InterTriCount,
                      item.DistanceTar, item.DistanceComm));
 }