add initial appointmentsmanager

This commit is contained in:
2023-01-10 06:33:15 +01:00
parent 3af79affe4
commit 17a4c4edb0
24 changed files with 1737 additions and 0 deletions

View File

@@ -0,0 +1,29 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>WinExe</OutputType>
<TargetFramework>net5.0-windows</TargetFramework>
<Nullable>enable</Nullable>
<UseWindowsForms>true</UseWindowsForms>
</PropertyGroup>
<ItemGroup>
<ProjectReference Include="..\AppointmentsLib\AppointmentsLib.csproj" />
</ItemGroup>
<ItemGroup>
<Compile Update="Properties\Resources.Designer.cs">
<DesignTime>True</DesignTime>
<AutoGen>True</AutoGen>
<DependentUpon>Resources.resx</DependentUpon>
</Compile>
</ItemGroup>
<ItemGroup>
<EmbeddedResource Update="Properties\Resources.resx">
<Generator>ResXFileCodeGenerator</Generator>
<LastGenOutput>Resources.Designer.cs</LastGenOutput>
</EmbeddedResource>
</ItemGroup>
</Project>

View File

@@ -0,0 +1,230 @@
namespace AppointmentsUi
{
partial class MainForm
{
/// <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()
{
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(MainForm));
this.toolstrip = new System.Windows.Forms.ToolStrip();
this.tooltipAppointsmentsButton = new System.Windows.Forms.ToolStripSplitButton();
this.toolstripAppointsmentsAddNewButton = new System.Windows.Forms.ToolStripMenuItem();
this.toolstripContactsButton = new System.Windows.Forms.ToolStripSplitButton();
this.toolstripContactsAddNewButton = new System.Windows.Forms.ToolStripMenuItem();
this.toolstripCompaniesButton = new System.Windows.Forms.ToolStripSplitButton();
this.toolstripCompaniesAddNewButton = new System.Windows.Forms.ToolStripMenuItem();
this.toolStripSplitButton1 = new System.Windows.Forms.ToolStripSplitButton();
this.toolStripMenuItem1 = new System.Windows.Forms.ToolStripMenuItem();
this.toolstripSalutationsButton = new System.Windows.Forms.ToolStripSplitButton();
this.toolstripSalutationsAddNewButton = new System.Windows.Forms.ToolStripMenuItem();
this.toolstripPostalsButton = new System.Windows.Forms.ToolStripSplitButton();
this.toolstripPostalsAddNewButton = new System.Windows.Forms.ToolStripMenuItem();
this.toolstripAboutButton = new System.Windows.Forms.ToolStripButton();
this.embeddingContainer = new System.Windows.Forms.Panel();
this.toolstrip.SuspendLayout();
this.SuspendLayout();
//
// toolstrip
//
this.toolstrip.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.tooltipAppointsmentsButton,
this.toolstripContactsButton,
this.toolstripCompaniesButton,
this.toolStripSplitButton1,
this.toolstripSalutationsButton,
this.toolstripPostalsButton,
this.toolstripAboutButton});
this.toolstrip.Location = new System.Drawing.Point(0, 0);
this.toolstrip.Name = "toolstrip";
this.toolstrip.Size = new System.Drawing.Size(800, 25);
this.toolstrip.TabIndex = 0;
this.toolstrip.Text = "toolstrip";
//
// tooltipAppointsmentsButton
//
this.tooltipAppointsmentsButton.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Text;
this.tooltipAppointsmentsButton.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.toolstripAppointsmentsAddNewButton});
this.tooltipAppointsmentsButton.Image = ((System.Drawing.Image)(resources.GetObject("tooltipAppointsmentsButton.Image")));
this.tooltipAppointsmentsButton.ImageTransparentColor = System.Drawing.Color.Magenta;
this.tooltipAppointsmentsButton.Name = "tooltipAppointsmentsButton";
this.tooltipAppointsmentsButton.Size = new System.Drawing.Size(99, 22);
this.tooltipAppointsmentsButton.Text = "Appointments";
this.tooltipAppointsmentsButton.ButtonClick += new System.EventHandler(this.tooltipAppointsmentsButton_ButtonClick);
//
// toolstripAppointsmentsAddNewButton
//
this.toolstripAppointsmentsAddNewButton.Name = "toolstripAppointsmentsAddNewButton";
this.toolstripAppointsmentsAddNewButton.Size = new System.Drawing.Size(121, 22);
this.toolstripAppointsmentsAddNewButton.Text = "Add new";
this.toolstripAppointsmentsAddNewButton.Click += new System.EventHandler(this.toolstripAppointsmentsAddNewButton_Click);
//
// toolstripContactsButton
//
this.toolstripContactsButton.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Text;
this.toolstripContactsButton.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.toolstripContactsAddNewButton});
this.toolstripContactsButton.Image = ((System.Drawing.Image)(resources.GetObject("toolstripContactsButton.Image")));
this.toolstripContactsButton.ImageTransparentColor = System.Drawing.Color.Magenta;
this.toolstripContactsButton.Name = "toolstripContactsButton";
this.toolstripContactsButton.Size = new System.Drawing.Size(70, 22);
this.toolstripContactsButton.Text = "Contacts";
this.toolstripContactsButton.ButtonClick += new System.EventHandler(this.toolstripContactsButton_ButtonClick);
//
// toolstripContactsAddNewButton
//
this.toolstripContactsAddNewButton.Name = "toolstripContactsAddNewButton";
this.toolstripContactsAddNewButton.Size = new System.Drawing.Size(121, 22);
this.toolstripContactsAddNewButton.Text = "Add new";
this.toolstripContactsAddNewButton.Click += new System.EventHandler(this.toolstripContactsAddNewButton_Click);
//
// toolstripCompaniesButton
//
this.toolstripCompaniesButton.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Text;
this.toolstripCompaniesButton.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.toolstripCompaniesAddNewButton});
this.toolstripCompaniesButton.Image = ((System.Drawing.Image)(resources.GetObject("toolstripCompaniesButton.Image")));
this.toolstripCompaniesButton.ImageTransparentColor = System.Drawing.Color.Magenta;
this.toolstripCompaniesButton.Name = "toolstripCompaniesButton";
this.toolstripCompaniesButton.Size = new System.Drawing.Size(83, 22);
this.toolstripCompaniesButton.Text = "Companies";
this.toolstripCompaniesButton.ButtonClick += new System.EventHandler(this.toolstripCompaniesButton_ButtonClick);
//
// toolstripCompaniesAddNewButton
//
this.toolstripCompaniesAddNewButton.Name = "toolstripCompaniesAddNewButton";
this.toolstripCompaniesAddNewButton.Size = new System.Drawing.Size(180, 22);
this.toolstripCompaniesAddNewButton.Text = "Add new";
//
// toolStripSplitButton1
//
this.toolStripSplitButton1.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Text;
this.toolStripSplitButton1.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.toolStripMenuItem1});
this.toolStripSplitButton1.Image = ((System.Drawing.Image)(resources.GetObject("toolStripSplitButton1.Image")));
this.toolStripSplitButton1.ImageTransparentColor = System.Drawing.Color.Magenta;
this.toolStripSplitButton1.Name = "toolStripSplitButton1";
this.toolStripSplitButton1.Size = new System.Drawing.Size(86, 22);
this.toolStripSplitButton1.Text = "PhoneTypes";
//
// toolStripMenuItem1
//
this.toolStripMenuItem1.Name = "toolStripMenuItem1";
this.toolStripMenuItem1.Size = new System.Drawing.Size(121, 22);
this.toolStripMenuItem1.Text = "Add new";
//
// toolstripSalutationsButton
//
this.toolstripSalutationsButton.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Text;
this.toolstripSalutationsButton.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.toolstripSalutationsAddNewButton});
this.toolstripSalutationsButton.Image = ((System.Drawing.Image)(resources.GetObject("toolstripSalutationsButton.Image")));
this.toolstripSalutationsButton.ImageTransparentColor = System.Drawing.Color.Magenta;
this.toolstripSalutationsButton.Name = "toolstripSalutationsButton";
this.toolstripSalutationsButton.Size = new System.Drawing.Size(81, 22);
this.toolstripSalutationsButton.Text = "Salutations";
//
// toolstripSalutationsAddNewButton
//
this.toolstripSalutationsAddNewButton.Name = "toolstripSalutationsAddNewButton";
this.toolstripSalutationsAddNewButton.Size = new System.Drawing.Size(121, 22);
this.toolstripSalutationsAddNewButton.Text = "Add new";
//
// toolstripPostalsButton
//
this.toolstripPostalsButton.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Text;
this.toolstripPostalsButton.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.toolstripPostalsAddNewButton});
this.toolstripPostalsButton.Image = ((System.Drawing.Image)(resources.GetObject("toolstripPostalsButton.Image")));
this.toolstripPostalsButton.ImageTransparentColor = System.Drawing.Color.Magenta;
this.toolstripPostalsButton.Name = "toolstripPostalsButton";
this.toolstripPostalsButton.Size = new System.Drawing.Size(60, 22);
this.toolstripPostalsButton.Text = "Postals";
//
// toolstripPostalsAddNewButton
//
this.toolstripPostalsAddNewButton.Name = "toolstripPostalsAddNewButton";
this.toolstripPostalsAddNewButton.Size = new System.Drawing.Size(121, 22);
this.toolstripPostalsAddNewButton.Text = "Add new";
//
// toolstripAboutButton
//
this.toolstripAboutButton.Alignment = System.Windows.Forms.ToolStripItemAlignment.Right;
this.toolstripAboutButton.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Text;
this.toolstripAboutButton.Image = ((System.Drawing.Image)(resources.GetObject("toolstripAboutButton.Image")));
this.toolstripAboutButton.ImageTransparentColor = System.Drawing.Color.Magenta;
this.toolstripAboutButton.Name = "toolstripAboutButton";
this.toolstripAboutButton.Size = new System.Drawing.Size(44, 22);
this.toolstripAboutButton.Text = "About";
this.toolstripAboutButton.Click += new System.EventHandler(this.toolstripAboutButton_Click);
//
// embeddingContainer
//
this.embeddingContainer.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.embeddingContainer.BackColor = System.Drawing.SystemColors.Control;
this.embeddingContainer.Location = new System.Drawing.Point(12, 28);
this.embeddingContainer.Name = "embeddingContainer";
this.embeddingContainer.Size = new System.Drawing.Size(776, 410);
this.embeddingContainer.TabIndex = 1;
//
// MainForm
//
this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 15F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(800, 450);
this.Controls.Add(this.embeddingContainer);
this.Controls.Add(this.toolstrip);
this.Name = "MainForm";
this.Text = "AppointmentsUi";
this.toolstrip.ResumeLayout(false);
this.toolstrip.PerformLayout();
this.ResumeLayout(false);
this.PerformLayout();
}
#endregion
private System.Windows.Forms.ToolStrip toolstrip;
private System.Windows.Forms.ToolStripSplitButton tooltipAppointsmentsButton;
private System.Windows.Forms.ToolStripMenuItem toolstripAppointsmentsAddNewButton;
private System.Windows.Forms.ToolStripSplitButton toolstripContactsButton;
private System.Windows.Forms.ToolStripMenuItem toolstripContactsAddNewButton;
private System.Windows.Forms.ToolStripSplitButton toolstripCompaniesButton;
private System.Windows.Forms.ToolStripMenuItem toolstripCompaniesAddNewButton;
private System.Windows.Forms.ToolStripSplitButton toolStripSplitButton1;
private System.Windows.Forms.ToolStripMenuItem toolStripMenuItem1;
private System.Windows.Forms.ToolStripSplitButton toolstripSalutationsButton;
private System.Windows.Forms.ToolStripMenuItem toolstripSalutationsAddNewButton;
private System.Windows.Forms.ToolStripSplitButton toolstripPostalsButton;
private System.Windows.Forms.ToolStripMenuItem toolstripPostalsAddNewButton;
private System.Windows.Forms.ToolStripButton toolstripAboutButton;
private System.Windows.Forms.Panel embeddingContainer;
}
}

