Merge remote-tracking branch 'origin/develop' into develop

Conflicts:
	ErgometerDoctorApplication/ConActiveSessions.cs
	ErgometerDoctorApplication/MainWindow.cs
This commit is contained in:
2015-10-19 22:32:39 +02:00
2 changed files with 61 additions and 0 deletions
@@ -10,6 +10,7 @@ namespace ErgometerDoctorApplication
{ {
public class ConActiveSessions : Panel public class ConActiveSessions : Panel
{ {
<<<<<<< HEAD
private FlowLayoutPanel flowlayout; private FlowLayoutPanel flowlayout;
@@ -17,6 +18,39 @@ namespace ErgometerDoctorApplication
{ {
labelActiveSessions = new Label(); labelActiveSessions = new Label();
/*
this.data = new DataGridView();
this.name = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.sessionId = new System.Windows.Forms.DataGridViewTextBoxColumn();
((System.ComponentModel.ISupportInitialize)(this.data)).BeginInit();
this.SuspendLayout();
//
// SongsTableView
//
this.data.AllowUserToAddRows = false;
this.data.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] {
this.name, this.sessionId});
this.data.AllowUserToDeleteRows = false;
this.data.AllowUserToResizeRows = false;
this.data.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
this.data.Location = new System.Drawing.Point(0, 0);
this.data.MultiSelect = false;
this.data.Name = "Active Sessions";
this.data.ScrollBars = System.Windows.Forms.ScrollBars.Vertical;
this.data.Size = new System.Drawing.Size(760, 172);
this.data.TabIndex = 0;
this.data.CellContentClick += new DataGridViewCellEventHandler(this.data_CellContentClick);
//
// name
//
this.name.HeaderText = "Name";
this.name.Name = "Name";
//
// sessionId
//
this.sessionId.HeaderText = "Session ID";
this.sessionId.Name = "Session ID";
*/
// //
// ConActiveSessions // ConActiveSessions
// //
@@ -25,6 +59,7 @@ namespace ErgometerDoctorApplication
this.Name = "ConActiveSessions"; this.Name = "ConActiveSessions";
this.Size = new System.Drawing.Size(584, 459); this.Size = new System.Drawing.Size(584, 459);
this.TabIndex = 0; this.TabIndex = 0;
<<<<<<< HEAD
// //
// labelActiveSessions // labelActiveSessions
// //
@@ -49,6 +84,8 @@ namespace ErgometerDoctorApplication
this.Controls.Add(labelActiveSessions); this.Controls.Add(labelActiveSessions);
this.Controls.Add(flowlayout); this.Controls.Add(flowlayout);
//this.Controls.Add(data);
} }
public System.Windows.Forms.Label labelActiveSessions; public System.Windows.Forms.Label labelActiveSessions;
@@ -63,5 +100,19 @@ namespace ErgometerDoctorApplication
flowlayout.Controls.Add(new SessionPanel(pair.Key, pair.Value)); flowlayout.Controls.Add(new SessionPanel(pair.Key, pair.Value));
} }
} }
/*
private void data_CellContentClick(object sender, DataGridViewCellEventArgs e)
{
if (data.Rows[e.RowIndex].Cells[1].Value != null)
{
MainClient.StartNewCLient(data.Rows[e.RowIndex].Cells[0].Value + "", int.Parse(data.Rows[e.RowIndex].Cells[1].Value + ""));
}
}
public System.Windows.Forms.DataGridViewTextBoxColumn name;
public System.Windows.Forms.DataGridViewTextBoxColumn sessionId;
public System.Windows.Forms.DataGridView data;
*/
} }
} }
+10
View File
@@ -24,6 +24,7 @@ namespace ErgometerDoctorApplication
{ {
this.HeaderLabel.Text = "Actieve Sessies"; this.HeaderLabel.Text = "Actieve Sessies";
conActiveSessions.BringToFront(); conActiveSessions.BringToFront();
//conActiveSessions.data.Rows.Clear();
if(MainClient.activesessions.Count > 0) if(MainClient.activesessions.Count > 0)
{ {
@@ -34,6 +35,15 @@ namespace ErgometerDoctorApplication
{ {
conActiveSessions.labelActiveSessions.Text = "Er zijn geen actieve sessies."; conActiveSessions.labelActiveSessions.Text = "Er zijn geen actieve sessies.";
} }
/*
str += client.Value + ", ";
MainClient.StartNewCLient(client.Value, client.Key);
conActiveSessions.data.Rows.Add(client.Value, client.Key);
//conActiveSessions.labelActiveSessions.Text = str;
Console.WriteLine(str);
*/
} }
private void BtnSessionLibrary_Click(object sender, EventArgs e) private void BtnSessionLibrary_Click(object sender, EventArgs e)