Started session window
This commit is contained in:
@@ -0,0 +1,63 @@
|
||||
###############################################################################
|
||||
# Set default behavior to automatically normalize line endings.
|
||||
###############################################################################
|
||||
* text=auto
|
||||
|
||||
###############################################################################
|
||||
# Set default behavior for command prompt diff.
|
||||
#
|
||||
# This is need for earlier builds of msysgit that does not have it on by
|
||||
# default for csharp files.
|
||||
# Note: This is only used by command line
|
||||
###############################################################################
|
||||
#*.cs diff=csharp
|
||||
|
||||
###############################################################################
|
||||
# Set the merge driver for project and solution files
|
||||
#
|
||||
# Merging from the command prompt will add diff markers to the files if there
|
||||
# are conflicts (Merging from VS is not affected by the settings below, in VS
|
||||
# the diff markers are never inserted). Diff markers may cause the following
|
||||
# file extensions to fail to load in VS. An alternative would be to treat
|
||||
# these files as binary and thus will always conflict and require user
|
||||
# intervention with every merge. To do so, just uncomment the entries below
|
||||
###############################################################################
|
||||
#*.sln merge=binary
|
||||
#*.csproj merge=binary
|
||||
#*.vbproj merge=binary
|
||||
#*.vcxproj merge=binary
|
||||
#*.vcproj merge=binary
|
||||
#*.dbproj merge=binary
|
||||
#*.fsproj merge=binary
|
||||
#*.lsproj merge=binary
|
||||
#*.wixproj merge=binary
|
||||
#*.modelproj merge=binary
|
||||
#*.sqlproj merge=binary
|
||||
#*.wwaproj merge=binary
|
||||
|
||||
###############################################################################
|
||||
# behavior for image files
|
||||
#
|
||||
# image files are treated as binary by default.
|
||||
###############################################################################
|
||||
#*.jpg binary
|
||||
#*.png binary
|
||||
#*.gif binary
|
||||
|
||||
###############################################################################
|
||||
# diff behavior for common document formats
|
||||
#
|
||||
# Convert binary document formats to text before diffing them. This feature
|
||||
# is only available from the command line. Turn it on by uncommenting the
|
||||
# entries below.
|
||||
###############################################################################
|
||||
#*.doc diff=astextplain
|
||||
#*.DOC diff=astextplain
|
||||
#*.docx diff=astextplain
|
||||
#*.DOCX diff=astextplain
|
||||
#*.dot diff=astextplain
|
||||
#*.DOT diff=astextplain
|
||||
#*.pdf diff=astextplain
|
||||
#*.PDF diff=astextplain
|
||||
#*.rtf diff=astextplain
|
||||
#*.RTF diff=astextplain
|
||||
@@ -34,7 +34,7 @@
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="ErgometerLibrary">
|
||||
<HintPath>..\..\..\ErgometerLibrary\ErgometerLibrary\ErgometerLibrary\bin\Debug\ErgometerLibrary.dll</HintPath>
|
||||
<HintPath>..\..\ErgometerLibrary\ErgometerLibrary\obj\Debug\ErgometerLibrary.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System" />
|
||||
<Reference Include="System.Core" />
|
||||
@@ -49,6 +49,12 @@
|
||||
<Reference Include="System.Xml" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="SessionWindow.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Include="SessionWindow.Designer.cs">
|
||||
<DependentUpon>SessionWindow.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="ConClientData.cs">
|
||||
<SubType>Component</SubType>
|
||||
</Compile>
|
||||
@@ -64,12 +70,6 @@
|
||||
<Compile Include="ConSessionLibrary.cs">
|
||||
<SubType>Component</SubType>
|
||||
</Compile>
|
||||
<Compile Include="LoginWindow.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Include="LoginWindow.Designer.cs">
|
||||
<DependentUpon>LoginWindow.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="MainClient.cs" />
|
||||
<Compile Include="MainWindow.cs">
|
||||
<SubType>Form</SubType>
|
||||
@@ -79,9 +79,6 @@
|
||||
</Compile>
|
||||
<Compile Include="Program.cs" />
|
||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||
<EmbeddedResource Include="LoginWindow.resx">
|
||||
<DependentUpon>LoginWindow.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="MainWindow.resx">
|
||||
<DependentUpon>MainWindow.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
@@ -95,6 +92,9 @@
|
||||
<DependentUpon>Resources.resx</DependentUpon>
|
||||
<DesignTime>True</DesignTime>
|
||||
</Compile>
|
||||
<EmbeddedResource Include="SessionWindow.resx">
|
||||
<DependentUpon>SessionWindow.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<None Include="Properties\Settings.settings">
|
||||
<Generator>SettingsSingleFileGenerator</Generator>
|
||||
<LastGenOutput>Settings.Designer.cs</LastGenOutput>
|
||||
|
||||
-71
@@ -1,71 +0,0 @@
|
||||
namespace ErgometerDoctorApplication
|
||||
{
|
||||
partial class LoginWindow
|
||||
{
|
||||
/// <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);
|
||||
}
|
||||
|
||||
#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.LoginButton = new System.Windows.Forms.Button();
|
||||
this.PasswordTextBox = new System.Windows.Forms.TextBox();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// LoginButton
|
||||
//
|
||||
this.LoginButton.Location = new System.Drawing.Point(197, 12);
|
||||
this.LoginButton.Name = "LoginButton";
|
||||
this.LoginButton.Size = new System.Drawing.Size(75, 23);
|
||||
this.LoginButton.TabIndex = 0;
|
||||
this.LoginButton.Text = "Login";
|
||||
this.LoginButton.UseVisualStyleBackColor = true;
|
||||
this.LoginButton.Click += new System.EventHandler(this.LoginButton_Click);
|
||||
//
|
||||
// PasswordTextBox
|
||||
//
|
||||
this.PasswordTextBox.Location = new System.Drawing.Point(13, 13);
|
||||
this.PasswordTextBox.Name = "PasswordTextBox";
|
||||
this.PasswordTextBox.Size = new System.Drawing.Size(178, 20);
|
||||
this.PasswordTextBox.TabIndex = 1;
|
||||
//
|
||||
// LoginWindow
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.ClientSize = new System.Drawing.Size(284, 53);
|
||||
this.Controls.Add(this.PasswordTextBox);
|
||||
this.Controls.Add(this.LoginButton);
|
||||
this.Name = "LoginWindow";
|
||||
this.Text = "LoginWindow";
|
||||
this.ResumeLayout(false);
|
||||
this.PerformLayout();
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
private System.Windows.Forms.Button LoginButton;
|
||||
private System.Windows.Forms.TextBox PasswordTextBox;
|
||||
}
|
||||
}
|
||||
@@ -1,33 +0,0 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Data;
|
||||
using System.Drawing;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows.Forms;
|
||||
|
||||
namespace ErgometerDoctorApplication
|
||||
{
|
||||
public partial class LoginWindow : Form
|
||||
{
|
||||
public LoginWindow()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
|
||||
private void LoginButton_Click(object sender, EventArgs e)
|
||||
{
|
||||
if(MainClient.Connect(PasswordTextBox.Text))
|
||||
{
|
||||
PasswordTextBox.BackColor = System.Drawing.SystemColors.Window;
|
||||
Close();
|
||||
}
|
||||
else
|
||||
{
|
||||
PasswordTextBox.BackColor = Color.Red;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -42,6 +42,18 @@ namespace ErgometerDoctorApplication
|
||||
conSessionHistory.BringToFront();
|
||||
}
|
||||
public void validateLogin()
|
||||
{
|
||||
//enter login details
|
||||
showDashboard();
|
||||
}
|
||||
|
||||
private void buttonLogout_Click(object sender, EventArgs e)
|
||||
{
|
||||
//logout
|
||||
showLoginScreen();
|
||||
}
|
||||
|
||||
private void showDashboard()
|
||||
{
|
||||
conPanelLogin.Visible = false;
|
||||
MainContainer.Visible = true;
|
||||
@@ -50,7 +62,7 @@ namespace ErgometerDoctorApplication
|
||||
menuStrip1.Visible = true;
|
||||
}
|
||||
|
||||
private void buttonLogout_Click(object sender, EventArgs e)
|
||||
private void showLoginScreen()
|
||||
{
|
||||
MainContainer.Visible = false;
|
||||
panel1.Visible = false;
|
||||
|
||||
@@ -0,0 +1,60 @@
|
||||
using System;
|
||||
|
||||
namespace ErgometerDoctorApplication
|
||||
{
|
||||
partial class SessionWindow
|
||||
{
|
||||
/// <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);
|
||||
}
|
||||
|
||||
#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.SuspendLayout();
|
||||
//
|
||||
// SessionWindow
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.ClientSize = new System.Drawing.Size(784, 561);
|
||||
this.Name = "SessionWindow";
|
||||
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
|
||||
this.ResumeLayout(false);
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
private void createTitle()
|
||||
{
|
||||
if (ActiveSession)
|
||||
{
|
||||
this.Text = "Actieve Sessie: " + ClientName;
|
||||
}
|
||||
else
|
||||
{
|
||||
this.Text = "Afgelopen Sessie: " + ClientName;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,25 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Data;
|
||||
using System.Drawing;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows.Forms;
|
||||
|
||||
namespace ErgometerDoctorApplication
|
||||
{
|
||||
public partial class SessionWindow : Form
|
||||
{
|
||||
|
||||
private bool ActiveSession { get; }
|
||||
private string ClientName { get; set; }
|
||||
public SessionWindow(string ClientName, bool ActiveSession)
|
||||
{
|
||||
this.ActiveSession = ActiveSession;
|
||||
this.ClientName = ClientName;
|
||||
InitializeComponent();
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user