View File

@@ -0,0 +1,60 @@
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 AppointmentsUi
{
public partial class MainForm : Form
{
public MainForm()
{
InitializeComponent();
EmbedForm<Views.EmptyPage>();
}
internal void EmbedForm<T>() where T : Form, new()
{
T embedded = new T() { TopLevel = false, TopMost = true, FormBorderStyle = FormBorderStyle.None, Dock = DockStyle.Fill, AutoSize = false, Parent = this };
embeddingContainer.Controls.Clear();
embeddingContainer.Controls.Add(embedded);
embedded.Show();
}
private void toolstripAboutButton_Click(object sender, EventArgs e)
{
MessageBox.Show("vewry guud program mehd by finno");
}
private void tooltipAppointsmentsButton_ButtonClick(object sender, EventArgs e)
{
MessageBox.Show("appointments button click");
}
private void toolstripAppointsmentsAddNewButton_Click(object sender, EventArgs e)
{
MessageBox.Show("appointments add button click");
}
private void toolstripContactsButton_ButtonClick(object sender, EventArgs e)
{
MessageBox.Show("contacts button click");
}
private void toolstripContactsAddNewButton_Click(object sender, EventArgs e)
{
MessageBox.Show("contacts add button click");
}
private void toolstripCompaniesButton_ButtonClick(object sender, EventArgs e)
{
EmbedForm<Views.CompanyList>();
}
}
}

