-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathFormSessionDetail.Designer.cs
115 lines (107 loc) · 4.23 KB
/
FormSessionDetail.Designer.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
using System.Data;
using System.Collections.Generic;
namespace TheraWii
{
partial class FormSessionDetail
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
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;
}
#region Windows Form Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
this.dataGridView1 = new System.Windows.Forms.DataGridView();
this.label1 = new System.Windows.Forms.Label();
((System.ComponentModel.ISupportInitialize)(this.dataGridView1)).BeginInit();
this.SuspendLayout();
//
// dataGridView1
//
this.dataGridView1.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
| System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.dataGridView1.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
this.dataGridView1.Location = new System.Drawing.Point(12, 38);
this.dataGridView1.Name = "dataGridView1";
this.dataGridView1.Size = new System.Drawing.Size(562, 342);
this.dataGridView1.TabIndex = 0;
//
// label1
//
this.label1.AutoSize = true;
this.label1.Font = new System.Drawing.Font("Microsoft Sans Serif", 16F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.label1.Location = new System.Drawing.Point(7, 9);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(371, 26);
this.label1.TabIndex = 1;
this.label1.Text = "Session Detail for Profile on 10/24/08";
//
// FormSessionDetail
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(586, 392);
this.Controls.Add(this.label1);
this.Controls.Add(this.dataGridView1);
this.KeyPreview = true;
this.Name = "FormSessionDetail";
this.Text = "SessionDetail";
this.Load += new System.EventHandler(this.FormSessionDetail_Load);
this.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.FormSessionDetail_KeyPress);
this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.FormSessionDetail_FormClosing);
((System.ComponentModel.ISupportInitialize)(this.dataGridView1)).EndInit();
this.ResumeLayout(false);
this.PerformLayout();
}
#endregion
private System.Windows.Forms.DataGridView dataGridView1;
private System.Windows.Forms.Label label1;
}
}