Added Login screen
-"empty" buttons
This commit is contained in:
@@ -9,6 +9,7 @@ namespace ErgometerDoctorApplication
|
||||
{
|
||||
public class ConActiveSessions : Panel
|
||||
{
|
||||
|
||||
public ConActiveSessions() : base()
|
||||
{
|
||||
//
|
||||
@@ -20,7 +21,6 @@ namespace ErgometerDoctorApplication
|
||||
this.Size = new System.Drawing.Size(584, 459);
|
||||
this.TabIndex = 0;
|
||||
|
||||
this.BackColor = System.Drawing.Color.Green;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,91 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows.Forms;
|
||||
|
||||
namespace ErgometerDoctorApplication
|
||||
{
|
||||
public class ConPanelLogin:Panel
|
||||
{
|
||||
|
||||
MainWindow mainWindow;
|
||||
|
||||
public ConPanelLogin(Form mainWindow) : base()
|
||||
{
|
||||
this.mainWindow = (MainWindow)mainWindow;
|
||||
this.textBoxPassword = new System.Windows.Forms.TextBox();
|
||||
this.pictureBox1 = new System.Windows.Forms.PictureBox();
|
||||
this.buttonLogin = new System.Windows.Forms.Button();
|
||||
this.labelPassword = new System.Windows.Forms.Label();
|
||||
((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).BeginInit();
|
||||
//
|
||||
// Container
|
||||
//
|
||||
this.BackColor = System.Drawing.Color.White;
|
||||
this.Controls.Add(this.labelPassword);
|
||||
this.Controls.Add(this.buttonLogin);
|
||||
this.Controls.Add(this.pictureBox1);
|
||||
this.Controls.Add(this.textBoxPassword);
|
||||
this.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.Location = new System.Drawing.Point(0, 0);
|
||||
//
|
||||
// textBoxPassword
|
||||
//
|
||||
this.textBoxPassword.Anchor = System.Windows.Forms.AnchorStyles.None;
|
||||
this.textBoxPassword.Location = new System.Drawing.Point(15, 70);
|
||||
this.textBoxPassword.Name = "textBoxPassword";
|
||||
this.textBoxPassword.Size = new System.Drawing.Size(150, 20);
|
||||
this.textBoxPassword.TabIndex = 0;
|
||||
//
|
||||
// pictureBox1
|
||||
//
|
||||
this.pictureBox1.Image = ((System.Drawing.Image)Properties.Resources.imageDoctor);
|
||||
this.pictureBox1.Anchor = System.Windows.Forms.AnchorStyles.None;
|
||||
this.pictureBox1.Location = new System.Drawing.Point(0, -150);
|
||||
this.pictureBox1.Name = "pictureBox1";
|
||||
this.pictureBox1.Size = new System.Drawing.Size(175, 175);
|
||||
this.pictureBox1.SizeMode = System.Windows.Forms.PictureBoxSizeMode.StretchImage;
|
||||
|
||||
//
|
||||
// buttonLogin
|
||||
//
|
||||
this.buttonLogin.Anchor = System.Windows.Forms.AnchorStyles.None;
|
||||
this.buttonLogin.BackColor = System.Drawing.SystemColors.Highlight;
|
||||
this.buttonLogin.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
|
||||
this.buttonLogin.Font = new System.Drawing.Font("Segoe UI Semibold", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.buttonLogin.ForeColor = System.Drawing.Color.White;
|
||||
this.buttonLogin.Location = new System.Drawing.Point(15, 105);
|
||||
this.buttonLogin.Name = "buttonLogin";
|
||||
this.buttonLogin.Size = new System.Drawing.Size(150, 30);
|
||||
this.buttonLogin.TabIndex = 2;
|
||||
this.buttonLogin.Text = "Log In";
|
||||
this.buttonLogin.UseVisualStyleBackColor = false;
|
||||
this.buttonLogin.Click += new System.EventHandler(this.buttonLogin_Click);
|
||||
//
|
||||
// labelPassword
|
||||
//
|
||||
this.labelPassword.Anchor = System.Windows.Forms.AnchorStyles.None;
|
||||
this.labelPassword.AutoSize = true;
|
||||
this.labelPassword.Font = new System.Drawing.Font("Segoe UI Semibold", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.labelPassword.Location = new System.Drawing.Point(11, 40);
|
||||
this.labelPassword.Name = "labelPassword";
|
||||
this.labelPassword.Size = new System.Drawing.Size(103, 21);
|
||||
this.labelPassword.TabIndex = 3;
|
||||
this.labelPassword.Text = "Wachtwoord";
|
||||
((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).EndInit();
|
||||
|
||||
}
|
||||
|
||||
private void buttonLogin_Click(object sender, EventArgs e)
|
||||
{
|
||||
mainWindow.validateLogin();
|
||||
}
|
||||
public System.Windows.Forms.TextBox textBoxPassword;
|
||||
private PictureBox pictureBox1;
|
||||
private System.Windows.Forms.Button buttonLogin;
|
||||
private System.Windows.Forms.Label labelPassword;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -49,6 +49,9 @@
|
||||
<Compile Include="ConClientData.cs">
|
||||
<SubType>Component</SubType>
|
||||
</Compile>
|
||||
<Compile Include="ConPanelLogin.cs">
|
||||
<SubType>Component</SubType>
|
||||
</Compile>
|
||||
<Compile Include="ConSessionHistory.cs">
|
||||
<SubType>Component</SubType>
|
||||
</Compile>
|
||||
@@ -77,6 +80,7 @@
|
||||
<Compile Include="Properties\Resources.Designer.cs">
|
||||
<AutoGen>True</AutoGen>
|
||||
<DependentUpon>Resources.resx</DependentUpon>
|
||||
<DesignTime>True</DesignTime>
|
||||
</Compile>
|
||||
<None Include="Properties\Settings.settings">
|
||||
<Generator>SettingsSingleFileGenerator</Generator>
|
||||
@@ -91,6 +95,9 @@
|
||||
<ItemGroup>
|
||||
<None Include="App.config" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="Resources\doctorImage.png" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
|
||||
Other similar extension points exist, see Microsoft.Common.targets.
|
||||
|
||||
+30
-21
@@ -31,6 +31,7 @@ namespace ErgometerDoctorApplication
|
||||
private void InitializeComponent()
|
||||
{
|
||||
this.MenuPanel = new System.Windows.Forms.Panel();
|
||||
this.BtnLogout = new System.Windows.Forms.Button();
|
||||
this.BtnSessionLibrary = new System.Windows.Forms.Button();
|
||||
this.BtnSessionHistory = new System.Windows.Forms.Button();
|
||||
this.label2 = new System.Windows.Forms.Label();
|
||||
@@ -46,19 +47,20 @@ namespace ErgometerDoctorApplication
|
||||
this.HeaderLabel = new System.Windows.Forms.Label();
|
||||
this.panel3 = new System.Windows.Forms.Panel();
|
||||
this.MainContainer = new System.Windows.Forms.Panel();
|
||||
this.conActiveSessions = new ConActiveSessions();
|
||||
this.conSessionHistory = new ConSessionHistory();
|
||||
this.conClientData = new ConClientData();
|
||||
this.conSessionLibrary = new ConSessionLibrary();
|
||||
this.MenuPanel.SuspendLayout();
|
||||
this.menuStrip1.SuspendLayout();
|
||||
this.panel1.SuspendLayout();
|
||||
this.MainContainer.SuspendLayout();
|
||||
this.SuspendLayout();
|
||||
this.conActiveSessions = new ErgometerDoctorApplication.ConActiveSessions();
|
||||
this.conClientData = new ErgometerDoctorApplication.ConClientData();
|
||||
this.conSessionHistory = new ErgometerDoctorApplication.ConSessionHistory();
|
||||
this.conSessionLibrary = new ErgometerDoctorApplication.ConSessionLibrary();
|
||||
this.conPanelLogin = new ErgometerDoctorApplication.ConPanelLogin(this);
|
||||
MainContainer.Visible = false;
|
||||
panel1.Visible = false;
|
||||
MenuPanel.Visible = false;
|
||||
menuStrip1.Visible = false;
|
||||
//
|
||||
// MenuPanel
|
||||
//
|
||||
this.MenuPanel.BackColor = System.Drawing.SystemColors.ControlLight;
|
||||
this.MenuPanel.Controls.Add(this.BtnLogout);
|
||||
this.MenuPanel.Controls.Add(this.BtnSessionLibrary);
|
||||
this.MenuPanel.Controls.Add(this.BtnSessionHistory);
|
||||
this.MenuPanel.Controls.Add(this.label2);
|
||||
@@ -72,6 +74,21 @@ namespace ErgometerDoctorApplication
|
||||
this.MenuPanel.Name = "MenuPanel";
|
||||
this.MenuPanel.Size = new System.Drawing.Size(200, 537);
|
||||
this.MenuPanel.TabIndex = 0;
|
||||
|
||||
//
|
||||
// BtnLogout
|
||||
//
|
||||
this.BtnLogout.BackColor = System.Drawing.Color.DarkGray;
|
||||
this.BtnLogout.Dock = System.Windows.Forms.DockStyle.Bottom;
|
||||
this.BtnLogout.FlatAppearance.BorderSize = 0;
|
||||
this.BtnLogout.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
|
||||
this.BtnLogout.ForeColor = System.Drawing.Color.White;
|
||||
this.BtnLogout.Location = new System.Drawing.Point(0, 205);
|
||||
this.BtnLogout.Name = "BtnLogout";
|
||||
this.BtnLogout.Size = new System.Drawing.Size(200, 35);
|
||||
this.BtnLogout.Text = "Uitloggen";
|
||||
this.BtnLogout.UseVisualStyleBackColor = false;
|
||||
this.BtnLogout.Click += new System.EventHandler(this.buttonLogout_Click);
|
||||
//
|
||||
// BtnSessionLibrary
|
||||
//
|
||||
@@ -235,15 +252,10 @@ namespace ErgometerDoctorApplication
|
||||
//
|
||||
// MainContainer
|
||||
//
|
||||
|
||||
// First panel added gets priority
|
||||
this.MainContainer.Controls.Add(this.conActiveSessions);
|
||||
this.MainContainer.Controls.Add(this.conClientData);
|
||||
this.MainContainer.Controls.Add(this.conSessionHistory);
|
||||
this.MainContainer.Controls.Add(this.conSessionLibrary);
|
||||
|
||||
|
||||
|
||||
this.MainContainer.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.MainContainer.Location = new System.Drawing.Point(200, 102);
|
||||
this.MainContainer.Name = "MainContainer";
|
||||
@@ -259,17 +271,11 @@ namespace ErgometerDoctorApplication
|
||||
this.Controls.Add(this.panel1);
|
||||
this.Controls.Add(this.MenuPanel);
|
||||
this.Controls.Add(this.menuStrip1);
|
||||
this.Controls.Add(this.conPanelLogin);
|
||||
this.MainMenuStrip = this.menuStrip1;
|
||||
this.Name = "MainWindow";
|
||||
this.Text = "Dokter applicatie";
|
||||
this.WindowState = System.Windows.Forms.FormWindowState.Maximized;
|
||||
this.MenuPanel.ResumeLayout(false);
|
||||
this.menuStrip1.ResumeLayout(false);
|
||||
this.menuStrip1.PerformLayout();
|
||||
this.panel1.ResumeLayout(false);
|
||||
this.MainContainer.ResumeLayout(false);
|
||||
this.ResumeLayout(false);
|
||||
this.PerformLayout();
|
||||
|
||||
}
|
||||
|
||||
@@ -284,6 +290,7 @@ namespace ErgometerDoctorApplication
|
||||
private ToolStripMenuItem viewToolStripMenuItem;
|
||||
private Button BtnActiveSessions;
|
||||
private Button BtnSessionLibrary;
|
||||
private Button BtnLogout;
|
||||
private Button BtnSessionHistory;
|
||||
private Button BtnClientData;
|
||||
private Label label2;
|
||||
@@ -296,6 +303,8 @@ namespace ErgometerDoctorApplication
|
||||
public ConSessionHistory conSessionHistory;
|
||||
public ConClientData conClientData;
|
||||
public ConSessionLibrary conSessionLibrary;
|
||||
public ConPanelLogin conPanelLogin;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -15,42 +15,49 @@ namespace ErgometerDoctorApplication
|
||||
public MainWindow()
|
||||
{
|
||||
InitializeComponent();
|
||||
conPanelLogin.BringToFront();
|
||||
}
|
||||
|
||||
private void BtnActiveSessions_Click(object sender, EventArgs e)
|
||||
{
|
||||
this.HeaderLabel.Text = "Actieve Sessies";
|
||||
conActiveSessions.Visible = true;
|
||||
conClientData.Visible = false;
|
||||
conSessionHistory.Visible = false;
|
||||
conSessionLibrary.Visible = false;
|
||||
conActiveSessions.BringToFront();
|
||||
}
|
||||
|
||||
private void BtnSessionLibrary_Click(object sender, EventArgs e)
|
||||
{
|
||||
this.HeaderLabel.Text = "Bibliotheek";
|
||||
conActiveSessions.Visible = false;
|
||||
conClientData.Visible = false;
|
||||
conSessionHistory.Visible = false;
|
||||
conSessionLibrary.Visible = true;
|
||||
conSessionLibrary.BringToFront();
|
||||
}
|
||||
|
||||
private void BtnClientData_Click(object sender, EventArgs e)
|
||||
{
|
||||
this.HeaderLabel.Text = "Clientenbestand";
|
||||
conActiveSessions.Visible = false;
|
||||
conClientData.Visible = true;
|
||||
conSessionHistory.Visible = false;
|
||||
conSessionLibrary.Visible = false;
|
||||
conClientData.BringToFront();
|
||||
}
|
||||
|
||||
private void BtnSessionHistory_Click(object sender, EventArgs e)
|
||||
{
|
||||
this.HeaderLabel.Text = "Sessie geschiedenis";
|
||||
conActiveSessions.Visible = false;
|
||||
conClientData.Visible = false;
|
||||
conSessionHistory.Visible = true;
|
||||
conSessionLibrary.Visible = false;
|
||||
conSessionHistory.BringToFront();
|
||||
}
|
||||
public void validateLogin()
|
||||
{
|
||||
conPanelLogin.Visible = false;
|
||||
MainContainer.Visible = true;
|
||||
panel1.Visible = true;
|
||||
MenuPanel.Visible = true;
|
||||
menuStrip1.Visible = true;
|
||||
}
|
||||
|
||||
private void buttonLogout_Click(object sender, EventArgs e)
|
||||
{
|
||||
MainContainer.Visible = false;
|
||||
panel1.Visible = false;
|
||||
MenuPanel.Visible = false;
|
||||
menuStrip1.Visible = false;
|
||||
conPanelLogin.Visible = true;
|
||||
conPanelLogin.BringToFront();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+28
-26
@@ -1,17 +1,17 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
// Runtime Version:4.0.30319.42000
|
||||
// Runtime Version:4.0.30319.0
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace ErgometerDoctorApplication.Properties
|
||||
{
|
||||
|
||||
|
||||
namespace ErgometerDoctorApplication.Properties {
|
||||
using System;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// A strongly-typed resource class, for looking up localized strings, etc.
|
||||
/// </summary>
|
||||
@@ -22,50 +22,52 @@ namespace ErgometerDoctorApplication.Properties
|
||||
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")]
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
|
||||
internal class Resources
|
||||
{
|
||||
|
||||
internal class Resources {
|
||||
|
||||
private static global::System.Resources.ResourceManager resourceMan;
|
||||
|
||||
|
||||
private static global::System.Globalization.CultureInfo resourceCulture;
|
||||
|
||||
|
||||
[global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
|
||||
internal Resources()
|
||||
{
|
||||
internal Resources() {
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Returns the cached ResourceManager instance used by this class.
|
||||
/// </summary>
|
||||
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
|
||||
internal static global::System.Resources.ResourceManager ResourceManager
|
||||
{
|
||||
get
|
||||
{
|
||||
if ((resourceMan == null))
|
||||
{
|
||||
internal static global::System.Resources.ResourceManager ResourceManager {
|
||||
get {
|
||||
if (object.ReferenceEquals(resourceMan, null)) {
|
||||
global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("ErgometerDoctorApplication.Properties.Resources", typeof(Resources).Assembly);
|
||||
resourceMan = temp;
|
||||
}
|
||||
return resourceMan;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Overrides the current thread's CurrentUICulture property for all
|
||||
/// resource lookups using this strongly typed resource class.
|
||||
/// </summary>
|
||||
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
|
||||
internal static global::System.Globalization.CultureInfo Culture
|
||||
{
|
||||
get
|
||||
{
|
||||
internal static global::System.Globalization.CultureInfo Culture {
|
||||
get {
|
||||
return resourceCulture;
|
||||
}
|
||||
set
|
||||
{
|
||||
set {
|
||||
resourceCulture = value;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized resource of type System.Drawing.Bitmap.
|
||||
/// </summary>
|
||||
internal static System.Drawing.Bitmap imageDoctor {
|
||||
get {
|
||||
object obj = ResourceManager.GetObject("imageDoctor", resourceCulture);
|
||||
return ((System.Drawing.Bitmap)(obj));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -46,7 +46,7 @@
|
||||
|
||||
mimetype: application/x-microsoft.net.object.binary.base64
|
||||
value : The object must be serialized with
|
||||
: System.Serialization.Formatters.Binary.BinaryFormatter
|
||||
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.soap.base64
|
||||
@@ -60,6 +60,7 @@
|
||||
: and then encoded with base64 encoding.
|
||||
-->
|
||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||
<xsd:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
@@ -68,9 +69,10 @@
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="assembly">
|
||||
@@ -85,9 +87,10 @@
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="resheader">
|
||||
@@ -109,9 +112,13 @@
|
||||
<value>2.0</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<assembly alias="System.Windows.Forms" name="System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
|
||||
<data name="imageDoctor" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\doctorImage.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
</root>
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 11 KiB |
Reference in New Issue
Block a user