View File

@@ -0,0 +1,127 @@
<root>
<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">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<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">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<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" 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">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<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=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<metadata name="toolstrip.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>17, 17</value>
</metadata>
<assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<data name="tooltipAppointsmentsButton.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAACRSURBVDhPY/j27dt/SjDYACcnJ7IwigEf3n8kCZNswPNb
J/+f6DYF0yA+yQac6Db5f6hWCmwIiE+mC0wIu2DS2Vf/F1x6DefjwlgNyNr34r/0wkdgTMgQDAOQNRNj
CIoBOg0rMTTDMLIhIHbriZeYBmDTiIxBGkEYxge5liQDsGGQqykyAISpZwAlmIEywMAAAAc1/Jwvt6sN
AAAAAElFTkSuQmCC
</value>
</data>
<data name="toolstripContactsButton.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAACRSURBVDhPY/j27dt/SjDYACcnJ7IwigEf3n8kCZNswPNb
J/+f6DYF0yA+yQac6Db5f6hWCmwIiE+mC0wIu2DS2Vf/F1x6DefjwlgNyNr34r/0wkdgTMgQDAOQNRNj
CIoBOg0rMTTDMLIhIHbriZeYBmDTiIxBGkEYxge5liQDsGGQqykyAISpZwAlmIEywMAAAAc1/Jwvt6sN
AAAAAElFTkSuQmCC
</value>
</data>
<data name="toolstripCompaniesButton.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAACRSURBVDhPY/j27dt/SjDYACcnJ7IwigEf3n8kCZNswPNb
J/+f6DYF0yA+yQac6Db5f6hWCmwIiE+mC0wIu2DS2Vf/F1x6DefjwlgNyNr34r/0wkdgTMgQDAOQNRNj
CIoBOg0rMTTDMLIhIHbriZeYBmDTiIxBGkEYxge5liQDsGGQqykyAISpZwAlmIEywMAAAAc1/Jwvt6sN
AAAAAElFTkSuQmCC
</value>
</data>
<data name="toolStripSplitButton1.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAACRSURBVDhPY/j27dt/SjDYACcnJ7IwigEf3n8kCZNswPNb
J/+f6DYF0yA+yQac6Db5f6hWCmwIiE+mC0wIu2DS2Vf/F1x6DefjwlgNyNr34r/0wkdgTMgQDAOQNRNj
CIoBOg0rMTTDMLIhIHbriZeYBmDTiIxBGkEYxge5liQDsGGQqykyAISpZwAlmIEywMAAAAc1/Jwvt6sN
AAAAAElFTkSuQmCC
</value>
</data>
<data name="toolstripSalutationsButton.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAACRSURBVDhPY/j27dt/SjDYACcnJ7IwigEf3n8kCZNswPNb
J/+f6DYF0yA+yQac6Db5f6hWCmwIiE+mC0wIu2DS2Vf/F1x6DefjwlgNyNr34r/0wkdgTMgQDAOQNRNj
CIoBOg0rMTTDMLIhIHbriZeYBmDTiIxBGkEYxge5liQDsGGQqykyAISpZwAlmIEywMAAAAc1/Jwvt6sN
AAAAAElFTkSuQmCC
</value>
</data>
<data name="toolstripPostalsButton.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAACRSURBVDhPY/j27dt/SjDYACcnJ7IwigEf3n8kCZNswPNb
J/+f6DYF0yA+yQac6Db5f6hWCmwIiE+mC0wIu2DS2Vf/F1x6DefjwlgNyNr34r/0wkdgTMgQDAOQNRNj
CIoBOg0rMTTDMLIhIHbriZeYBmDTiIxBGkEYxge5liQDsGGQqykyAISpZwAlmIEywMAAAAc1/Jwvt6sN
AAAAAElFTkSuQmCC
</value>
</data>
<data name="toolstripAboutButton.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAACRSURBVDhPY/j27dt/SjDYACcnJ7IwigEf3n8kCZNswPNb
J/+f6DYF0yA+yQac6Db5f6hWCmwIiE+mC0wIu2DS2Vf/F1x6DefjwlgNyNr34r/0wkdgTMgQDAOQNRNj
CIoBOg0rMTTDMLIhIHbriZeYBmDTiIxBGkEYxge5liQDsGGQqykyAISpZwAlmIEywMAAAAc1/Jwvt6sN
AAAAAElFTkSuQmCC
</value>
</data>
</root>

