public void displaySessionDetails(Session s)
        {
            DScsv file = new DScsv();
            List<string[]> data = file.getData(s.GetDataFilePath());
            int max = 0;
            int current = 0;
            for(int i = 0; i < data.Count; i++)
            {
                current = 0;
                for(int j = 0; j < data[i].Length; j++)
                {
                    current++;
                }
                if (current > max)
                    max = current;
            }

            DataTable dt = new DataTable("Session");
            //name columns
            for (int i = 0; i < max; i++)
            {
                dt.Columns.Add((i+1).ToString());
            }
            //add rows
            for(int i = 0; i < data.Count; i++)
            {
                dt.Rows.Add(data[i]);
            }            
            DataView dv = new DataView(dt);
            dataGridView1.DataSource = dv;
        }
Ejemplo n.º 2
0
 public virtual void Initialize(
     GraphicsDeviceManager g, ContentManager c, SpriteBatch sb,
     int screenHeight, int screenWidth,
     Session s, Vector3 position)
 {
     conditionMet = false;
     endCondition.isNewExecution = true;
     Position = position;
     output = s.GetCSV();
     output.startTask(this);
 }
Ejemplo n.º 3
0
        public void Initialize(Profile p, Therapy t)
        {
            therapy = t.ToString();
            profile = p.Name;
            createDate = System.DateTime.Now;
            string date = createDate.Year + "-"
                        + createDate.Month + "-"
                        + createDate.Day + " "
                        + createDate.Hour + "-"
                        + createDate.Minute +
                        + createDate.Second;

            dataFile = profile  + "_" + therapy + "_" + date + ".csv";
            csvOut = new DScsv();
            createFile();
        }
Ejemplo n.º 4
0
 public override void writeFields(DScsv output)
 {
     output.addField("RemoteX");
     output.addField("RemoteY");
     output.addField("RemotePitch");
     output.addField("RemoteRoll");
 }
Ejemplo n.º 5
0
 public override void writeFields(DScsv output)
 {
     output.addField("RemotePointerX");
     output.addField("RemotePointerY");
 }
Ejemplo n.º 6
0
 public override void writeStatus(DScsv output)
 {
     Vector3 pos = getXYZ();
     output.setData("RemotePointerX", pos.X.ToString());
     output.setData("RemotePointerY", pos.Y.ToString());
 }
Ejemplo n.º 7
0
 public override void writeFields(DScsv output)
 {
     output.addField("RemoteAccelX");
     output.addField("RemoteAccelY");
     output.addField("RemoteAccelZ");
 }
Ejemplo n.º 8
0
 public override void writeStatus(DScsv output)
 {
     Vector3 pos = getXYZ();
     output.setData("RemoteAccelX", pos.X.ToString());
     output.setData("RemoteAccelY", pos.Y.ToString());
     output.setData("RemoteAccelZ", pos.Z.ToString());
 }
Ejemplo n.º 9
0
 public override void writeStatus(DScsv output)
 {
     Vector3 pos = getXYZ();
     BalanceBoardState w = WiiUse.GetBalanceBoardState();
     output.setData("BalanceX", pos.X.ToString());
     output.setData("BalanceY", pos.Y.ToString());
     output.setData("BalanceFrontLeftKGS", w.frontLeft.ToString());
     output.setData("BalanceFrontRightKGS", w.frontRight.ToString());
     output.setData("BalanceBackLeftKGS", w.backLeft.ToString());
     output.setData("BalanceBackRightKGS", w.backRight.ToString());
 }
Ejemplo n.º 10
0
 public override void writeStatus(DScsv output)
 {
     Vector3 pos = getXYZ();
     NunchuckState w = WiiUse.GetNunchuckState();
     output.setData("NunchuckX", pos.X.ToString());
     output.setData("NunchuckY", pos.Y.ToString());
     output.setData("NunchuckPitch", w.pitch.ToString());
     output.setData("NunchuckRoll", w.roll.ToString());
 }
Ejemplo n.º 11
0
 public void WriteOutput(DScsv output)
 {
     output.WriteLine("#Performance Metrics:");
     for (int i = 0; i < numMetrics; i++)
     {
         output.WriteLine(PerformanceMetricStrings[i] + "," + metrics[i]);
     }
 }
Ejemplo n.º 12
0
 public override void writeStatus(DScsv output)
 {
     Vector3 pos = getXYZ();
     NunchuckState w = WiiUse.GetNunchuckState();
     output.setData("JoystickX", pos.X.ToString());
     output.setData("JoystickY", pos.Y.ToString());
     output.setData("JoystickAngle", w.joyAngle.ToString());
     output.setData("JoystickMagnitude", w.joyMagnitude.ToString());
 }
Ejemplo n.º 13
0
        public override void writeStatus(DScsv output)
        {
            output.setData("MousePosX", getXYZ().X.ToString());
            output.setData("MousePosY", getXYZ().Y.ToString());
            if(Mouse.GetState().LeftButton == ButtonState.Pressed)
                output.setData("MouseLeft", "Pressed");
            else
                output.setData("MouseLeft", "Released");

            if (Mouse.GetState().RightButton == ButtonState.Pressed)
                output.setData("MouseRight", "Pressed");
            else
                output.setData("MouseRight", "Released");
        }
Ejemplo n.º 14
0
 public override void writeFields(DScsv output)
 {
     output.addField("NunchuckAccelX");
     output.addField("NunchuckAccelY");
     output.addField("NunchuckAccelZ");
 }
Ejemplo n.º 15
0
 public override void writeFields(DScsv output)
 {
     output.addField("MousePosX");
     output.addField("MousePosY");
     output.addField("MouseLeft");
     output.addField("MouseRight");
 }
Ejemplo n.º 16
0
 public abstract void writeStatus(DScsv output);
Ejemplo n.º 17
0
 public abstract void writeFields(DScsv output);
Ejemplo n.º 18
0
 public override void writeStatus(DScsv output)
 {
     Vector3 pos = getXYZ();
     WiimoteState w = WiiUse.GetRemoteState();
     output.setData("RemoteX", pos.X.ToString());
     output.setData("RemoteY", pos.Y.ToString());
     output.setData("RemotePitch", w.pitch.ToString());
     output.setData("RemoteRoll", w.roll.ToString());
 }
Ejemplo n.º 19
0
 public override void writeFields(DScsv output)
 {
     output.addField("NunchuckX");
     output.addField("NunchuckY");
     output.addField("NunchuckPitch");
     output.addField("NunchuckRoll");
 }
Ejemplo n.º 20
0
 public override void writeFields(DScsv output)
 {
     output.addField("JoystickX");
     output.addField("JoystickY");
     output.addField("JoystickAngle");
     output.addField("JoystickMagnitude");
 }
Ejemplo n.º 21
0
 public override void writeFields(DScsv output)
 {
     output.addField("BalanceX");
     output.addField("BalanceY");
     output.addField("BalanceFrontLeftKGS");
     output.addField("BalanceFrontRightKGS");
     output.addField("BalanceBackLeftKGS");
     output.addField("BalanceBackRightKGS");
 }