View File

@@ -0,0 +1,39 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace AppointmentsUi
{
static class Program
{
public static MainForm mainForm = new();
/// <summary>
/// The main entry point for the application.
/// </summary>
[STAThread]
static void Main()
{
Application.SetHighDpiMode(HighDpiMode.SystemAware);
Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);
bool dbConnectionSuccessful = AppointmentsLib.Database.Connect("docker01.solidstage.icu", 3306, "school", "school", "aaa");
if(!dbConnectionSuccessful)
{
MessageBox.Show("Database connection failed, exiting...");
return;
} else
{
//MessageBox.Show("Database connected successfully");
}
Application.Run(mainForm);
}
}
}

View File

@@ -0,0 +1,63 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Runtime Version:4.0.30319.42000
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
namespace AppointmentsUi.Properties {
using System;
/// <summary>
/// A strongly-typed resource class, for looking up localized strings, etc.
/// </summary>
// This class was auto-generated by the StronglyTypedResourceBuilder
// class via a tool like ResGen or Visual Studio.
// To add or remove a member, edit your .ResX file then rerun ResGen
// with the /str option, or rebuild your VS project.
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "16.0.0.0")]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
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() {
}
/// <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 (object.ReferenceEquals(resourceMan, null)) {
global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("AppointmentsUi.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 {
return resourceCulture;
}
set {
resourceCulture = value;
}
}
}
}

View File

@@ -0,0 +1,120 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: 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">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<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">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<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" 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">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<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=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
</root>

View File

@@ -0,0 +1,93 @@
namespace AppointmentsUi.Views
{
partial class CompanyList
{
/// <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.tableLayoutPanelCompanies = new System.Windows.Forms.TableLayoutPanel();
this.labelCompaniesHeader = new System.Windows.Forms.Label();
this.buttonAddNewCompany = new System.Windows.Forms.Button();
this.SuspendLayout();
//
// tableLayoutPanelCompanies
//
this.tableLayoutPanelCompanies.BackColor = System.Drawing.SystemColors.ControlDark;
this.tableLayoutPanelCompanies.ColumnCount = 4;
this.tableLayoutPanelCompanies.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle());
this.tableLayoutPanelCompanies.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle());
this.tableLayoutPanelCompanies.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle());
this.tableLayoutPanelCompanies.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle());
this.tableLayoutPanelCompanies.Location = new System.Drawing.Point(-1, 29);
this.tableLayoutPanelCompanies.Name = "tableLayoutPanelCompanies";
this.tableLayoutPanelCompanies.RowCount = 1;
this.tableLayoutPanelCompanies.RowStyles.Add(new System.Windows.Forms.RowStyle());
this.tableLayoutPanelCompanies.Size = new System.Drawing.Size(802, 423);
this.tableLayoutPanelCompanies.TabIndex = 0;
//
// labelCompaniesHeader
//
this.labelCompaniesHeader.AutoSize = true;
this.labelCompaniesHeader.Location = new System.Drawing.Point(-1, 4);
this.labelCompaniesHeader.Name = "labelCompaniesHeader";
this.labelCompaniesHeader.Size = new System.Drawing.Size(67, 15);
this.labelCompaniesHeader.TabIndex = 1;
this.labelCompaniesHeader.Text = "Companies";
//
// buttonAddNewCompany
//
this.buttonAddNewCompany.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.buttonAddNewCompany.Location = new System.Drawing.Point(725, 0);
this.buttonAddNewCompany.Name = "buttonAddNewCompany";
this.buttonAddNewCompany.Size = new System.Drawing.Size(75, 23);
this.buttonAddNewCompany.TabIndex = 2;
this.buttonAddNewCompany.Text = "Add new";
this.buttonAddNewCompany.UseVisualStyleBackColor = true;
this.buttonAddNewCompany.Click += new System.EventHandler(this.buttonAddNewCompany_Click);
//
// CompanyList
//
this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 15F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(800, 450);
this.Controls.Add(this.buttonAddNewCompany);
this.Controls.Add(this.labelCompaniesHeader);
this.Controls.Add(this.tableLayoutPanelCompanies);
this.Name = "CompanyList";
this.Text = "CompanyList";
this.ResumeLayout(false);
this.PerformLayout();
}
#endregion
private System.Windows.Forms.TableLayoutPanel tableLayoutPanelCompanies;
private System.Windows.Forms.Label labelCompaniesHeader;
private System.Windows.Forms.Button buttonAddNewCompany;
}
}

View File

@@ -0,0 +1,59 @@
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 AppointmentsUi.Views
{
public partial class CompanyList : Form
{
public CompanyList()
{
InitializeComponent();
var companies = AppointmentsLib.Models.Company.GetCompanies();
for(int i = 0; i < companies.Count(); i++)
{
var company = companies.ElementAt(i);
var labelCompanyId = new Label() { Text = company.CompanyId.ToString(), AutoSize = true, TextAlign = ContentAlignment.MiddleCenter };
var textboxCompanyName = new TextBox() { Text = company.Label, AutoSize = true };
var buttonApplyChanges = new Button() { Text = "Apply" };
var buttonDelete = new Button() { Text = "Delete" };
buttonApplyChanges.Click += new EventHandler(delegate (object sender, EventArgs e) {
company.Save();
Program.mainForm.EmbedForm<CompanyList>();
});
buttonDelete.Click += new EventHandler(delegate (object sender, EventArgs e) {
var res = MessageBox.Show($"Are you sure to delete the company\n{company.Label}\n?", "Delete company?", MessageBoxButtons.YesNo);
if (res == DialogResult.Yes)
{
company.Delete();
Program.mainForm.EmbedForm<CompanyList>();
}
});
textboxCompanyName.TextChanged += new EventHandler(delegate (object sender, EventArgs e) {
company.Label = textboxCompanyName.Text;
});
tableLayoutPanelCompanies.Controls.Add(labelCompanyId, 0, 1 + i);
tableLayoutPanelCompanies.Controls.Add(textboxCompanyName, 1, 1 + i);
tableLayoutPanelCompanies.Controls.Add(buttonApplyChanges, 2, 1 + i);
tableLayoutPanelCompanies.Controls.Add(buttonDelete, 3, 1 + i);
}
}
private void buttonAddNewCompany_Click(object sender, EventArgs e)
{
AppointmentsLib.Models.Company.Create("New company");
Program.mainForm.EmbedForm<CompanyList>();
}
}
}

View File

@@ -0,0 +1,60 @@
<root>
<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">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<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">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<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" 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">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<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=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
</root>

View File

@@ -0,0 +1,61 @@
namespace AppointmentsUi.Views
{
partial class EmptyPage
{
/// <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.noPageSelectedLabel = new System.Windows.Forms.Label();
this.SuspendLayout();
//
// noPageSelectedLabel
//
this.noPageSelectedLabel.Dock = System.Windows.Forms.DockStyle.Fill;
this.noPageSelectedLabel.Location = new System.Drawing.Point(0, 0);
this.noPageSelectedLabel.Name = "noPageSelectedLabel";
this.noPageSelectedLabel.Size = new System.Drawing.Size(800, 450);
this.noPageSelectedLabel.TabIndex = 0;
this.noPageSelectedLabel.Text = "No Page selected...";
this.noPageSelectedLabel.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
//
// EmptyPage
//
this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 15F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(800, 450);
this.Controls.Add(this.noPageSelectedLabel);
this.Name = "EmptyPage";
this.Text = "EmptyPage";
this.ResumeLayout(false);
}
#endregion
private System.Windows.Forms.Label noPageSelectedLabel;
}
}

View File

@@ -0,0 +1,20 @@
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 AppointmentsUi.Views
{
public partial class EmptyPage : Form
{
public EmptyPage()
{
InitializeComponent();
}
}
}

View File

@@ -0,0 +1,60 @@
<root>
<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">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<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">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<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" 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">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<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=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
</root>