Compare commits

..

1 commit

Author SHA1 Message Date
4bdd6b6054 Init 2023-05-05 20:58:11 +02:00
79 changed files with 5251 additions and 4 deletions

4
.editorconfig Normal file
View file

@ -0,0 +1,4 @@
[*.cs]
# CS8625: Ein NULL-Literal kann nicht in einen Non-Nullable-Verweistyp konvertiert werden.
dotnet_diagnostic.CS8625.severity = none

Binary file not shown.

Binary file not shown.

BIN
.vs/Mysql-example/v17/.suo Normal file

Binary file not shown.

Binary file not shown.

Binary file not shown.

30
Mysql-example.sln Normal file
View file

@ -0,0 +1,30 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 17
VisualStudioVersion = 17.4.33403.182
MinimumVisualStudioVersion = 10.0.40219.1
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Mysql-example", "Mysql-example\Mysql-example.csproj", "{6DC6599A-EDDB-4422-9E54-A245A5AAB501}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{3D0CB405-B1E2-4E13-85E1-DDCD469790BC}"
ProjectSection(SolutionItems) = preProject
.editorconfig = .editorconfig
EndProjectSection
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{6DC6599A-EDDB-4422-9E54-A245A5AAB501}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{6DC6599A-EDDB-4422-9E54-A245A5AAB501}.Debug|Any CPU.Build.0 = Debug|Any CPU
{6DC6599A-EDDB-4422-9E54-A245A5AAB501}.Release|Any CPU.ActiveCfg = Release|Any CPU
{6DC6599A-EDDB-4422-9E54-A245A5AAB501}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {23AC8294-0210-4628-A6A1-32BC61B3D3DA}
EndGlobalSection
EndGlobal

16
Mysql-example/Config.cs Normal file
View file

@ -0,0 +1,16 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Mysql_example
{
public static class Config
{
public static string DBHost = "localhost";
public static string DBName = "dominik_test";
public static string DBUser = "root";
public static string DBPass = "";
}
}

View file

@ -0,0 +1,241 @@
using System;
using System.Collections;
using System.Collections.Generic;
using System.Data;
using System.Globalization;
using System.Linq;
using System.Security.Cryptography;
using System.Security.Cryptography.X509Certificates;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using System.Xml.Linq;
using Google.Protobuf.WellKnownTypes;
using MySql.Data.MySqlClient;
using Mysql_example.Database.Schema;
using MySqlX.XDevAPI.Common;
using MySqlX.XDevAPI.Relational;
using static System.ComponentModel.Design.ObjectSelectorEditor;
using static System.Runtime.InteropServices.JavaScript.JSType;
using static Mysql_example.Database.DBConnectGeneral;
namespace Mysql_example.Database
{
class DBConnectGeneral
{
public MySqlConnection connection;
private string server;
private string database;
private string uid;
private string password;
public DBConnectGeneral()
{
this.server = Config.DBHost;
this.database= Config.DBName;
this.uid= Config.DBUser;
this.password = Config.DBPass;
Initialize();
}
//Connection Handeling
private void Initialize()
{
string connectionPayload = $"SERVER={server};DATABASE={database};UID={uid};PASSWORD={password};";
connection = new MySqlConnection(connectionPayload);
}
public bool OpenConnection()
{
try
{
connection.Open();
return true;
} catch (MySqlException exception)
{
switch (exception.Number)
{
case 0:
MessageBox.Show("Cannot connect to server. Contact administrator");
break;
case 1045:
MessageBox.Show("Invalid username/password, please try again");
break;
default:
MessageBox.Show($"Error: {exception.Message}");
break;
}
return false;
}
}
public bool CloseConnection()
{
try
{
connection.Close();
return true;
} catch (MySqlException exception)
{
MessageBox.Show(exception.Message);
return false;
}
}
// Getting Information
public List<string> [] Select(string table, List<string> fields)
{
string querry = "SELECT ";
foreach (string field in fields)
{
querry += $"`{field}`, ";
}
querry = querry.Substring(0, querry.Length - 2);
querry += $" FROM `{table}`";
List<string>[] response = new List<string>[fields.Count];
for (int i = 0; i < fields.Count; i++)
{
response[i] = new List<string>();
}
if(this.OpenConnection())
{
MySqlCommand selectCmd = new MySqlCommand(querry, connection);
MySqlDataReader dataReader= selectCmd.ExecuteReader();
while (dataReader.Read())
{
for (int i = 0; i < fields.Count; i++)
{
response[i].Add(dataReader[fields[i]] + "");
}
}
dataReader.Close();
CloseConnection();
}
return response;
}
public List<string>[] Select(string table, List<string> fields, string selector)
{
string querry = "SELECT ";
foreach (string field in fields)
{
querry += $"`{field}`, ";
}
querry = querry.Substring(0, querry.Length - 2);
querry += $" FROM `{table}` WHERE {selector}";
List<string>[] response = new List<string>[fields.Count];
for (int i = 0; i < fields.Count; i++)
{
response[i] = new List<string>();
}
if (this.OpenConnection())
{
MySqlCommand selectCmd = new MySqlCommand(querry, connection);
MySqlDataReader dataReader = selectCmd.ExecuteReader();
while (dataReader.Read())
{
for (int i = 0; i < fields.Count; i++)
{
response[i].Add(dataReader[fields[i]] + "");
}
}
dataReader.Close();
CloseConnection();
}
return response;
}
// Modifying Information
public int Update(string table, List<string> fields, List<object> values, string selector)
{
string querry = $"UPDATE `{table}` SET ";
if (fields.Count != values.Count) throw new Exception("Count of Fields and Values to Update doesnt match");
for(int i = 0; i < fields.Count;i++)
{
string value = values[i] != null ? "'" + values[i].ToString() + "'" : "NULL";
querry += $"`{fields[i]}`= {value},";
}
querry = querry.Remove(querry.Length -1);
querry += $" WHERE {selector};";
if (this.OpenConnection())
{
MySqlCommand updateCommand = new MySqlCommand();
updateCommand.CommandText = querry;
updateCommand.Connection = connection;
try
{
int affected = updateCommand.ExecuteNonQuery();
return affected;
}
catch(Exception ex)
{
MessageBox.Show(ex.Message, "There Was an Error Trying to Update.");
} finally
{
CloseConnection();
}
}
return 0;
}
public UInt64 Insert(string table, List<string> fields, List<object> values)
{
if (fields.Count != values.Count) throw new Exception("Count of Fields and Values to Update doesnt match");
string querry = $"INSERT INTO `{table}` (";
for (int i = 0; i < fields.Count; i++)
{
querry += $"`{fields[i]}`,";
}
querry = querry.Remove(querry.Length - 1);
querry += $") VALUES (";
for (int i = 0; i < values.Count; i++)
{
string value = values[i] != null ? "'" + values[i].ToString() + "'" : "NULL";
querry += $"{value},";
}
querry = querry.Remove(querry.Length - 1);
querry += ");";
if (this.OpenConnection())
{
MySqlCommand insertCommand = new MySqlCommand();
insertCommand.CommandText = querry;
insertCommand.Connection = connection;
try
{
insertCommand.ExecuteNonQuery();
return insertCommand.LastInsertedId < 0 ? 0 : (UInt64)insertCommand.LastInsertedId;
}
catch (Exception ex)
{
MessageBox.Show(ex.Message, "There Was an Error Trying to Insert.");
}
finally
{
CloseConnection();
}
}
return 0;
}
public void Delete(string table, string selector)
{
string querry = $"DELETE FROM `{table}` WHERE {selector};";
if (this.OpenConnection())
{
MySqlCommand deleteCommand = new MySqlCommand();
deleteCommand.CommandText = querry;
deleteCommand.Connection = connection;
deleteCommand.ExecuteNonQuery();
CloseConnection();
}
}
}
}

View file

@ -0,0 +1,303 @@
using MySql.Data.MySqlClient;
using Mysql_example.Database.Schema;
using Mysql_example.Util;
using System;
using System.Collections.Generic;
using System.Data;
using System.Data.Common;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Mysql_example.Database
{
class DBConnectSpecific : DBConnectGeneral
{
public DBConnectSpecific(){ }
public struct usersAndAddressesStruct
{
public Dictionary<UInt64, User> users { get; set; }
public Dictionary<UInt64, Address> addresses { get; set; }
}
public usersAndAddressesStruct ReadUsersAndAddresses()
{
string querry = @$"
SELECT users.*,
addresses.id As `addr.id`,
addresses.user_id AS `addr.user_id`,
addresses.first_name As `addr.first_name`,
addresses.last_name AS `addr.last_name`,
addresses.street AS `addr.street`,
addresses.house_number AS `addr.house_number`,
addresses.city AS `addr.city`,
addresses.postal_code AS `addr.postal_code`,
addresses.country AS `addr.country`,
addresses.last_updated AS `addr.last_updated`
FROM `users` LEFT JOIN `addresses` ON users.id = addresses.user_id;
";
if (!this.OpenConnection()) throw new Exception("No Database Connection");
usersAndAddressesStruct result = new usersAndAddressesStruct();
Dictionary<UInt64, User> users = new Dictionary<UInt64, User>();
Dictionary<UInt64, Address> addresses = new Dictionary<UInt64, Address>();
MySqlCommand selectCmd = new MySqlCommand(querry, connection);
MySqlDataReader dataReader = selectCmd.ExecuteReader();
while (dataReader.Read())
{
UInt64 userId = dataReader.GetUInt64("id");
if (users.ContainsKey(userId))
{
User user = users[userId];
Address address = ReadAddress(dataReader);
user.Addresses[address.Id] = address;
addresses[address.Id] = address;
if (!dataReader.IsDBNull("billing_address_id") && dataReader.GetUInt64("billing_address_id") == address.Id) user.BillingAdress = address;
if (!dataReader.IsDBNull("shipping_address_id") && dataReader.GetUInt64("shipping_address_id") == address.Id) user.ShippingAddress = address;
continue;
}
User readedUser = ReadUser(dataReader);
if (!dataReader.IsDBNull("addr.id"))
{
Address address = ReadAddress(dataReader);
readedUser.Addresses[address.Id] = address;
addresses[address.Id] = address;
if (!dataReader.IsDBNull("billing_address_id") && dataReader.GetUInt64("billing_address_id") == address.Id) readedUser.BillingAdress = address;
if (!dataReader.IsDBNull("shipping_address_id") && dataReader.GetUInt64("shipping_address_id") == address.Id) readedUser.ShippingAddress = address;
}
users.Add(readedUser.Id, readedUser);
}
CloseConnection();
result.users = users;
result.addresses = addresses;
return result;
}
private static User ReadUser(MySqlDataReader reader)
{
User user = new User();
user.Id = reader.GetUInt64("id");
user.Email = reader.GetString("email");
user.FirstName = reader.GetString("first_name");
user.LastName = reader.GetString("last_name");
user.Birthday = reader.GetDateTime("birthday");
user.LastUpdated = reader.GetDateTime("last_updated");
user.Addresses = new Dictionary<UInt64, Address>();
return user;
}
private static Address ReadAddress(MySqlDataReader reader)
{
Address address = new Address();
address.Id = reader.GetUInt64("addr.id");
address.UserID = reader.GetUInt64("addr.user_id");
address.FirstName = reader.GetString("addr.first_name");
address.LastName = reader.GetString("addr.last_name");
address.Street = reader.GetString("addr.street");
address.HouseNumber = reader.GetString("addr.house_number");
address.City = reader.GetString("addr.city");
address.PostalCode = reader.GetString("addr.postal_code");
address.Region = reader.GetString("addr.country");
address.LastUpdated = reader.GetDateTime("addr.last_updated");
return address;
}
public void UpdateUser(ref User user, Dictionary<UInt64, User> oldUsers)
{
List<String> fields = new List<String>();
List<Object> values = new List<Object>();
if (!oldUsers.ContainsKey(user.Id))
{
fields.Add("email");
values.Add(user.Email);
fields.Add("first_name");
values.Add(user.FirstName);
fields.Add("last_name");
values.Add(user.LastName);
fields.Add("birthday");
values.Add(Utility.dateTimeToDatabaseBirthday(user.Birthday));
DateTime createTime = DateTime.Now;
user.LastUpdated = createTime;
fields.Add("last_updated");
values.Add(Utility.dateTimeToDatabaseTimestamp(createTime));
UInt64 newUserID = Insert("users", fields, values);
user.Id = newUserID;
}
User olduser = oldUsers[user.Id];
if (olduser.Email != user.Email)
{
fields.Add("email");
values.Add(user.Email);
}
if (olduser.FirstName != user.FirstName)
{
fields.Add("first_name");
values.Add(user.FirstName);
}
if (olduser.LastName != user.LastName)
{
fields.Add("last_name");
values.Add(user.LastName);
}
if (olduser.Birthday != user.Birthday)
{
fields.Add("birthday");
values.Add(Utility.dateTimeToDatabaseBirthday(user.Birthday));
}
if (olduser.BillingAdress != user.BillingAdress)
{
fields.Add("billing_address_id");
values.Add(user.BillingAdress != null ? user.BillingAdress.Id : null);
}
if (olduser.ShippingAddress != user.ShippingAddress)
{
fields.Add("shipping_address_id");
values.Add(user.ShippingAddress != null ? user.ShippingAddress.Id : null);
}
//If no Changes, Do no Databse Call
if (fields.Count() == 0) return;
//Add Last Updated Field
DateTime updateTime = DateTime.Now;
fields.Add("last_updated");
values.Add(Utility.dateTimeToDatabaseTimestamp(updateTime));
Update("users", fields, values, $"`id`={user.Id} and `last_updated`='{Utility.dateTimeToDatabaseTimestamp(user.LastUpdated)}'");
return;
}
public void UpdateAddressesOnUser(ref User user, Dictionary<UInt64, User> oldUsers)
{
if (!oldUsers.ContainsKey(user.Id))
{
AddAddressesOfNewUser(user);
}
//Get Diffrences for each Adress and make a Database Call
User olduser = oldUsers[user.Id];
foreach (Address newAddress in user.Addresses.Values)
{
List<String> fields = new List<String>();
List<Object> values = new List<Object>();
if (!olduser.Addresses.ContainsKey(newAddress.Id))
{
AddNewAddressOfUser(newAddress, user);
continue;
}
Address oldAdress = olduser.Addresses[newAddress.Id];
if (oldAdress.FirstName != newAddress.FirstName) fields.Add("first_name"); values.Add(newAddress.FirstName);
if (oldAdress.LastName != newAddress.LastName) fields.Add("last_name"); values.Add(newAddress.LastName);
if (oldAdress.Street != newAddress.Street) fields.Add("street"); values.Add(newAddress.Street);
if (oldAdress.HouseNumber != newAddress.HouseNumber)fields.Add("house_number"); values.Add(newAddress.HouseNumber);
if (oldAdress.City != newAddress.City) fields.Add("city"); values.Add(newAddress.City);
if (oldAdress.PostalCode != newAddress.PostalCode) fields.Add("postal_code"); values.Add(newAddress.PostalCode);
if (oldAdress.Region != newAddress.Region) fields.Add("country"); values.Add(newAddress.Region);
//If no Changes, Do no Databse Call
if (fields.Count() == 0) continue;
//Add Last Updated Field
DateTime updateTime = DateTime.Now;
fields.Add("last_updated");
values.Add(Utility.dateTimeToDatabaseTimestamp(updateTime));
Update("addresses", fields, values, $"`id`={newAddress.Id} and `last_updated`='{Utility.dateTimeToDatabaseTimestamp(newAddress.LastUpdated)}'");
}
foreach (Address deletedAddress in user.deletedAddreses)
{
Delete("addresses", $"`id`='{deletedAddress.Id}'");
}
}
private UInt64 AddNewAddressOfUser(Address address, User user)
{
List<String> fields = new List<String>();
List<Object> values = new List<Object>();
fields.Add("user_id");
values.Add(user.Id);
fields.Add("first_name");
values.Add(address.FirstName);
fields.Add("last_name");
values.Add(address.LastName);
fields.Add("street");
values.Add(address.Street);
fields.Add("house_number");
values.Add(address.HouseNumber);
fields.Add("city");
values.Add(address.City);
fields.Add("postal_code");
values.Add(address.PostalCode);
fields.Add("country");
values.Add(address.Region);
DateTime createTime = DateTime.Now;
fields.Add("last_updated");
values.Add(Utility.dateTimeToDatabaseTimestamp(createTime));
return Insert("addresses", fields, values);
}
private void AddAddressesOfNewUser(User user)
{
List<String> fields = new List<String>();
List<Object> values = new List<Object>();
foreach (Address address in user.Addresses.Values)
{
if (
address.FirstName == null ||
address.LastName == null ||
address.Street == null ||
address.City == null ||
address.PostalCode == null ||
address.Region == null
) continue;
UInt64 addressId = AddNewAddressOfUser(address, user);
if (user.BillingAdress == null && user.ShippingAddress == null) continue;
fields = new List<String>();
values = new List<Object>();
if (user.BillingAdress != null)
{
fields.Add("billing_address_id");
values.Add(addressId);
}
if (user.ShippingAddress != null)
{
fields.Add("shipping_address_id");
values.Add(addressId);
}
//Add Last Updated Field
DateTime updateTime = DateTime.Now;
fields.Add("last_updated");
values.Add(Utility.dateTimeToDatabaseTimestamp(updateTime));
Update("users", fields, values, $"`id`={user.Id} and `last_updated`='{Utility.dateTimeToDatabaseTimestamp(user.LastUpdated)}'");
continue;
}
return;
}
public void DeleteUser(User user)
{
foreach (Address address in user.Addresses.Values)
{
Delete("addresses", $"`id`='{address.Id}'");
}
Delete("users", $"`id`='{user.Id}'");
}
}
}

View file

@ -0,0 +1,58 @@
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Globalization;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Mysql_example.Database.Schema
{
public class Address
{
[Browsable(false), ReadOnly(true)] public ulong Id { get; set; }
[Browsable(false), ReadOnly(true)] public ulong UserID { get; set; }
[DisplayName("First Name")] public string FirstName { get; set; }
[DisplayName("Last Name")] public string? LastName { get; set; }
public string Street { get; set; }
[DisplayName("House Number")] public string HouseNumber { get; set; }
public string City { get; set; }
[DisplayName("Postal Code")] public string PostalCode { get; set; }
public string Region { get; set; }
public string RegionCode { get{ return Region + PostalCode; } }
[ReadOnly(true), Browsable(false)] public DateTime LastUpdated { get; set; }
public Address() { }
public Address(Address address)
{
if (address == null) throw new ArgumentNullException("address");
Id = address.Id;
UserID = address.UserID;
FirstName = address.FirstName;
LastName = address.LastName;
Street = address.Street;
HouseNumber = address.HouseNumber;
City = address.City;
PostalCode = address.PostalCode;
Region = address.Region;
LastUpdated= address.LastUpdated;
}
public static List<RegionInfo> regionInfos = new List<RegionInfo>()
{
new RegionInfo("DE"),
new RegionInfo("DK"),
new RegionInfo("PL"),
new RegionInfo("CH"),
new RegionInfo("AT"),
new RegionInfo("IT"),
new RegionInfo("GR"),
new RegionInfo("FR"),
new RegionInfo("ES"),
new RegionInfo("PT"),
new RegionInfo("GB"),
new RegionInfo("US"),
new RegionInfo("CA")
};
}
}

View file

@ -0,0 +1,57 @@
using Google.Protobuf.WellKnownTypes;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Mysql_example.Database.Schema
{
public class User
{
[Browsable(false)] public ulong Id { get; set; }
public string Email { get; set; }
[DisplayName("First Name")] public string FirstName { get; set; }
[DisplayName("Last Name")] public string LastName { get; set; }
public DateTime Birthday { get; set; }
[Browsable(false)] public Dictionary<UInt64, Address> Addresses { get; set; }
public List<Address> deletedAddreses { get; set; }
[Browsable(false)] public Address BillingAdress { get; set; }
[Browsable(false)] public Address ShippingAddress { get; set; }
[ReadOnly(true), Browsable(false)] public DateTime LastUpdated { get; set; }
public User() { }
public User(User user)
{
Id = user.Id;
Email = user.Email;
FirstName = user.FirstName;
LastName = user.LastName;
Birthday = user.Birthday;
Addresses = new Dictionary<UInt64, Address>();
foreach(Address address in user.Addresses.Values)
{
Addresses[address.Id] = new Address(address);
}
deletedAddreses = new List<Address>();
BillingAdress = user.BillingAdress;
ShippingAddress = user.ShippingAddress;
LastUpdated = user.LastUpdated;
}
public void copyValues(User data)
{
Id = data.Id;
Email = data.Email;
FirstName = data.FirstName;
LastName = data.LastName;
Birthday = data.Birthday;
Addresses = data.Addresses;
BillingAdress = data.BillingAdress;
ShippingAddress = data.ShippingAddress;
LastUpdated = data.LastUpdated;
}
}
}

View file

@ -0,0 +1,36 @@
CREATE TABLE `addresses` (
`id` bigint(20) UNSIGNED NOT NULL,
`user_id` bigint(20) UNSIGNED NOT NULL,
`first_name` varchar(64) NOT NULL,
`last_name` varchar(64) NOT NULL,
`street` varchar(64) NOT NULL,
`house_number` varchar(64) NOT NULL,
`city` varchar(64) NOT NULL,
`postal_code` varchar(64) NOT NULL,
`country` varchar(2) NOT NULL,
`last_updated` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;
CREATE TABLE `users` (
`id` bigint(20) UNSIGNED NOT NULL,
`email` varchar(64) NOT NULL,
`password_hash` varchar(512) NOT NULL DEFAULT 'password-hash',
`first_name` varchar(64) NOT NULL,
`last_name` varchar(64) NOT NULL,
`birthday` date NOT NULL,
`billing_address_id` int(20) UNSIGNED DEFAULT NULL,
`shipping_address_id` int(20) UNSIGNED DEFAULT NULL,
`last_updated` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;
ALTER TABLE `addresses`
ADD PRIMARY KEY (`id`);
ALTER TABLE `users`
ADD PRIMARY KEY (`id`),
ADD UNIQUE KEY `email` (`email`);
ALTER TABLE `addresses`
MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT;
ALTER TABLE `users`
MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT;
COMMIT;

215
Mysql-example/MainForm.Designer.cs generated Normal file
View file

@ -0,0 +1,215 @@
using Mysql_example.Database;
using System.Data;
namespace Mysql_example
{
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()
{
this.components = new System.ComponentModel.Container();
this.DataGridViewUserInfo = new System.Windows.Forms.DataGridView();
this.ContextMenuStripUsers = new System.Windows.Forms.ContextMenuStrip(this.components);
this.AddUserToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.DeleteUserToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.SplitContainer = new System.Windows.Forms.SplitContainer();
this.TabControlsDataGrids = new System.Windows.Forms.TabControl();
this.TabPageUsers = new System.Windows.Forms.TabPage();
this.TableLayoutPanelAddUser = new System.Windows.Forms.TableLayoutPanel();
this.TabPageAddresses = new System.Windows.Forms.TabPage();
this.DataGridViewAdressInfo = new System.Windows.Forms.DataGridView();
((System.ComponentModel.ISupportInitialize)(this.DataGridViewUserInfo)).BeginInit();
this.ContextMenuStripUsers.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.SplitContainer)).BeginInit();
this.SplitContainer.Panel2.SuspendLayout();
this.SplitContainer.SuspendLayout();
this.TabControlsDataGrids.SuspendLayout();
this.TabPageUsers.SuspendLayout();
this.TableLayoutPanelAddUser.SuspendLayout();
this.TabPageAddresses.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.DataGridViewAdressInfo)).BeginInit();
this.SuspendLayout();
//
// DataGridViewUserInfo
//
this.DataGridViewUserInfo.AllowUserToAddRows = false;
this.DataGridViewUserInfo.AllowUserToDeleteRows = false;
this.DataGridViewUserInfo.AllowUserToOrderColumns = true;
this.DataGridViewUserInfo.AllowUserToResizeRows = false;
this.DataGridViewUserInfo.AutoSizeColumnsMode = System.Windows.Forms.DataGridViewAutoSizeColumnsMode.Fill;
this.DataGridViewUserInfo.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
this.DataGridViewUserInfo.Dock = System.Windows.Forms.DockStyle.Fill;
this.DataGridViewUserInfo.Location = new System.Drawing.Point(0, 0);
this.DataGridViewUserInfo.Margin = new System.Windows.Forms.Padding(0);
this.DataGridViewUserInfo.Name = "DataGridViewUserInfo";
this.DataGridViewUserInfo.RowHeadersVisible = false;
this.DataGridViewUserInfo.RowTemplate.ContextMenuStrip = this.ContextMenuStripUsers;
this.DataGridViewUserInfo.RowTemplate.Height = 25;
this.DataGridViewUserInfo.Size = new System.Drawing.Size(773, 371);
this.DataGridViewUserInfo.TabIndex = 0;
this.DataGridViewUserInfo.CellContentClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.DataGridViewUserInfo_CellContentClick);
this.DataGridViewUserInfo.CellMouseEnter += new System.Windows.Forms.DataGridViewCellEventHandler(this.DataGridViewUserInfo_CellMouseEnter);
//
// ContextMenuStripUsers
//
this.ContextMenuStripUsers.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.AddUserToolStripMenuItem,
this.DeleteUserToolStripMenuItem});
this.ContextMenuStripUsers.Name = "ContextMenuStripUsers";
this.ContextMenuStripUsers.Size = new System.Drawing.Size(134, 48);
//
// AddUserToolStripMenuItem
//
this.AddUserToolStripMenuItem.Name = "AddUserToolStripMenuItem";
this.AddUserToolStripMenuItem.Size = new System.Drawing.Size(133, 22);
this.AddUserToolStripMenuItem.Text = "Add User";
this.AddUserToolStripMenuItem.Click += new System.EventHandler(this.AddUserToolStripMenuItem_Click);
//
// DeleteUserToolStripMenuItem
//
this.DeleteUserToolStripMenuItem.Name = "DeleteUserToolStripMenuItem";
this.DeleteUserToolStripMenuItem.Size = new System.Drawing.Size(133, 22);
this.DeleteUserToolStripMenuItem.Text = "Delete User";
this.DeleteUserToolStripMenuItem.Click += new System.EventHandler(this.DeleteUserToolStripMenuItem_Click);
//
// SplitContainer
//
this.SplitContainer.Dock = System.Windows.Forms.DockStyle.Fill;
this.SplitContainer.Location = new System.Drawing.Point(0, 0);
this.SplitContainer.Name = "SplitContainer";
this.SplitContainer.Orientation = System.Windows.Forms.Orientation.Horizontal;
//
// SplitContainer.Panel2
//
this.SplitContainer.Panel2.Controls.Add(this.TabControlsDataGrids);
this.SplitContainer.Size = new System.Drawing.Size(787, 441);
this.SplitContainer.SplitterDistance = 32;
this.SplitContainer.TabIndex = 1;
//
// TabControlsDataGrids
//
this.TabControlsDataGrids.Controls.Add(this.TabPageUsers);
this.TabControlsDataGrids.Controls.Add(this.TabPageAddresses);
this.TabControlsDataGrids.Dock = System.Windows.Forms.DockStyle.Fill;
this.TabControlsDataGrids.Font = new System.Drawing.Font("Segoe UI", 10F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point);
this.TabControlsDataGrids.ItemSize = new System.Drawing.Size(60, 20);
this.TabControlsDataGrids.Location = new System.Drawing.Point(0, 0);
this.TabControlsDataGrids.Margin = new System.Windows.Forms.Padding(0);
this.TabControlsDataGrids.Name = "TabControlsDataGrids";
this.TabControlsDataGrids.SelectedIndex = 0;
this.TabControlsDataGrids.Size = new System.Drawing.Size(787, 405);
this.TabControlsDataGrids.TabIndex = 1;
//
// TabPageUsers
//
this.TabPageUsers.Controls.Add(this.TableLayoutPanelAddUser);
this.TabPageUsers.Location = new System.Drawing.Point(4, 24);
this.TabPageUsers.Name = "TabPageUsers";
this.TabPageUsers.Padding = new System.Windows.Forms.Padding(3);
this.TabPageUsers.Size = new System.Drawing.Size(779, 377);
this.TabPageUsers.TabIndex = 0;
this.TabPageUsers.Text = "Users";
this.TabPageUsers.UseVisualStyleBackColor = true;
//
// TableLayoutPanelAddUser
//
this.TableLayoutPanelAddUser.ColumnCount = 1;
this.TableLayoutPanelAddUser.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 100F));
this.TableLayoutPanelAddUser.Controls.Add(this.DataGridViewUserInfo, 0, 0);
this.TableLayoutPanelAddUser.Dock = System.Windows.Forms.DockStyle.Fill;
this.TableLayoutPanelAddUser.Location = new System.Drawing.Point(3, 3);
this.TableLayoutPanelAddUser.Name = "TableLayoutPanelAddUser";
this.TableLayoutPanelAddUser.RowCount = 1;
this.TableLayoutPanelAddUser.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 100F));
this.TableLayoutPanelAddUser.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 20F));
this.TableLayoutPanelAddUser.Size = new System.Drawing.Size(773, 371);
this.TableLayoutPanelAddUser.TabIndex = 0;
//
// TabPageAddresses
//
this.TabPageAddresses.Controls.Add(this.DataGridViewAdressInfo);
this.TabPageAddresses.Location = new System.Drawing.Point(4, 24);
this.TabPageAddresses.Name = "TabPageAddresses";
this.TabPageAddresses.Padding = new System.Windows.Forms.Padding(3);
this.TabPageAddresses.Size = new System.Drawing.Size(779, 377);
this.TabPageAddresses.TabIndex = 1;
this.TabPageAddresses.Text = "Addresses";
this.TabPageAddresses.UseVisualStyleBackColor = true;
//
// DataGridViewAdressInfo
//
this.DataGridViewAdressInfo.AllowUserToAddRows = false;
this.DataGridViewAdressInfo.AllowUserToDeleteRows = false;
this.DataGridViewAdressInfo.AllowUserToResizeRows = false;
this.DataGridViewAdressInfo.AutoSizeColumnsMode = System.Windows.Forms.DataGridViewAutoSizeColumnsMode.Fill;
this.DataGridViewAdressInfo.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
this.DataGridViewAdressInfo.Dock = System.Windows.Forms.DockStyle.Fill;
this.DataGridViewAdressInfo.Location = new System.Drawing.Point(3, 3);
this.DataGridViewAdressInfo.Margin = new System.Windows.Forms.Padding(0);
this.DataGridViewAdressInfo.Name = "DataGridViewAdressInfo";
this.DataGridViewAdressInfo.RowHeadersVisible = false;
this.DataGridViewAdressInfo.RowTemplate.Height = 25;
this.DataGridViewAdressInfo.Size = new System.Drawing.Size(773, 371);
this.DataGridViewAdressInfo.TabIndex = 0;
//
// MainForm
//
this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 15F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(787, 441);
this.Controls.Add(this.SplitContainer);
this.Name = "MainForm";
this.Text = "Form1";
this.Load += new System.EventHandler(this.MainPage_Load);
((System.ComponentModel.ISupportInitialize)(this.DataGridViewUserInfo)).EndInit();
this.ContextMenuStripUsers.ResumeLayout(false);
this.SplitContainer.Panel2.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)(this.SplitContainer)).EndInit();
this.SplitContainer.ResumeLayout(false);
this.TabControlsDataGrids.ResumeLayout(false);
this.TabPageUsers.ResumeLayout(false);
this.TableLayoutPanelAddUser.ResumeLayout(false);
this.TabPageAddresses.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)(this.DataGridViewAdressInfo)).EndInit();
this.ResumeLayout(false);
}
#endregion
private DataGridView DataGridViewUserInfo;
private SplitContainer SplitContainer;
private TabControl TabControlsDataGrids;
private TabPage TabPageUsers;
private TabPage TabPageAddresses;
private DataGridView DataGridViewAdressInfo;
private TableLayoutPanel TableLayoutPanelAddUser;
private ContextMenuStrip ContextMenuStripUsers;
private ToolStripMenuItem AddUserToolStripMenuItem;
private ToolStripMenuItem DeleteUserToolStripMenuItem;
}
}

112
Mysql-example/MainForm.cs Normal file
View file

@ -0,0 +1,112 @@
using Mysql_example.Database;
using Mysql_example.Database.Schema;
using Mysql_example.Util;
using static Mysql_example.Database.DBConnectSpecific;
namespace Mysql_example
{
public partial class MainForm : Form
{
Dictionary<UInt64, User> users;
Dictionary<UInt64, Address> addresses;
private DataGridViewCellEventArgs mouseLocation;
public MainForm()
{
InitializeComponent();
}
private void MainPage_Load(object sender, EventArgs e)
{
LoadData();
SetupUsersDataGridView();
SetupAddressesDataGriView();
}
private void LoadData()
{
DBConnectSpecific connection = new DBConnectSpecific();
usersAndAddressesStruct result = connection.ReadUsersAndAddresses();
users = result.users;
addresses = result.addresses;
}
private void SetupUsersDataGridView()
{
DataGridViewColumn oldColumn = DataGridViewUserInfo.Columns["edit"];
if(oldColumn != null ) DataGridViewUserInfo.Columns.Remove(oldColumn);
DataGridViewUserInfo.DataSource = Utility.usersToBindingList(users);
DataGridViewUserInfo.ReadOnly= true;
//Add Edit buttons
DataGridViewButtonColumn editColumn = new DataGridViewButtonColumn();
editColumn.Name = "edit";
editColumn.Text = "Edit";
editColumn.UseColumnTextForButtonValue= true;
editColumn.SortMode = DataGridViewColumnSortMode.NotSortable;
DataGridViewUserInfo.Columns.Add(editColumn);
editColumn.Width = 64;
editColumn.MinimumWidth = 64;
}
private void SetupAddressesDataGriView()
{
DataGridViewAdressInfo.DataSource = Utility.addressesToBindingList(addresses);
DataGridViewAdressInfo.Columns[nameof(Address.PostalCode)].Visible = false;
DataGridViewAdressInfo.Columns[nameof(Address.Region)].Visible = false;
DataGridViewAdressInfo.ReadOnly= true;
}
private void RefreshDataGridViews()
{
LoadData();
int scrollRowIndexUsers = DataGridViewUserInfo.FirstDisplayedScrollingRowIndex != -1 ? DataGridViewUserInfo.FirstDisplayedScrollingRowIndex : 0;
int scrollRowIndexAddresses = DataGridViewAdressInfo.FirstDisplayedScrollingRowIndex != -1 ? DataGridViewAdressInfo.FirstDisplayedScrollingRowIndex : 0;
SetupUsersDataGridView();
SetupAddressesDataGriView();
DataGridViewUserInfo.FirstDisplayedScrollingRowIndex = scrollRowIndexUsers;
DataGridViewAdressInfo.FirstDisplayedScrollingRowIndex = scrollRowIndexAddresses;
}
private void EditUser(User user)
{
UserEditForm editForm = new UserEditForm(ref user);
editForm.SaveUserCallback += new UserEditForm.SaveUserDelegate(this.OnUserSaveCallback);
editForm.Show();
}
private void OnUserSaveCallback(ref User user)
{
DBConnectSpecific connection = new DBConnectSpecific();
connection.UpdateUser(ref user, users);
connection.UpdateAddressesOnUser(ref user, users);
RefreshDataGridViews();
}
private void DataGridViewUserInfo_CellContentClick(object sender, DataGridViewCellEventArgs e)
{
if (DataGridViewUserInfo.Columns["edit"].Index != e.ColumnIndex || e.RowIndex < 0) return;
EditUser(DataGridViewUserInfo.Rows[e.RowIndex].DataBoundItem as User);
}
private void AddUserToolStripMenuItem_Click(object sender, EventArgs e)
{
User newUser = new User();
newUser.Addresses = new Dictionary<ulong, Address>();
newUser.Birthday = DateTime.Now;
UserEditForm editForm = new UserEditForm(ref newUser);
editForm.SaveUserCallback += new UserEditForm.SaveUserDelegate(this.OnUserSaveCallback);
editForm.Show();
editForm.TextBoxEmail_Validating(null, null);
}
private void DeleteUserToolStripMenuItem_Click(object sender, EventArgs e)
{
DialogResult dialogResult = MessageBox.Show("This isn't Revertable", "Delete User?", MessageBoxButtons.YesNo);
if (dialogResult != DialogResult.Yes) return;
DataGridViewRow row = DataGridViewUserInfo.Rows[mouseLocation.RowIndex];
User user = row.DataBoundItem as User;
DBConnectSpecific connection = new DBConnectSpecific();
connection.DeleteUser(user);
RefreshDataGridViews();
}
private void DataGridViewUserInfo_CellMouseEnter(object sender, DataGridViewCellEventArgs e)
{
mouseLocation = e;
}
}
}

View file

@ -0,0 +1,63 @@
<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="ContextMenuStripUsers.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>17, 17</value>
</metadata>
</root>

View file

@ -0,0 +1,35 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>WinExe</OutputType>
<TargetFramework>net7.0-windows</TargetFramework>
<RootNamespace>Mysql_example</RootNamespace>
<Nullable>enable</Nullable>
<UseWindowsForms>true</UseWindowsForms>
<ImplicitUsings>enable</ImplicitUsings>
</PropertyGroup>
<ItemGroup>
<None Include="..\.editorconfig" Link=".editorconfig" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="MySql.Data" Version="8.0.33" />
</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,11 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="Current" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup>
<Compile Update="MainForm.cs">
<SubType>Form</SubType>
</Compile>
<Compile Update="UserEditForm.cs">
<SubType>Form</SubType>
</Compile>
</ItemGroup>
</Project>

21
Mysql-example/Program.cs Normal file
View file

@ -0,0 +1,21 @@
using Mysql_example.Database;
using static System.ComponentModel.Design.ObjectSelectorEditor;
namespace Mysql_example
{
internal static class Program
{
/// <summary>
/// The main entry point for the application.
/// </summary>
[STAThread]
static void Main()
{
// To customize application configuration such as set high DPI settings or default font,
// see https://aka.ms/applicationconfiguration
ApplicationConfiguration.Initialize();
Application.Run(new MainForm());
}
}
}

View file

@ -0,0 +1,63 @@
//------------------------------------------------------------------------------
// <auto-generated>
// Dieser Code wurde von einem Tool generiert.
// Laufzeitversion:4.0.30319.42000
//
// Änderungen an dieser Datei können falsches Verhalten verursachen und gehen verloren, wenn
// der Code erneut generiert wird.
// </auto-generated>
//------------------------------------------------------------------------------
namespace Mysql_example.Properties {
using System;
/// <summary>
/// Eine stark typisierte Ressourcenklasse zum Suchen von lokalisierten Zeichenfolgen usw.
/// </summary>
// Diese Klasse wurde von der StronglyTypedResourceBuilder automatisch generiert
// -Klasse über ein Tool wie ResGen oder Visual Studio automatisch generiert.
// Um einen Member hinzuzufügen oder zu entfernen, bearbeiten Sie die .ResX-Datei und führen dann ResGen
// mit der /str-Option erneut aus, oder Sie erstellen Ihr VS-Projekt neu.
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "17.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>
/// Gibt die zwischengespeicherte ResourceManager-Instanz zurück, die von dieser Klasse verwendet wird.
/// </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("Mysql_example.Properties.Resources", typeof(Resources).Assembly);
resourceMan = temp;
}
return resourceMan;
}
}
/// <summary>
/// Überschreibt die CurrentUICulture-Eigenschaft des aktuellen Threads für alle
/// Ressourcenzuordnungen, die diese stark typisierte Ressourcenklasse verwenden.
/// </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>

398
Mysql-example/UserEditForm.Designer.cs generated Normal file
View file

@ -0,0 +1,398 @@
namespace Mysql_example
{
partial class UserEditForm
{
/// <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.components = new System.ComponentModel.Container();
this.ContextMenuStripAddress = new System.Windows.Forms.ContextMenuStrip(this.components);
this.ToolStripMenuItemMakeDefaultBilling = new System.Windows.Forms.ToolStripMenuItem();
this.ToolStripMenuItemMakeDefaultShipping = new System.Windows.Forms.ToolStripMenuItem();
this.DeleteToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.TableLayoutPanelButtons = new System.Windows.Forms.TableLayoutPanel();
this.UserEditCancelButton = new System.Windows.Forms.Button();
this.UserEditSaveButton = new System.Windows.Forms.Button();
this.UserEditRevertButton = new System.Windows.Forms.Button();
this.EditTabs = new System.Windows.Forms.TabControl();
this.TabPageUser = new System.Windows.Forms.TabPage();
this.TableLayoutPanelUserData = new System.Windows.Forms.TableLayoutPanel();
this.TextBoxEmail = new System.Windows.Forms.TextBox();
this.TextBoxLastName = new System.Windows.Forms.TextBox();
this.TextBoxFirstName = new System.Windows.Forms.TextBox();
this.DateTimePickerBirthday = new System.Windows.Forms.DateTimePicker();
this.LabelFirstName = new System.Windows.Forms.Label();
this.LabelLastName = new System.Windows.Forms.Label();
this.LabelEmail = new System.Windows.Forms.Label();
this.LabelBirthday = new System.Windows.Forms.Label();
this.TabPageAddresses = new System.Windows.Forms.TabPage();
this.DataGridViewAddresses = new System.Windows.Forms.DataGridView();
this.TableLayoutPanelVerticalSplit = new System.Windows.Forms.TableLayoutPanel();
this.ErrorProviderUserEdit = new System.Windows.Forms.ErrorProvider(this.components);
this.ContextMenuStripAddress.SuspendLayout();
this.TableLayoutPanelButtons.SuspendLayout();
this.EditTabs.SuspendLayout();
this.TabPageUser.SuspendLayout();
this.TableLayoutPanelUserData.SuspendLayout();
this.TabPageAddresses.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.DataGridViewAddresses)).BeginInit();
this.TableLayoutPanelVerticalSplit.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.ErrorProviderUserEdit)).BeginInit();
this.SuspendLayout();
//
// ContextMenuStripAddress
//
this.ContextMenuStripAddress.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.ToolStripMenuItemMakeDefaultBilling,
this.ToolStripMenuItemMakeDefaultShipping,
this.DeleteToolStripMenuItem});
this.ContextMenuStripAddress.Name = "contextMenuStrip1";
this.ContextMenuStripAddress.Size = new System.Drawing.Size(240, 70);
//
// ToolStripMenuItemMakeDefaultBilling
//
this.ToolStripMenuItemMakeDefaultBilling.Name = "ToolStripMenuItemMakeDefaultBilling";
this.ToolStripMenuItemMakeDefaultBilling.Size = new System.Drawing.Size(239, 22);
this.ToolStripMenuItemMakeDefaultBilling.Text = "Make Default Billing Address";
this.ToolStripMenuItemMakeDefaultBilling.Click += new System.EventHandler(this.ToolStripMenuItemMakeDefaultBilling_Click);
//
// ToolStripMenuItemMakeDefaultShipping
//
this.ToolStripMenuItemMakeDefaultShipping.Name = "ToolStripMenuItemMakeDefaultShipping";
this.ToolStripMenuItemMakeDefaultShipping.Size = new System.Drawing.Size(239, 22);
this.ToolStripMenuItemMakeDefaultShipping.Text = "Make Default Shipping Address";
this.ToolStripMenuItemMakeDefaultShipping.Click += new System.EventHandler(this.ToolStripMenuItemMakeDefaultShipping_Click);
//
// DeleteToolStripMenuItem
//
this.DeleteToolStripMenuItem.Name = "DeleteToolStripMenuItem";
this.DeleteToolStripMenuItem.Size = new System.Drawing.Size(239, 22);
this.DeleteToolStripMenuItem.Text = "Delete";
this.DeleteToolStripMenuItem.Click += new System.EventHandler(this.ToolStripMenuItemDelete_Click);
//
// TableLayoutPanelButtons
//
this.TableLayoutPanelButtons.ColumnCount = 3;
this.TableLayoutPanelButtons.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 33.33333F));
this.TableLayoutPanelButtons.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 33.33333F));
this.TableLayoutPanelButtons.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 33.33333F));
this.TableLayoutPanelButtons.Controls.Add(this.UserEditCancelButton, 0, 0);
this.TableLayoutPanelButtons.Controls.Add(this.UserEditSaveButton, 2, 0);
this.TableLayoutPanelButtons.Controls.Add(this.UserEditRevertButton, 1, 0);
this.TableLayoutPanelButtons.Dock = System.Windows.Forms.DockStyle.Fill;
this.TableLayoutPanelButtons.Location = new System.Drawing.Point(0, 201);
this.TableLayoutPanelButtons.Margin = new System.Windows.Forms.Padding(0);
this.TableLayoutPanelButtons.Name = "TableLayoutPanelButtons";
this.TableLayoutPanelButtons.Padding = new System.Windows.Forms.Padding(3);
this.TableLayoutPanelButtons.RowCount = 1;
this.TableLayoutPanelButtons.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 100F));
this.TableLayoutPanelButtons.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 20F));
this.TableLayoutPanelButtons.Size = new System.Drawing.Size(584, 40);
this.TableLayoutPanelButtons.TabIndex = 1;
//
// UserEditCancelButton
//
this.UserEditCancelButton.Dock = System.Windows.Forms.DockStyle.Fill;
this.UserEditCancelButton.Location = new System.Drawing.Point(3, 3);
this.UserEditCancelButton.Margin = new System.Windows.Forms.Padding(0, 0, 3, 0);
this.UserEditCancelButton.Name = "UserEditCancelButton";
this.UserEditCancelButton.Size = new System.Drawing.Size(189, 34);
this.UserEditCancelButton.TabIndex = 0;
this.UserEditCancelButton.Text = "Cancel";
this.UserEditCancelButton.UseVisualStyleBackColor = true;
this.UserEditCancelButton.Click += new System.EventHandler(this.CancelButton_Click);
//
// UserEditSaveButton
//
this.UserEditSaveButton.Dock = System.Windows.Forms.DockStyle.Fill;
this.UserEditSaveButton.Location = new System.Drawing.Point(387, 3);
this.UserEditSaveButton.Margin = new System.Windows.Forms.Padding(0);
this.UserEditSaveButton.Name = "UserEditSaveButton";
this.UserEditSaveButton.Size = new System.Drawing.Size(194, 34);
this.UserEditSaveButton.TabIndex = 0;
this.UserEditSaveButton.Text = "Save";
this.UserEditSaveButton.UseVisualStyleBackColor = true;
this.UserEditSaveButton.Click += new System.EventHandler(this.SaveButton_Click);
//
// UserEditRevertButton
//
this.UserEditRevertButton.Dock = System.Windows.Forms.DockStyle.Fill;
this.UserEditRevertButton.Location = new System.Drawing.Point(195, 3);
this.UserEditRevertButton.Margin = new System.Windows.Forms.Padding(0, 0, 3, 0);
this.UserEditRevertButton.Name = "UserEditRevertButton";
this.UserEditRevertButton.Size = new System.Drawing.Size(189, 34);
this.UserEditRevertButton.TabIndex = 0;
this.UserEditRevertButton.Text = "Revert";
this.UserEditRevertButton.UseVisualStyleBackColor = true;
this.UserEditRevertButton.Click += new System.EventHandler(this.RevertButton_Click);
//
// EditTabs
//
this.EditTabs.Controls.Add(this.TabPageUser);
this.EditTabs.Controls.Add(this.TabPageAddresses);
this.EditTabs.Dock = System.Windows.Forms.DockStyle.Fill;
this.EditTabs.Font = new System.Drawing.Font("Segoe UI", 10F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point);
this.EditTabs.ItemSize = new System.Drawing.Size(60, 20);
this.EditTabs.Location = new System.Drawing.Point(0, 0);
this.EditTabs.Margin = new System.Windows.Forms.Padding(0);
this.EditTabs.Name = "EditTabs";
this.EditTabs.Padding = new System.Drawing.Point(0, 0);
this.EditTabs.SelectedIndex = 0;
this.EditTabs.Size = new System.Drawing.Size(584, 201);
this.EditTabs.TabIndex = 0;
//
// TabPageUser
//
this.TabPageUser.Controls.Add(this.TableLayoutPanelUserData);
this.TabPageUser.Font = new System.Drawing.Font("Segoe UI", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point);
this.TabPageUser.Location = new System.Drawing.Point(4, 24);
this.TabPageUser.Margin = new System.Windows.Forms.Padding(0);
this.TabPageUser.Name = "TabPageUser";
this.TabPageUser.Size = new System.Drawing.Size(576, 173);
this.TabPageUser.TabIndex = 0;
this.TabPageUser.Text = "User";
this.TabPageUser.UseVisualStyleBackColor = true;
//
// TableLayoutPanelUserData
//
this.TableLayoutPanelUserData.ColumnCount = 2;
this.TableLayoutPanelUserData.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle());
this.TableLayoutPanelUserData.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 100F));
this.TableLayoutPanelUserData.Controls.Add(this.TextBoxEmail, 1, 2);
this.TableLayoutPanelUserData.Controls.Add(this.TextBoxLastName, 1, 1);
this.TableLayoutPanelUserData.Controls.Add(this.TextBoxFirstName, 1, 0);
this.TableLayoutPanelUserData.Controls.Add(this.DateTimePickerBirthday, 1, 3);
this.TableLayoutPanelUserData.Controls.Add(this.LabelFirstName, 0, 0);
this.TableLayoutPanelUserData.Controls.Add(this.LabelLastName, 0, 1);
this.TableLayoutPanelUserData.Controls.Add(this.LabelEmail, 0, 2);
this.TableLayoutPanelUserData.Controls.Add(this.LabelBirthday, 0, 3);
this.TableLayoutPanelUserData.Dock = System.Windows.Forms.DockStyle.Fill;
this.TableLayoutPanelUserData.Location = new System.Drawing.Point(0, 0);
this.TableLayoutPanelUserData.Margin = new System.Windows.Forms.Padding(0);
this.TableLayoutPanelUserData.Name = "TableLayoutPanelUserData";
this.TableLayoutPanelUserData.Padding = new System.Windows.Forms.Padding(0, 0, 22, 0);
this.TableLayoutPanelUserData.RowCount = 5;
this.TableLayoutPanelUserData.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 43F));
this.TableLayoutPanelUserData.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 43F));
this.TableLayoutPanelUserData.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 43F));
this.TableLayoutPanelUserData.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 43F));
this.TableLayoutPanelUserData.RowStyles.Add(new System.Windows.Forms.RowStyle());
this.TableLayoutPanelUserData.Size = new System.Drawing.Size(576, 173);
this.TableLayoutPanelUserData.TabIndex = 0;
//
// TextBoxEmail
//
this.TextBoxEmail.Dock = System.Windows.Forms.DockStyle.Fill;
this.TextBoxEmail.Location = new System.Drawing.Point(98, 89);
this.TextBoxEmail.MinimumSize = new System.Drawing.Size(0, 40);
this.TextBoxEmail.Name = "TextBoxEmail";
this.TextBoxEmail.PlaceholderText = "Email";
this.TextBoxEmail.Size = new System.Drawing.Size(453, 40);
this.TextBoxEmail.TabIndex = 0;
this.TextBoxEmail.Validating += new System.ComponentModel.CancelEventHandler(this.TextBoxEmail_Validating);
//
// TextBoxLastName
//
this.TextBoxLastName.Dock = System.Windows.Forms.DockStyle.Fill;
this.TextBoxLastName.Location = new System.Drawing.Point(98, 46);
this.TextBoxLastName.MinimumSize = new System.Drawing.Size(0, 40);
this.TextBoxLastName.Name = "TextBoxLastName";
this.TextBoxLastName.PlaceholderText = "Last Name";
this.TextBoxLastName.Size = new System.Drawing.Size(453, 40);
this.TextBoxLastName.TabIndex = 0;
//
// TextBoxFirstName
//
this.TextBoxFirstName.Dock = System.Windows.Forms.DockStyle.Fill;
this.TextBoxFirstName.Location = new System.Drawing.Point(98, 3);
this.TextBoxFirstName.MinimumSize = new System.Drawing.Size(0, 40);
this.TextBoxFirstName.Name = "TextBoxFirstName";
this.TextBoxFirstName.PlaceholderText = "First Name";
this.TextBoxFirstName.Size = new System.Drawing.Size(453, 40);
this.TextBoxFirstName.TabIndex = 0;
//
// DateTimePickerBirthday
//
this.DateTimePickerBirthday.Dock = System.Windows.Forms.DockStyle.Fill;
this.DateTimePickerBirthday.Location = new System.Drawing.Point(98, 132);
this.DateTimePickerBirthday.MinDate = new System.DateTime(1900, 1, 1, 0, 0, 0, 0);
this.DateTimePickerBirthday.MinimumSize = new System.Drawing.Size(0, 40);
this.DateTimePickerBirthday.Name = "DateTimePickerBirthday";
this.DateTimePickerBirthday.Size = new System.Drawing.Size(453, 40);
this.DateTimePickerBirthday.TabIndex = 0;
//
// LabelFirstName
//
this.LabelFirstName.AutoSize = true;
this.LabelFirstName.Dock = System.Windows.Forms.DockStyle.Fill;
this.LabelFirstName.Font = new System.Drawing.Font("Segoe UI", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point);
this.LabelFirstName.Location = new System.Drawing.Point(3, 3);
this.LabelFirstName.Margin = new System.Windows.Forms.Padding(3);
this.LabelFirstName.Name = "LabelFirstName";
this.LabelFirstName.Size = new System.Drawing.Size(89, 37);
this.LabelFirstName.TabIndex = 1;
this.LabelFirstName.Text = "First Name:";
this.LabelFirstName.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
//
// LabelLastName
//
this.LabelLastName.AutoSize = true;
this.LabelLastName.Dock = System.Windows.Forms.DockStyle.Fill;
this.LabelLastName.Font = new System.Drawing.Font("Segoe UI", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point);
this.LabelLastName.Location = new System.Drawing.Point(3, 46);
this.LabelLastName.Margin = new System.Windows.Forms.Padding(3);
this.LabelLastName.Name = "LabelLastName";
this.LabelLastName.Size = new System.Drawing.Size(89, 37);
this.LabelLastName.TabIndex = 2;
this.LabelLastName.Text = "Last Name:";
this.LabelLastName.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
//
// LabelEmail
//
this.LabelEmail.AutoSize = true;
this.LabelEmail.Dock = System.Windows.Forms.DockStyle.Fill;
this.LabelEmail.Font = new System.Drawing.Font("Segoe UI", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point);
this.LabelEmail.Location = new System.Drawing.Point(3, 89);
this.LabelEmail.Margin = new System.Windows.Forms.Padding(3);
this.LabelEmail.Name = "LabelEmail";
this.LabelEmail.Size = new System.Drawing.Size(89, 37);
this.LabelEmail.TabIndex = 3;
this.LabelEmail.Text = "Email:";
this.LabelEmail.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
//
// LabelBirthday
//
this.LabelBirthday.AutoSize = true;
this.LabelBirthday.Dock = System.Windows.Forms.DockStyle.Fill;
this.LabelBirthday.Font = new System.Drawing.Font("Segoe UI", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point);
this.LabelBirthday.Location = new System.Drawing.Point(3, 132);
this.LabelBirthday.Margin = new System.Windows.Forms.Padding(3);
this.LabelBirthday.Name = "LabelBirthday";
this.LabelBirthday.Size = new System.Drawing.Size(89, 37);
this.LabelBirthday.TabIndex = 4;
this.LabelBirthday.Text = "Birthday:";
this.LabelBirthday.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
//
// TabPageAddresses
//
this.TabPageAddresses.Controls.Add(this.DataGridViewAddresses);
this.TabPageAddresses.Location = new System.Drawing.Point(4, 24);
this.TabPageAddresses.Margin = new System.Windows.Forms.Padding(0);
this.TabPageAddresses.Name = "TabPageAddresses";
this.TabPageAddresses.Size = new System.Drawing.Size(576, 173);
this.TabPageAddresses.TabIndex = 1;
this.TabPageAddresses.Text = "Addresses";
this.TabPageAddresses.UseVisualStyleBackColor = true;
//
// DataGridViewAddresses
//
this.DataGridViewAddresses.AllowUserToDeleteRows = false;
this.DataGridViewAddresses.AllowUserToResizeRows = false;
this.DataGridViewAddresses.AutoSizeColumnsMode = System.Windows.Forms.DataGridViewAutoSizeColumnsMode.Fill;
this.DataGridViewAddresses.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
this.DataGridViewAddresses.Dock = System.Windows.Forms.DockStyle.Fill;
this.DataGridViewAddresses.Location = new System.Drawing.Point(0, 0);
this.DataGridViewAddresses.Name = "DataGridViewAddresses";
this.DataGridViewAddresses.RowHeadersVisible = false;
this.DataGridViewAddresses.RowTemplate.ContextMenuStrip = this.ContextMenuStripAddress;
this.DataGridViewAddresses.RowTemplate.Height = 25;
this.DataGridViewAddresses.Size = new System.Drawing.Size(576, 173);
this.DataGridViewAddresses.TabIndex = 0;
this.DataGridViewAddresses.CellClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.DataGridViewAddresses_CellClick);
this.DataGridViewAddresses.CellFormatting += new System.Windows.Forms.DataGridViewCellFormattingEventHandler(this.DataGridViewAddresses_CellFormatting);
this.DataGridViewAddresses.CellMouseEnter += new System.Windows.Forms.DataGridViewCellEventHandler(this.DataGridViewAddresses_CellMouseEnter);
this.DataGridViewAddresses.CurrentCellDirtyStateChanged += new System.EventHandler(this.DataGridViewAddresses_CurrentCellDirtyStateChanged);
//
// TableLayoutPanelVerticalSplit
//
this.TableLayoutPanelVerticalSplit.ColumnCount = 1;
this.TableLayoutPanelVerticalSplit.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 100F));
this.TableLayoutPanelVerticalSplit.Controls.Add(this.EditTabs, 0, 0);
this.TableLayoutPanelVerticalSplit.Controls.Add(this.TableLayoutPanelButtons, 0, 1);
this.TableLayoutPanelVerticalSplit.Dock = System.Windows.Forms.DockStyle.Fill;
this.TableLayoutPanelVerticalSplit.Location = new System.Drawing.Point(0, 0);
this.TableLayoutPanelVerticalSplit.Margin = new System.Windows.Forms.Padding(6);
this.TableLayoutPanelVerticalSplit.Name = "TableLayoutPanelVerticalSplit";
this.TableLayoutPanelVerticalSplit.RowCount = 2;
this.TableLayoutPanelVerticalSplit.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 100F));
this.TableLayoutPanelVerticalSplit.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 40F));
this.TableLayoutPanelVerticalSplit.Size = new System.Drawing.Size(584, 241);
this.TableLayoutPanelVerticalSplit.TabIndex = 2;
//
// ErrorProviderUserEdit
//
this.ErrorProviderUserEdit.BlinkStyle = System.Windows.Forms.ErrorBlinkStyle.NeverBlink;
this.ErrorProviderUserEdit.ContainerControl = this;
//
// UserEditForm
//
this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 15F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(584, 241);
this.Controls.Add(this.TableLayoutPanelVerticalSplit);
this.MinimumSize = new System.Drawing.Size(550, 280);
this.Name = "UserEditForm";
this.Text = "UserEditForm";
this.ContextMenuStripAddress.ResumeLayout(false);
this.TableLayoutPanelButtons.ResumeLayout(false);
this.EditTabs.ResumeLayout(false);
this.TabPageUser.ResumeLayout(false);
this.TableLayoutPanelUserData.ResumeLayout(false);
this.TableLayoutPanelUserData.PerformLayout();
this.TabPageAddresses.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)(this.DataGridViewAddresses)).EndInit();
this.TableLayoutPanelVerticalSplit.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)(this.ErrorProviderUserEdit)).EndInit();
this.ResumeLayout(false);
}
#endregion
private ContextMenuStrip ContextMenuStripAddress;
private ToolStripMenuItem ToolStripMenuItemMakeDefaultBilling;
private ToolStripMenuItem ToolStripMenuItemMakeDefaultShipping;
private TableLayoutPanel TableLayoutPanelButtons;
private Button UserEditCancelButton;
private Button UserEditSaveButton;
private Button UserEditRevertButton;
private TabControl EditTabs;
private TabPage TabPageUser;
private TableLayoutPanel TableLayoutPanelUserData;
private TextBox TextBoxEmail;
private TextBox TextBoxLastName;
private TextBox TextBoxFirstName;
private DateTimePicker DateTimePickerBirthday;
private Label LabelFirstName;
private Label LabelLastName;
private Label LabelEmail;
private Label LabelBirthday;
private TabPage TabPageAddresses;
private DataGridView DataGridViewAddresses;
private TableLayoutPanel TableLayoutPanelVerticalSplit;
private ErrorProvider ErrorProviderUserEdit;
private ToolStripMenuItem DeleteToolStripMenuItem;
}
}

View file

@ -0,0 +1,183 @@
using Mysql_example.Database.Schema;
using Mysql_example.Util;
using System.ComponentModel;
using System.Globalization;
namespace Mysql_example
{
public partial class UserEditForm : Form
{
User user;
User user_copy;
public delegate void SaveUserDelegate(ref User user);
public SaveUserDelegate SaveUserCallback;
private DataGridViewCellEventArgs mouseLocation;
private bool isEmailValid = true;
public UserEditForm(ref User _user)
{
this.user = _user;
this.user_copy = new User(user);
InitializeComponent();
BindUserData();
BindAddressData();
this.Text = user.FirstName + " " + user.LastName;
}
private void BindUserData()
{
TextBoxFirstName.DataBindings.Clear();
TextBoxFirstName.DataBindings.Add(nameof(TextBoxFirstName.Text), user_copy, nameof(user_copy.FirstName));
TextBoxLastName.DataBindings.Clear();
TextBoxLastName.DataBindings.Add(nameof(TextBoxLastName.Text), user_copy, nameof(user_copy.LastName));
TextBoxEmail.DataBindings.Clear();
TextBoxEmail.DataBindings.Add(nameof(TextBoxEmail.Text), user_copy, nameof(user_copy.Email));
DateTimePickerBirthday.DataBindings.Clear();
DateTimePickerBirthday.DataBindings.Add(nameof(DateTimePickerBirthday.Value), user_copy, nameof(user_copy.Birthday));
}
private void BindAddressData()
{
DataGridViewColumn oldColumn = DataGridViewAddresses.Columns["Country"];
if (oldColumn != null)DataGridViewAddresses.Columns.Remove(oldColumn);
DataGridViewAddresses.DataSource = Utility.addressesToBindingList(user_copy.Addresses);
(DataGridViewAddresses.DataSource as BindingList<Address>).ListChanged += UserEditForm_ListChanged;
DataGridViewAddresses.Columns[nameof(Address.Region)].Visible= false;
DataGridViewAddresses.Columns[nameof(Address.RegionCode)].Visible = false;
DataGridViewComboBoxColumn countryColumn= new DataGridViewComboBoxColumn();
countryColumn.HeaderText = "Country";
countryColumn.Name= "Country";
countryColumn.DataSource = Address.regionInfos;
countryColumn.DisplayMember = nameof(RegionInfo.EnglishName);
countryColumn.DataPropertyName = nameof(Address.Region);
countryColumn.ValueMember = nameof(RegionInfo.Name);
DataGridViewAddresses.Columns.Add(countryColumn);
}
private void UserEditForm_ListChanged(object? sender, ListChangedEventArgs e)
{
BindingList<Address> bindingList = sender as BindingList<Address>;
if (e.ListChangedType == ListChangedType.ItemAdded && bindingList.Count > user_copy.Addresses.Values.Count)
{
Address newAddress = bindingList.Last();
user_copy.Addresses[newAddress.Id] = newAddress;
}
if (e.ListChangedType == ListChangedType.ItemDeleted && bindingList.Count < user_copy.Addresses.Values.Count)
{
Address oldAddress = user_copy.Addresses.Values.ToList()[e.NewIndex];
user_copy.Addresses.Remove(oldAddress.Id);
user_copy.deletedAddreses.Add(oldAddress);
if (user_copy.BillingAdress != null && user_copy.BillingAdress.Id == oldAddress.Id) user_copy.BillingAdress = null;
if (user_copy.BillingAdress != null && user_copy.ShippingAddress.Id == oldAddress.Id) user_copy.ShippingAddress = null;
}
}
private void DataGridViewAddresses_CellFormatting(object sender, DataGridViewCellFormattingEventArgs e)
{
DataGridViewRow dataRow = DataGridViewAddresses.Rows[e.RowIndex];
Address address = dataRow.DataBoundItem as Address;
if(address == null) return;
string matches = "";
if (user_copy.BillingAdress != null && user_copy.BillingAdress.Id == address.Id) matches += "billing";
if (user_copy.ShippingAddress != null && user_copy.ShippingAddress.Id == address.Id) matches += "shipping";
switch (matches)
{
case "billing":
dataRow.DefaultCellStyle.BackColor = Color.Green;
break;
case "shipping":
dataRow.DefaultCellStyle.BackColor = Color.Yellow;
break;
case "billingshipping":
dataRow.DefaultCellStyle.BackColor = Color.Blue;
break;
default:
dataRow.DefaultCellStyle.BackColor = base.BackColor;
break;
}
}
private void CancelButton_Click(object sender, EventArgs e)
{
this.Close();
}
private void RevertButton_Click(object sender, EventArgs e)
{
DialogResult dialogResult = MessageBox.Show("You will loose all your Changes", "revert Changes", MessageBoxButtons.YesNo);
if (dialogResult == DialogResult.No) return;
user_copy = new User(user);
BindUserData();
BindAddressData();
}
private void SaveButton_Click(object sender, EventArgs e)
{
if (!isEmailValid)
{
MessageBox.Show("Can't Save Email is Invalid");
return;
}
SaveUserCallback(ref user_copy);
Close();
}
// Update Copy of User Callbacks
private void DataGridViewAddresses_CellMouseEnter(object sender, DataGridViewCellEventArgs e)
{
mouseLocation = e;
}
private void ToolStripMenuItemMakeDefaultBilling_Click(object sender, EventArgs e)
{
if (DataGridViewAddresses.Rows.Count - 1 == mouseLocation.RowIndex) return;
DataGridViewRow row = DataGridViewAddresses.Rows[mouseLocation.RowIndex];
Address address = row.DataBoundItem as Address;
user_copy.BillingAdress = address;
DataGridViewAddresses.Refresh();
}
private void ToolStripMenuItemMakeDefaultShipping_Click(object sender, EventArgs e)
{
if (DataGridViewAddresses.Rows.Count - 1 == mouseLocation.RowIndex) return;
DataGridViewRow row = DataGridViewAddresses.Rows[mouseLocation.RowIndex];
Address address = row.DataBoundItem as Address;
user_copy.ShippingAddress = address;
DataGridViewAddresses.Refresh();
}
private void ToolStripMenuItemDelete_Click(object sender, EventArgs e)
{
DialogResult dialogResult = MessageBox.Show("Delete Address?", "Address Deletion", MessageBoxButtons.YesNo);
if (dialogResult == DialogResult.No) return;
if (DataGridViewAddresses.Rows.Count - 1 == mouseLocation.RowIndex) return;
DataGridViewRow row = DataGridViewAddresses.Rows[mouseLocation.RowIndex];
Address address = row.DataBoundItem as Address;
(DataGridViewAddresses.DataSource as BindingList<Address>).Remove(address);
}
private void DataGridViewAddresses_CellClick(object sender, DataGridViewCellEventArgs e)
{
bool validClick = (e.RowIndex != -1 && e.ColumnIndex != -1);
if (validClick) DataGridViewAddresses.BeginEdit(true);
if (DataGridViewAddresses.Columns[e.ColumnIndex] is DataGridViewComboBoxColumn && validClick) ((ComboBox)DataGridViewAddresses.EditingControl).DroppedDown = true;
}
private void DataGridViewAddresses_CurrentCellDirtyStateChanged(object sender, EventArgs e)
{
DataGridViewAddresses.CommitEdit(DataGridViewDataErrorContexts.Commit);
}
public void TextBoxEmail_Validating(object sender, System.ComponentModel.CancelEventArgs e)
{
if (Utility.IsValidEmail(TextBoxEmail.Text))
{
ErrorProviderUserEdit.SetError(TextBoxEmail, "");
isEmailValid = true;
return;
}
ErrorProviderUserEdit.SetError(TextBoxEmail, "Email is Invalid");
ErrorProviderUserEdit.SetIconPadding(TextBoxEmail, 3);
isEmailValid = false;
}
}
}

View file

@ -0,0 +1,66 @@
<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="ContextMenuStripAddress.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>17, 17</value>
</metadata>
<metadata name="ErrorProviderUserEdit.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>204, 17</value>
</metadata>
</root>

View file

@ -0,0 +1,93 @@
using System;
using System.Collections;
using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
using System.Reflection;
using System.Text;
using System.Threading.Tasks;
namespace Mysql_example.Util
{
public class SortableBindingList<T> : BindingList<T>
{
private bool IsSorted { get; set; }
private ListSortDirection SortDirection { get; set; }
private PropertyDescriptor SortProperty { get; set; }
private readonly List<T>? _originalData;
protected override bool SupportsSortingCore
{
get
{
return true;
}
}
protected override ListSortDirection SortDirectionCore
{
get
{
return SortDirection;
}
}
protected override PropertyDescriptor SortPropertyCore
{
get
{
return SortProperty;
}
}
protected override void ApplySortCore(PropertyDescriptor PDsc, ListSortDirection Direction)
{
List<T> items = Items as List<T>;
if (items is null)
{
IsSorted = false;
}
else
{
var PCom = new PCompare<T>(PDsc.Name, Direction);
items.Sort(PCom);
IsSorted = true;
SortDirection = Direction;
SortProperty = PDsc;
}
OnListChanged(new ListChangedEventArgs(ListChangedType.Reset, -1));
}
protected override bool IsSortedCore
{
get
{
return IsSorted;
}
}
protected override void RemoveSortCore()
{
IsSorted = false;
}
#region Constructors
public SortableBindingList(ICollection<T> list) : base((IList<T>)list)
{
}
public SortableBindingList() : base()
{
}
#endregion
#region Property comparer
private class PCompare<Type> : IComparer<T> where Type : T
{
private PropertyInfo PropInfo { get; set; }
private ListSortDirection SortDir { get; set; }
internal PCompare(string SortProperty, ListSortDirection SortDirection)
{
PropInfo = typeof(T).GetProperty(SortProperty);
SortDir = SortDirection;
}
internal int Compare(T x, T y)
{
return SortDir == ListSortDirection.Ascending ? Comparer.Default.Compare(PropInfo.GetValue(x, null), PropInfo.GetValue(y, null)) : Comparer.Default.Compare(PropInfo.GetValue(y, null), PropInfo.GetValue(x, null));
}
int IComparer<T>.Compare(T x, T y) => Compare(x, y);
}
#endregion
}
}

View file

@ -0,0 +1,43 @@
using Mysql_example.Database.Schema;
using System.Text.RegularExpressions;
namespace Mysql_example.Util
{
public static class Utility
{
private static Regex emailValidationRegex = new Regex(@"^([\w\.\-\+]+)@([\w\-]+)((\.(\w){2,3})+)$");
public static SortableBindingList<Address> addressesToBindingList(Dictionary<ulong, Address> adresses)
{
SortableBindingList<Address> bindingList = new SortableBindingList<Address>();
foreach (Address address in adresses.Values)
{
bindingList.Add(address);
}
return bindingList;
}
public static SortableBindingList<User> usersToBindingList(Dictionary<ulong, User> users)
{
SortableBindingList<User> bindingList = new SortableBindingList<User>();
foreach (User user in users.Values)
{
bindingList.Add(new User(user));
}
return bindingList;
}
public static string dateTimeToDatabaseTimestamp(DateTime dateTime)
{
return dateTime.ToString("yyyy-MM-dd HH:mm:ss");
}
public static string dateTimeToDatabaseBirthday(DateTime dateTime)
{
return dateTime.ToString("yyyy-MM-dd");
}
public static bool IsValidEmail(string email)
{
return emailValidationRegex.Match(email).Success;
}
}
}

Binary file not shown.

View file

@ -0,0 +1,440 @@
{
"runtimeTarget": {
"name": ".NETCoreApp,Version=v7.0",
"signature": ""
},
"compilationOptions": {},
"targets": {
".NETCoreApp,Version=v7.0": {
"Mysql-example/1.0.0": {
"dependencies": {
"MySql.Data": "8.0.33"
},
"runtime": {
"Mysql-example.dll": {}
}
},
"Google.Protobuf/3.21.9": {
"runtime": {
"lib/net5.0/Google.Protobuf.dll": {
"assemblyVersion": "3.21.9.0",
"fileVersion": "3.21.9.0"
}
}
},
"K4os.Compression.LZ4/1.3.5": {
"runtime": {
"lib/net6.0/K4os.Compression.LZ4.dll": {
"assemblyVersion": "1.3.5.0",
"fileVersion": "1.3.5.0"
}
}
},
"K4os.Compression.LZ4.Streams/1.3.5": {
"dependencies": {
"K4os.Compression.LZ4": "1.3.5",
"K4os.Hash.xxHash": "1.0.8",
"System.IO.Pipelines": "6.0.3"
},
"runtime": {
"lib/net6.0/K4os.Compression.LZ4.Streams.dll": {
"assemblyVersion": "1.3.5.0",
"fileVersion": "1.3.5.0"
}
}
},
"K4os.Hash.xxHash/1.0.8": {
"runtime": {
"lib/net6.0/K4os.Hash.xxHash.dll": {
"assemblyVersion": "1.0.8.0",
"fileVersion": "1.0.8.0"
}
}
},
"Microsoft.NETCore.Platforms/3.1.0": {},
"Microsoft.NETCore.Targets/1.1.0": {},
"Microsoft.Win32.SystemEvents/4.7.0": {
"dependencies": {
"Microsoft.NETCore.Platforms": "3.1.0"
}
},
"MySql.Data/8.0.33": {
"dependencies": {
"Google.Protobuf": "3.21.9",
"K4os.Compression.LZ4.Streams": "1.3.5",
"Portable.BouncyCastle": "1.9.0",
"System.Buffers": "4.5.1",
"System.Configuration.ConfigurationManager": "4.4.1",
"System.Runtime.CompilerServices.Unsafe": "6.0.0",
"System.Runtime.Loader": "4.3.0",
"System.Security.Permissions": "4.7.0",
"System.Text.Encoding.CodePages": "4.4.0",
"System.Text.Json": "7.0.1",
"System.Threading.Tasks.Extensions": "4.5.4"
},
"runtime": {
"lib/net7.0/MySql.Data.dll": {
"assemblyVersion": "8.0.33.0",
"fileVersion": "8.0.33.0"
}
},
"runtimeTargets": {
"runtimes/win-x64/native/comerr64.dll": {
"rid": "win-x64",
"assetType": "native",
"fileVersion": "4.1.0.0"
},
"runtimes/win-x64/native/gssapi64.dll": {
"rid": "win-x64",
"assetType": "native",
"fileVersion": "4.1.0.0"
},
"runtimes/win-x64/native/k5sprt64.dll": {
"rid": "win-x64",
"assetType": "native",
"fileVersion": "4.1.0.0"
},
"runtimes/win-x64/native/krb5_64.dll": {
"rid": "win-x64",
"assetType": "native",
"fileVersion": "4.1.0.0"
},
"runtimes/win-x64/native/krbcc64.dll": {
"rid": "win-x64",
"assetType": "native",
"fileVersion": "4.1.0.0"
}
}
},
"Portable.BouncyCastle/1.9.0": {
"runtime": {
"lib/netstandard2.0/BouncyCastle.Crypto.dll": {
"assemblyVersion": "1.9.0.0",
"fileVersion": "1.9.0.1"
}
}
},
"System.Buffers/4.5.1": {},
"System.Configuration.ConfigurationManager/4.4.1": {
"dependencies": {
"System.Security.Cryptography.ProtectedData": "4.4.0"
}
},
"System.Drawing.Common/4.7.0": {
"dependencies": {
"Microsoft.NETCore.Platforms": "3.1.0",
"Microsoft.Win32.SystemEvents": "4.7.0"
}
},
"System.IO/4.3.0": {
"dependencies": {
"Microsoft.NETCore.Platforms": "3.1.0",
"Microsoft.NETCore.Targets": "1.1.0",
"System.Runtime": "4.3.0",
"System.Text.Encoding": "4.3.0",
"System.Threading.Tasks": "4.3.0"
}
},
"System.IO.Pipelines/6.0.3": {
"runtime": {
"lib/net6.0/System.IO.Pipelines.dll": {
"assemblyVersion": "6.0.0.0",
"fileVersion": "6.0.522.21309"
}
}
},
"System.Reflection/4.3.0": {
"dependencies": {
"Microsoft.NETCore.Platforms": "3.1.0",
"Microsoft.NETCore.Targets": "1.1.0",
"System.IO": "4.3.0",
"System.Reflection.Primitives": "4.3.0",
"System.Runtime": "4.3.0"
}
},
"System.Reflection.Primitives/4.3.0": {
"dependencies": {
"Microsoft.NETCore.Platforms": "3.1.0",
"Microsoft.NETCore.Targets": "1.1.0",
"System.Runtime": "4.3.0"
}
},
"System.Runtime/4.3.0": {
"dependencies": {
"Microsoft.NETCore.Platforms": "3.1.0",
"Microsoft.NETCore.Targets": "1.1.0"
}
},
"System.Runtime.CompilerServices.Unsafe/6.0.0": {},
"System.Runtime.Loader/4.3.0": {
"dependencies": {
"System.IO": "4.3.0",
"System.Reflection": "4.3.0",
"System.Runtime": "4.3.0"
}
},
"System.Security.AccessControl/4.7.0": {
"dependencies": {
"Microsoft.NETCore.Platforms": "3.1.0",
"System.Security.Principal.Windows": "4.7.0"
}
},
"System.Security.Cryptography.ProtectedData/4.4.0": {},
"System.Security.Permissions/4.7.0": {
"dependencies": {
"System.Security.AccessControl": "4.7.0",
"System.Windows.Extensions": "4.7.0"
}
},
"System.Security.Principal.Windows/4.7.0": {},
"System.Text.Encoding/4.3.0": {
"dependencies": {
"Microsoft.NETCore.Platforms": "3.1.0",
"Microsoft.NETCore.Targets": "1.1.0",
"System.Runtime": "4.3.0"
}
},
"System.Text.Encoding.CodePages/4.4.0": {
"dependencies": {
"Microsoft.NETCore.Platforms": "3.1.0"
}
},
"System.Text.Encodings.Web/7.0.0": {},
"System.Text.Json/7.0.1": {
"dependencies": {
"System.Text.Encodings.Web": "7.0.0"
}
},
"System.Threading.Tasks/4.3.0": {
"dependencies": {
"Microsoft.NETCore.Platforms": "3.1.0",
"Microsoft.NETCore.Targets": "1.1.0",
"System.Runtime": "4.3.0"
}
},
"System.Threading.Tasks.Extensions/4.5.4": {},
"System.Windows.Extensions/4.7.0": {
"dependencies": {
"System.Drawing.Common": "4.7.0"
}
}
}
},
"libraries": {
"Mysql-example/1.0.0": {
"type": "project",
"serviceable": false,
"sha512": ""
},
"Google.Protobuf/3.21.9": {
"type": "package",
"serviceable": true,
"sha512": "sha512-OTpFujTgkmqMLbg3KT7F/iuKi1rg6s5FCS2M9XcVLDn40zL8wgXm37CY/F6MeOEXKjdcnXGCN/h7oyMkVydVsg==",
"path": "google.protobuf/3.21.9",
"hashPath": "google.protobuf.3.21.9.nupkg.sha512"
},
"K4os.Compression.LZ4/1.3.5": {
"type": "package",
"serviceable": true,
"sha512": "sha512-TS4mqlT0X1OlnvOGNfl02QdVUhuqgWuCnn7UxupIa7C9Pb6qlQ5yZA2sPhRh0OSmVULaQU64KV4wJuu//UyVQQ==",
"path": "k4os.compression.lz4/1.3.5",
"hashPath": "k4os.compression.lz4.1.3.5.nupkg.sha512"
},
"K4os.Compression.LZ4.Streams/1.3.5": {
"type": "package",
"serviceable": true,
"sha512": "sha512-M0NufZI8ym3mm6F6HMSPz1jw7TJGdY74fjAtbIXATmnAva/8xLz50eQZJI9tf9mMeHUaFDg76N1BmEh8GR5zeA==",
"path": "k4os.compression.lz4.streams/1.3.5",
"hashPath": "k4os.compression.lz4.streams.1.3.5.nupkg.sha512"
},
"K4os.Hash.xxHash/1.0.8": {
"type": "package",
"serviceable": true,
"sha512": "sha512-Wp2F7BamQ2Q/7Hk834nV9vRQapgcr8kgv9Jvfm8J3D0IhDqZMMl+a2yxUq5ltJitvXvQfB8W6K4F4fCbw/P6YQ==",
"path": "k4os.hash.xxhash/1.0.8",
"hashPath": "k4os.hash.xxhash.1.0.8.nupkg.sha512"
},
"Microsoft.NETCore.Platforms/3.1.0": {
"type": "package",
"serviceable": true,
"sha512": "sha512-z7aeg8oHln2CuNulfhiLYxCVMPEwBl3rzicjvIX+4sUuCwvXw5oXQEtbiU2c0z4qYL5L3Kmx0mMA/+t/SbY67w==",
"path": "microsoft.netcore.platforms/3.1.0",
"hashPath": "microsoft.netcore.platforms.3.1.0.nupkg.sha512"
},
"Microsoft.NETCore.Targets/1.1.0": {
"type": "package",
"serviceable": true,
"sha512": "sha512-aOZA3BWfz9RXjpzt0sRJJMjAscAUm3Hoa4UWAfceV9UTYxgwZ1lZt5nO2myFf+/jetYQo4uTP7zS8sJY67BBxg==",
"path": "microsoft.netcore.targets/1.1.0",
"hashPath": "microsoft.netcore.targets.1.1.0.nupkg.sha512"
},
"Microsoft.Win32.SystemEvents/4.7.0": {
"type": "package",
"serviceable": true,
"sha512": "sha512-mtVirZr++rq+XCDITMUdnETD59XoeMxSpLRIII7JRI6Yj0LEDiO1pPn0ktlnIj12Ix8bfvQqQDMMIF9wC98oCA==",
"path": "microsoft.win32.systemevents/4.7.0",
"hashPath": "microsoft.win32.systemevents.4.7.0.nupkg.sha512"
},
"MySql.Data/8.0.33": {
"type": "package",
"serviceable": true,
"sha512": "sha512-mW+A9tc0s+3E3+XYe80aJmr/AvZoKBZG44w13AdVf4+1iRDwgdL6eLMPZgHyQFGwdLwNvQNPKegcOE4rRDuv8Q==",
"path": "mysql.data/8.0.33",
"hashPath": "mysql.data.8.0.33.nupkg.sha512"
},
"Portable.BouncyCastle/1.9.0": {
"type": "package",
"serviceable": true,
"sha512": "sha512-eZZBCABzVOek+id9Xy04HhmgykF0wZg9wpByzrWN7q8qEI0Qen9b7tfd7w8VA3dOeesumMG7C5ZPy0jk7PSRHw==",
"path": "portable.bouncycastle/1.9.0",
"hashPath": "portable.bouncycastle.1.9.0.nupkg.sha512"
},
"System.Buffers/4.5.1": {
"type": "package",
"serviceable": true,
"sha512": "sha512-Rw7ijyl1qqRS0YQD/WycNst8hUUMgrMH4FCn1nNm27M4VxchZ1js3fVjQaANHO5f3sN4isvP4a+Met9Y4YomAg==",
"path": "system.buffers/4.5.1",
"hashPath": "system.buffers.4.5.1.nupkg.sha512"
},
"System.Configuration.ConfigurationManager/4.4.1": {
"type": "package",
"serviceable": true,
"sha512": "sha512-jz3TWKMAeuDEyrPCK5Jyt4bzQcmzUIMcY9Ud6PkElFxTfnsihV+9N/UCqvxe1z5gc7jMYAnj7V1COMS9QKIuHQ==",
"path": "system.configuration.configurationmanager/4.4.1",
"hashPath": "system.configuration.configurationmanager.4.4.1.nupkg.sha512"
},
"System.Drawing.Common/4.7.0": {
"type": "package",
"serviceable": true,
"sha512": "sha512-v+XbyYHaZjDfn0ENmJEV1VYLgGgCTx1gnfOBcppowbpOAriglYgGCvFCPr2EEZyBvXlpxbEsTwkOlInl107ahA==",
"path": "system.drawing.common/4.7.0",
"hashPath": "system.drawing.common.4.7.0.nupkg.sha512"
},
"System.IO/4.3.0": {
"type": "package",
"serviceable": true,
"sha512": "sha512-3qjaHvxQPDpSOYICjUoTsmoq5u6QJAFRUITgeT/4gqkF1bajbSmb1kwSxEA8AHlofqgcKJcM8udgieRNhaJ5Cg==",
"path": "system.io/4.3.0",
"hashPath": "system.io.4.3.0.nupkg.sha512"
},
"System.IO.Pipelines/6.0.3": {
"type": "package",
"serviceable": true,
"sha512": "sha512-ryTgF+iFkpGZY1vRQhfCzX0xTdlV3pyaTTqRu2ETbEv+HlV7O6y7hyQURnghNIXvctl5DuZ//Dpks6HdL/Txgw==",
"path": "system.io.pipelines/6.0.3",
"hashPath": "system.io.pipelines.6.0.3.nupkg.sha512"
},
"System.Reflection/4.3.0": {
"type": "package",
"serviceable": true,
"sha512": "sha512-KMiAFoW7MfJGa9nDFNcfu+FpEdiHpWgTcS2HdMpDvt9saK3y/G4GwprPyzqjFH9NTaGPQeWNHU+iDlDILj96aQ==",
"path": "system.reflection/4.3.0",
"hashPath": "system.reflection.4.3.0.nupkg.sha512"
},
"System.Reflection.Primitives/4.3.0": {
"type": "package",
"serviceable": true,
"sha512": "sha512-5RXItQz5As4xN2/YUDxdpsEkMhvw3e6aNveFXUn4Hl/udNTCNhnKp8lT9fnc3MhvGKh1baak5CovpuQUXHAlIA==",
"path": "system.reflection.primitives/4.3.0",
"hashPath": "system.reflection.primitives.4.3.0.nupkg.sha512"
},
"System.Runtime/4.3.0": {
"type": "package",
"serviceable": true,
"sha512": "sha512-JufQi0vPQ0xGnAczR13AUFglDyVYt4Kqnz1AZaiKZ5+GICq0/1MH/mO/eAJHt/mHW1zjKBJd7kV26SrxddAhiw==",
"path": "system.runtime/4.3.0",
"hashPath": "system.runtime.4.3.0.nupkg.sha512"
},
"System.Runtime.CompilerServices.Unsafe/6.0.0": {
"type": "package",
"serviceable": true,
"sha512": "sha512-/iUeP3tq1S0XdNNoMz5C9twLSrM/TH+qElHkXWaPvuNOt+99G75NrV0OS2EqHx5wMN7popYjpc8oTjC1y16DLg==",
"path": "system.runtime.compilerservices.unsafe/6.0.0",
"hashPath": "system.runtime.compilerservices.unsafe.6.0.0.nupkg.sha512"
},
"System.Runtime.Loader/4.3.0": {
"type": "package",
"serviceable": true,
"sha512": "sha512-DHMaRn8D8YCK2GG2pw+UzNxn/OHVfaWx7OTLBD/hPegHZZgcZh3H6seWegrC4BYwsfuGrywIuT+MQs+rPqRLTQ==",
"path": "system.runtime.loader/4.3.0",
"hashPath": "system.runtime.loader.4.3.0.nupkg.sha512"
},
"System.Security.AccessControl/4.7.0": {
"type": "package",
"serviceable": true,
"sha512": "sha512-JECvTt5aFF3WT3gHpfofL2MNNP6v84sxtXxpqhLBCcDRzqsPBmHhQ6shv4DwwN2tRlzsUxtb3G9M3763rbXKDg==",
"path": "system.security.accesscontrol/4.7.0",
"hashPath": "system.security.accesscontrol.4.7.0.nupkg.sha512"
},
"System.Security.Cryptography.ProtectedData/4.4.0": {
"type": "package",
"serviceable": true,
"sha512": "sha512-cJV7ScGW7EhatRsjehfvvYVBvtiSMKgN8bOVI0bQhnF5bU7vnHVIsH49Kva7i7GWaWYvmEzkYVk1TC+gZYBEog==",
"path": "system.security.cryptography.protecteddata/4.4.0",
"hashPath": "system.security.cryptography.protecteddata.4.4.0.nupkg.sha512"
},
"System.Security.Permissions/4.7.0": {
"type": "package",
"serviceable": true,
"sha512": "sha512-dkOV6YYVBnYRa15/yv004eCGRBVADXw8qRbbNiCn/XpdJSUXkkUeIvdvFHkvnko4CdKMqG8yRHC4ox83LSlMsQ==",
"path": "system.security.permissions/4.7.0",
"hashPath": "system.security.permissions.4.7.0.nupkg.sha512"
},
"System.Security.Principal.Windows/4.7.0": {
"type": "package",
"serviceable": true,
"sha512": "sha512-ojD0PX0XhneCsUbAZVKdb7h/70vyYMDYs85lwEI+LngEONe/17A0cFaRFqZU+sOEidcVswYWikYOQ9PPfjlbtQ==",
"path": "system.security.principal.windows/4.7.0",
"hashPath": "system.security.principal.windows.4.7.0.nupkg.sha512"
},
"System.Text.Encoding/4.3.0": {
"type": "package",
"serviceable": true,
"sha512": "sha512-BiIg+KWaSDOITze6jGQynxg64naAPtqGHBwDrLaCtixsa5bKiR8dpPOHA7ge3C0JJQizJE+sfkz1wV+BAKAYZw==",
"path": "system.text.encoding/4.3.0",
"hashPath": "system.text.encoding.4.3.0.nupkg.sha512"
},
"System.Text.Encoding.CodePages/4.4.0": {
"type": "package",
"serviceable": true,
"sha512": "sha512-6JX7ZdaceBiLKLkYt8zJcp4xTJd1uYyXXEkPw6mnlUIjh1gZPIVKPtRXPmY5kLf6DwZmf5YLwR3QUrRonl7l0A==",
"path": "system.text.encoding.codepages/4.4.0",
"hashPath": "system.text.encoding.codepages.4.4.0.nupkg.sha512"
},
"System.Text.Encodings.Web/7.0.0": {
"type": "package",
"serviceable": true,
"sha512": "sha512-OP6umVGxc0Z0MvZQBVigj4/U31Pw72ITihDWP9WiWDm+q5aoe0GaJivsfYGq53o6dxH7DcXWiCTl7+0o2CGdmg==",
"path": "system.text.encodings.web/7.0.0",
"hashPath": "system.text.encodings.web.7.0.0.nupkg.sha512"
},
"System.Text.Json/7.0.1": {
"type": "package",
"serviceable": true,
"sha512": "sha512-OtDEmCCiNl8JAduFKZ/r0Sw6XZNHwIicUYy/mXgMDGeOsZLshH37qi3oPRzFYiryVktiMoQLByMGPtRCEMYbeQ==",
"path": "system.text.json/7.0.1",
"hashPath": "system.text.json.7.0.1.nupkg.sha512"
},
"System.Threading.Tasks/4.3.0": {
"type": "package",
"serviceable": true,
"sha512": "sha512-LbSxKEdOUhVe8BezB/9uOGGppt+nZf6e1VFyw6v3DN6lqitm0OSn2uXMOdtP0M3W4iMcqcivm2J6UgqiwwnXiA==",
"path": "system.threading.tasks/4.3.0",
"hashPath": "system.threading.tasks.4.3.0.nupkg.sha512"
},
"System.Threading.Tasks.Extensions/4.5.4": {
"type": "package",
"serviceable": true,
"sha512": "sha512-zteT+G8xuGu6mS+mzDzYXbzS7rd3K6Fjb9RiZlYlJPam2/hU7JCBZBVEcywNuR+oZ1ncTvc/cq0faRr3P01OVg==",
"path": "system.threading.tasks.extensions/4.5.4",
"hashPath": "system.threading.tasks.extensions.4.5.4.nupkg.sha512"
},
"System.Windows.Extensions/4.7.0": {
"type": "package",
"serviceable": true,
"sha512": "sha512-CeWTdRNfRaSh0pm2gDTJFwVaXfTq6Xwv/sA887iwPTneW7oMtMlpvDIO+U60+3GWTB7Aom6oQwv5VZVUhQRdPQ==",
"path": "system.windows.extensions/4.7.0",
"hashPath": "system.windows.extensions.4.7.0.nupkg.sha512"
}
}
}

View file

@ -0,0 +1,15 @@
{
"runtimeOptions": {
"tfm": "net7.0",
"frameworks": [
{
"name": "Microsoft.NETCore.App",
"version": "7.0.0"
},
{
"name": "Microsoft.WindowsDesktop.App",
"version": "7.0.0"
}
]
}
}

View file

@ -0,0 +1,4 @@
// <autogenerated />
using System;
using System.Reflection;
[assembly: global::System.Runtime.Versioning.TargetFrameworkAttribute(".NETCoreApp,Version=v7.0", FrameworkDisplayName = ".NET 7.0")]

View file

@ -0,0 +1,25 @@
//------------------------------------------------------------------------------
// <auto-generated>
// Dieser Code wurde von einem Tool generiert.
// Laufzeitversion:4.0.30319.42000
//
// Änderungen an dieser Datei können falsches Verhalten verursachen und gehen verloren, wenn
// der Code erneut generiert wird.
// </auto-generated>
//------------------------------------------------------------------------------
using System;
using System.Reflection;
[assembly: System.Reflection.AssemblyCompanyAttribute("Mysql-example")]
[assembly: System.Reflection.AssemblyConfigurationAttribute("Debug")]
[assembly: System.Reflection.AssemblyFileVersionAttribute("1.0.0.0")]
[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0")]
[assembly: System.Reflection.AssemblyProductAttribute("Mysql-example")]
[assembly: System.Reflection.AssemblyTitleAttribute("Mysql-example")]
[assembly: System.Reflection.AssemblyVersionAttribute("1.0.0.0")]
[assembly: System.Runtime.Versioning.TargetPlatformAttribute("Windows7.0")]
[assembly: System.Runtime.Versioning.SupportedOSPlatformAttribute("Windows7.0")]
// Von der MSBuild WriteCodeFragment-Klasse generiert.

View file

@ -0,0 +1 @@
daea1fe9d8445c0f60063f3f3c445b4d2178aac4

View file

@ -0,0 +1,17 @@
is_global = true
build_property.ApplicationManifest =
build_property.StartupObject =
build_property.ApplicationDefaultFont =
build_property.ApplicationHighDpiMode =
build_property.ApplicationUseCompatibleTextRendering =
build_property.ApplicationVisualStyles =
build_property.TargetFramework = net7.0-windows
build_property.TargetPlatformMinVersion = 7.0
build_property.UsingMicrosoftNETSdkWeb =
build_property.ProjectTypeGuids =
build_property.InvariantGlobalization =
build_property.PlatformNeutralAssembly =
build_property.EnforceExtendedAnalyzerRules =
build_property._SupportedPlatformList = Linux,macOS,Windows
build_property.RootNamespace = Mysql_example
build_property.ProjectDir = C:\Users\user\source\repos\Mysql-example\Mysql-example\

View file

@ -0,0 +1,10 @@
// <auto-generated/>
global using global::System;
global using global::System.Collections.Generic;
global using global::System.Drawing;
global using global::System.IO;
global using global::System.Linq;
global using global::System.Net.Http;
global using global::System.Threading;
global using global::System.Threading.Tasks;
global using global::System.Windows.Forms;

View file

@ -0,0 +1 @@
4cfdb32dfce3ec30fa98ed1ecc8166a9fd9c8765

View file

@ -0,0 +1,32 @@
C:\Users\user\source\repos\Mysql-example\Mysql-example\bin\Debug\net7.0-windows\Mysql-example.exe
C:\Users\user\source\repos\Mysql-example\Mysql-example\bin\Debug\net7.0-windows\Mysql-example.deps.json
C:\Users\user\source\repos\Mysql-example\Mysql-example\bin\Debug\net7.0-windows\Mysql-example.runtimeconfig.json
C:\Users\user\source\repos\Mysql-example\Mysql-example\bin\Debug\net7.0-windows\Mysql-example.dll
C:\Users\user\source\repos\Mysql-example\Mysql-example\bin\Debug\net7.0-windows\Mysql-example.pdb
C:\Users\user\source\repos\Mysql-example\Mysql-example\obj\Debug\net7.0-windows\Mysql-example.csproj.AssemblyReference.cache
C:\Users\user\source\repos\Mysql-example\Mysql-example\obj\Debug\net7.0-windows\Mysql-example.csproj.GenerateResource.cache
C:\Users\user\source\repos\Mysql-example\Mysql-example\obj\Debug\net7.0-windows\Mysql-example.GeneratedMSBuildEditorConfig.editorconfig
C:\Users\user\source\repos\Mysql-example\Mysql-example\obj\Debug\net7.0-windows\Mysql-example.AssemblyInfoInputs.cache
C:\Users\user\source\repos\Mysql-example\Mysql-example\obj\Debug\net7.0-windows\Mysql-example.AssemblyInfo.cs
C:\Users\user\source\repos\Mysql-example\Mysql-example\obj\Debug\net7.0-windows\Mysql-example.csproj.CoreCompileInputs.cache
C:\Users\user\source\repos\Mysql-example\Mysql-example\obj\Debug\net7.0-windows\Mysql-example.dll
C:\Users\user\source\repos\Mysql-example\Mysql-example\obj\Debug\net7.0-windows\refint\Mysql-example.dll
C:\Users\user\source\repos\Mysql-example\Mysql-example\obj\Debug\net7.0-windows\Mysql-example.pdb
C:\Users\user\source\repos\Mysql-example\Mysql-example\obj\Debug\net7.0-windows\Mysql-example.genruntimeconfig.cache
C:\Users\user\source\repos\Mysql-example\Mysql-example\obj\Debug\net7.0-windows\ref\Mysql-example.dll
C:\Users\user\source\repos\Mysql-example\Mysql-example\bin\Debug\net7.0-windows\Google.Protobuf.dll
C:\Users\user\source\repos\Mysql-example\Mysql-example\bin\Debug\net7.0-windows\K4os.Compression.LZ4.dll
C:\Users\user\source\repos\Mysql-example\Mysql-example\bin\Debug\net7.0-windows\K4os.Compression.LZ4.Streams.dll
C:\Users\user\source\repos\Mysql-example\Mysql-example\bin\Debug\net7.0-windows\K4os.Hash.xxHash.dll
C:\Users\user\source\repos\Mysql-example\Mysql-example\bin\Debug\net7.0-windows\MySql.Data.dll
C:\Users\user\source\repos\Mysql-example\Mysql-example\bin\Debug\net7.0-windows\BouncyCastle.Crypto.dll
C:\Users\user\source\repos\Mysql-example\Mysql-example\bin\Debug\net7.0-windows\System.IO.Pipelines.dll
C:\Users\user\source\repos\Mysql-example\Mysql-example\bin\Debug\net7.0-windows\runtimes\win-x64\native\comerr64.dll
C:\Users\user\source\repos\Mysql-example\Mysql-example\bin\Debug\net7.0-windows\runtimes\win-x64\native\gssapi64.dll
C:\Users\user\source\repos\Mysql-example\Mysql-example\bin\Debug\net7.0-windows\runtimes\win-x64\native\k5sprt64.dll
C:\Users\user\source\repos\Mysql-example\Mysql-example\bin\Debug\net7.0-windows\runtimes\win-x64\native\krb5_64.dll
C:\Users\user\source\repos\Mysql-example\Mysql-example\bin\Debug\net7.0-windows\runtimes\win-x64\native\krbcc64.dll
C:\Users\user\source\repos\Mysql-example\Mysql-example\obj\Debug\net7.0-windows\Mysql-example.csproj.CopyComplete
C:\Users\user\source\repos\Mysql-example\Mysql-example\obj\Debug\net7.0-windows\Mysql_example.MainForm.resources
C:\Users\user\source\repos\Mysql-example\Mysql-example\obj\Debug\net7.0-windows\Mysql_example.UserEditForm.resources
C:\Users\user\source\repos\Mysql-example\Mysql-example\obj\Debug\net7.0-windows\Mysql_example.Properties.Resources.resources

View file

@ -0,0 +1,585 @@
{
"runtimeTarget": {
"name": ".NETCoreApp,Version=v7.0",
"signature": ""
},
"compilationOptions": {},
"targets": {
".NETCoreApp,Version=v7.0": {
"Google.Protobuf/3.21.9": {
"runtime": {
"lib/net5.0/Google.Protobuf.dll": {
"assemblyVersion": "3.21.9.0",
"fileVersion": "3.21.9.0"
}
}
},
"K4os.Compression.LZ4/1.3.5": {
"runtime": {
"lib/net6.0/K4os.Compression.LZ4.dll": {
"assemblyVersion": "1.3.5.0",
"fileVersion": "1.3.5.0"
}
}
},
"K4os.Compression.LZ4.Streams/1.3.5": {
"dependencies": {
"K4os.Compression.LZ4": "1.3.5",
"K4os.Hash.xxHash": "1.0.8",
"System.IO.Pipelines": "6.0.3"
},
"runtime": {
"lib/net6.0/K4os.Compression.LZ4.Streams.dll": {
"assemblyVersion": "1.3.5.0",
"fileVersion": "1.3.5.0"
}
}
},
"K4os.Hash.xxHash/1.0.8": {
"runtime": {
"lib/net6.0/K4os.Hash.xxHash.dll": {
"assemblyVersion": "1.0.8.0",
"fileVersion": "1.0.8.0"
}
}
},
"Microsoft.NETCore.Platforms/3.1.0": {},
"Microsoft.NETCore.Targets/1.1.0": {},
"Microsoft.Win32.SystemEvents/4.7.0": {
"dependencies": {
"Microsoft.NETCore.Platforms": "3.1.0"
},
"runtime": {
"lib/netstandard2.0/Microsoft.Win32.SystemEvents.dll": {
"assemblyVersion": "4.0.2.0",
"fileVersion": "4.700.19.56404"
}
},
"runtimeTargets": {
"runtimes/win/lib/netcoreapp3.0/Microsoft.Win32.SystemEvents.dll": {
"rid": "win",
"assetType": "runtime",
"assemblyVersion": "4.0.2.0",
"fileVersion": "4.700.19.56404"
}
}
},
"MySql.Data/8.0.33": {
"dependencies": {
"Google.Protobuf": "3.21.9",
"K4os.Compression.LZ4.Streams": "1.3.5",
"Portable.BouncyCastle": "1.9.0",
"System.Buffers": "4.5.1",
"System.Configuration.ConfigurationManager": "4.4.1",
"System.Runtime.CompilerServices.Unsafe": "6.0.0",
"System.Runtime.Loader": "4.3.0",
"System.Security.Permissions": "4.7.0",
"System.Text.Encoding.CodePages": "4.4.0",
"System.Text.Json": "7.0.1",
"System.Threading.Tasks.Extensions": "4.5.4"
},
"runtime": {
"lib/net7.0/MySql.Data.dll": {
"assemblyVersion": "8.0.33.0",
"fileVersion": "8.0.33.0"
}
},
"runtimeTargets": {
"runtimes/win-x64/native/comerr64.dll": {
"rid": "win-x64",
"assetType": "native",
"fileVersion": "4.1.0.0"
},
"runtimes/win-x64/native/gssapi64.dll": {
"rid": "win-x64",
"assetType": "native",
"fileVersion": "4.1.0.0"
},
"runtimes/win-x64/native/k5sprt64.dll": {
"rid": "win-x64",
"assetType": "native",
"fileVersion": "4.1.0.0"
},
"runtimes/win-x64/native/krb5_64.dll": {
"rid": "win-x64",
"assetType": "native",
"fileVersion": "4.1.0.0"
},
"runtimes/win-x64/native/krbcc64.dll": {
"rid": "win-x64",
"assetType": "native",
"fileVersion": "4.1.0.0"
}
}
},
"Portable.BouncyCastle/1.9.0": {
"runtime": {
"lib/netstandard2.0/BouncyCastle.Crypto.dll": {
"assemblyVersion": "1.9.0.0",
"fileVersion": "1.9.0.1"
}
}
},
"System.Buffers/4.5.1": {},
"System.Configuration.ConfigurationManager/4.4.1": {
"dependencies": {
"System.Security.Cryptography.ProtectedData": "4.4.0"
},
"runtime": {
"lib/netstandard2.0/System.Configuration.ConfigurationManager.dll": {
"assemblyVersion": "4.0.0.0",
"fileVersion": "4.6.25921.2"
}
}
},
"System.Drawing.Common/4.7.0": {
"dependencies": {
"Microsoft.NETCore.Platforms": "3.1.0",
"Microsoft.Win32.SystemEvents": "4.7.0"
},
"runtime": {
"lib/netstandard2.0/System.Drawing.Common.dll": {
"assemblyVersion": "4.0.0.1",
"fileVersion": "4.6.26919.2"
}
},
"runtimeTargets": {
"runtimes/unix/lib/netcoreapp3.0/System.Drawing.Common.dll": {
"rid": "unix",
"assetType": "runtime",
"assemblyVersion": "4.0.2.0",
"fileVersion": "4.700.19.56404"
},
"runtimes/win/lib/netcoreapp3.0/System.Drawing.Common.dll": {
"rid": "win",
"assetType": "runtime",
"assemblyVersion": "4.0.2.0",
"fileVersion": "4.700.19.56404"
}
}
},
"System.IO/4.3.0": {
"dependencies": {
"Microsoft.NETCore.Platforms": "3.1.0",
"Microsoft.NETCore.Targets": "1.1.0",
"System.Runtime": "4.3.0",
"System.Text.Encoding": "4.3.0",
"System.Threading.Tasks": "4.3.0"
}
},
"System.IO.Pipelines/6.0.3": {
"runtime": {
"lib/net6.0/System.IO.Pipelines.dll": {
"assemblyVersion": "6.0.0.0",
"fileVersion": "6.0.522.21309"
}
}
},
"System.Reflection/4.3.0": {
"dependencies": {
"Microsoft.NETCore.Platforms": "3.1.0",
"Microsoft.NETCore.Targets": "1.1.0",
"System.IO": "4.3.0",
"System.Reflection.Primitives": "4.3.0",
"System.Runtime": "4.3.0"
}
},
"System.Reflection.Primitives/4.3.0": {
"dependencies": {
"Microsoft.NETCore.Platforms": "3.1.0",
"Microsoft.NETCore.Targets": "1.1.0",
"System.Runtime": "4.3.0"
}
},
"System.Runtime/4.3.0": {
"dependencies": {
"Microsoft.NETCore.Platforms": "3.1.0",
"Microsoft.NETCore.Targets": "1.1.0"
}
},
"System.Runtime.CompilerServices.Unsafe/6.0.0": {
"runtime": {
"lib/net6.0/System.Runtime.CompilerServices.Unsafe.dll": {
"assemblyVersion": "6.0.0.0",
"fileVersion": "6.0.21.52210"
}
}
},
"System.Runtime.Loader/4.3.0": {
"dependencies": {
"System.IO": "4.3.0",
"System.Reflection": "4.3.0",
"System.Runtime": "4.3.0"
},
"runtime": {
"lib/netstandard1.5/System.Runtime.Loader.dll": {
"assemblyVersion": "4.0.1.0",
"fileVersion": "4.6.24705.1"
}
}
},
"System.Security.AccessControl/4.7.0": {
"dependencies": {
"Microsoft.NETCore.Platforms": "3.1.0",
"System.Security.Principal.Windows": "4.7.0"
},
"runtime": {
"lib/netstandard2.0/System.Security.AccessControl.dll": {
"assemblyVersion": "4.1.3.0",
"fileVersion": "4.700.19.56404"
}
},
"runtimeTargets": {
"runtimes/win/lib/netcoreapp2.0/System.Security.AccessControl.dll": {
"rid": "win",
"assetType": "runtime",
"assemblyVersion": "4.1.3.0",
"fileVersion": "4.700.19.56404"
}
}
},
"System.Security.Cryptography.ProtectedData/4.4.0": {
"runtime": {
"lib/netstandard2.0/System.Security.Cryptography.ProtectedData.dll": {
"assemblyVersion": "4.0.2.0",
"fileVersion": "4.6.25519.3"
}
},
"runtimeTargets": {
"runtimes/win/lib/netstandard2.0/System.Security.Cryptography.ProtectedData.dll": {
"rid": "win",
"assetType": "runtime",
"assemblyVersion": "4.0.2.0",
"fileVersion": "4.6.25519.3"
}
}
},
"System.Security.Permissions/4.7.0": {
"dependencies": {
"System.Security.AccessControl": "4.7.0",
"System.Windows.Extensions": "4.7.0"
},
"runtime": {
"lib/netcoreapp3.0/System.Security.Permissions.dll": {
"assemblyVersion": "4.0.3.0",
"fileVersion": "4.700.19.56404"
}
}
},
"System.Security.Principal.Windows/4.7.0": {
"runtime": {
"lib/netstandard2.0/System.Security.Principal.Windows.dll": {
"assemblyVersion": "4.1.3.0",
"fileVersion": "4.700.19.56404"
}
},
"runtimeTargets": {
"runtimes/unix/lib/netcoreapp2.1/System.Security.Principal.Windows.dll": {
"rid": "unix",
"assetType": "runtime",
"assemblyVersion": "4.1.3.0",
"fileVersion": "4.700.19.56404"
},
"runtimes/win/lib/netcoreapp2.1/System.Security.Principal.Windows.dll": {
"rid": "win",
"assetType": "runtime",
"assemblyVersion": "4.1.3.0",
"fileVersion": "4.700.19.56404"
}
}
},
"System.Text.Encoding/4.3.0": {
"dependencies": {
"Microsoft.NETCore.Platforms": "3.1.0",
"Microsoft.NETCore.Targets": "1.1.0",
"System.Runtime": "4.3.0"
}
},
"System.Text.Encoding.CodePages/4.4.0": {
"dependencies": {
"Microsoft.NETCore.Platforms": "3.1.0"
},
"runtime": {
"lib/netstandard2.0/System.Text.Encoding.CodePages.dll": {
"assemblyVersion": "4.1.0.0",
"fileVersion": "4.6.25519.3"
}
},
"runtimeTargets": {
"runtimes/win/lib/netcoreapp2.0/System.Text.Encoding.CodePages.dll": {
"rid": "win",
"assetType": "runtime",
"assemblyVersion": "4.1.0.0",
"fileVersion": "4.6.25519.3"
}
}
},
"System.Text.Encodings.Web/7.0.0": {
"runtime": {
"lib/net7.0/System.Text.Encodings.Web.dll": {
"assemblyVersion": "7.0.0.0",
"fileVersion": "7.0.22.51805"
}
},
"runtimeTargets": {
"runtimes/browser/lib/net7.0/System.Text.Encodings.Web.dll": {
"rid": "browser",
"assetType": "runtime",
"assemblyVersion": "7.0.0.0",
"fileVersion": "7.0.22.51805"
}
}
},
"System.Text.Json/7.0.1": {
"dependencies": {
"System.Text.Encodings.Web": "7.0.0"
},
"runtime": {
"lib/net7.0/System.Text.Json.dll": {
"assemblyVersion": "7.0.0.0",
"fileVersion": "7.0.122.56804"
}
}
},
"System.Threading.Tasks/4.3.0": {
"dependencies": {
"Microsoft.NETCore.Platforms": "3.1.0",
"Microsoft.NETCore.Targets": "1.1.0",
"System.Runtime": "4.3.0"
}
},
"System.Threading.Tasks.Extensions/4.5.4": {},
"System.Windows.Extensions/4.7.0": {
"dependencies": {
"System.Drawing.Common": "4.7.0"
},
"runtime": {
"lib/netcoreapp3.0/System.Windows.Extensions.dll": {
"assemblyVersion": "4.0.1.0",
"fileVersion": "4.700.19.56404"
}
},
"runtimeTargets": {
"runtimes/win/lib/netcoreapp3.0/System.Windows.Extensions.dll": {
"rid": "win",
"assetType": "runtime",
"assemblyVersion": "4.0.1.0",
"fileVersion": "4.700.19.56404"
}
}
}
}
},
"libraries": {
"Google.Protobuf/3.21.9": {
"type": "package",
"serviceable": true,
"sha512": "sha512-OTpFujTgkmqMLbg3KT7F/iuKi1rg6s5FCS2M9XcVLDn40zL8wgXm37CY/F6MeOEXKjdcnXGCN/h7oyMkVydVsg==",
"path": "google.protobuf/3.21.9",
"hashPath": "google.protobuf.3.21.9.nupkg.sha512"
},
"K4os.Compression.LZ4/1.3.5": {
"type": "package",
"serviceable": true,
"sha512": "sha512-TS4mqlT0X1OlnvOGNfl02QdVUhuqgWuCnn7UxupIa7C9Pb6qlQ5yZA2sPhRh0OSmVULaQU64KV4wJuu//UyVQQ==",
"path": "k4os.compression.lz4/1.3.5",
"hashPath": "k4os.compression.lz4.1.3.5.nupkg.sha512"
},
"K4os.Compression.LZ4.Streams/1.3.5": {
"type": "package",
"serviceable": true,
"sha512": "sha512-M0NufZI8ym3mm6F6HMSPz1jw7TJGdY74fjAtbIXATmnAva/8xLz50eQZJI9tf9mMeHUaFDg76N1BmEh8GR5zeA==",
"path": "k4os.compression.lz4.streams/1.3.5",
"hashPath": "k4os.compression.lz4.streams.1.3.5.nupkg.sha512"
},
"K4os.Hash.xxHash/1.0.8": {
"type": "package",
"serviceable": true,
"sha512": "sha512-Wp2F7BamQ2Q/7Hk834nV9vRQapgcr8kgv9Jvfm8J3D0IhDqZMMl+a2yxUq5ltJitvXvQfB8W6K4F4fCbw/P6YQ==",
"path": "k4os.hash.xxhash/1.0.8",
"hashPath": "k4os.hash.xxhash.1.0.8.nupkg.sha512"
},
"Microsoft.NETCore.Platforms/3.1.0": {
"type": "package",
"serviceable": true,
"sha512": "sha512-z7aeg8oHln2CuNulfhiLYxCVMPEwBl3rzicjvIX+4sUuCwvXw5oXQEtbiU2c0z4qYL5L3Kmx0mMA/+t/SbY67w==",
"path": "microsoft.netcore.platforms/3.1.0",
"hashPath": "microsoft.netcore.platforms.3.1.0.nupkg.sha512"
},
"Microsoft.NETCore.Targets/1.1.0": {
"type": "package",
"serviceable": true,
"sha512": "sha512-aOZA3BWfz9RXjpzt0sRJJMjAscAUm3Hoa4UWAfceV9UTYxgwZ1lZt5nO2myFf+/jetYQo4uTP7zS8sJY67BBxg==",
"path": "microsoft.netcore.targets/1.1.0",
"hashPath": "microsoft.netcore.targets.1.1.0.nupkg.sha512"
},
"Microsoft.Win32.SystemEvents/4.7.0": {
"type": "package",
"serviceable": true,
"sha512": "sha512-mtVirZr++rq+XCDITMUdnETD59XoeMxSpLRIII7JRI6Yj0LEDiO1pPn0ktlnIj12Ix8bfvQqQDMMIF9wC98oCA==",
"path": "microsoft.win32.systemevents/4.7.0",
"hashPath": "microsoft.win32.systemevents.4.7.0.nupkg.sha512"
},
"MySql.Data/8.0.33": {
"type": "package",
"serviceable": true,
"sha512": "sha512-mW+A9tc0s+3E3+XYe80aJmr/AvZoKBZG44w13AdVf4+1iRDwgdL6eLMPZgHyQFGwdLwNvQNPKegcOE4rRDuv8Q==",
"path": "mysql.data/8.0.33",
"hashPath": "mysql.data.8.0.33.nupkg.sha512"
},
"Portable.BouncyCastle/1.9.0": {
"type": "package",
"serviceable": true,
"sha512": "sha512-eZZBCABzVOek+id9Xy04HhmgykF0wZg9wpByzrWN7q8qEI0Qen9b7tfd7w8VA3dOeesumMG7C5ZPy0jk7PSRHw==",
"path": "portable.bouncycastle/1.9.0",
"hashPath": "portable.bouncycastle.1.9.0.nupkg.sha512"
},
"System.Buffers/4.5.1": {
"type": "package",
"serviceable": true,
"sha512": "sha512-Rw7ijyl1qqRS0YQD/WycNst8hUUMgrMH4FCn1nNm27M4VxchZ1js3fVjQaANHO5f3sN4isvP4a+Met9Y4YomAg==",
"path": "system.buffers/4.5.1",
"hashPath": "system.buffers.4.5.1.nupkg.sha512"
},
"System.Configuration.ConfigurationManager/4.4.1": {
"type": "package",
"serviceable": true,
"sha512": "sha512-jz3TWKMAeuDEyrPCK5Jyt4bzQcmzUIMcY9Ud6PkElFxTfnsihV+9N/UCqvxe1z5gc7jMYAnj7V1COMS9QKIuHQ==",
"path": "system.configuration.configurationmanager/4.4.1",
"hashPath": "system.configuration.configurationmanager.4.4.1.nupkg.sha512"
},
"System.Drawing.Common/4.7.0": {
"type": "package",
"serviceable": true,
"sha512": "sha512-v+XbyYHaZjDfn0ENmJEV1VYLgGgCTx1gnfOBcppowbpOAriglYgGCvFCPr2EEZyBvXlpxbEsTwkOlInl107ahA==",
"path": "system.drawing.common/4.7.0",
"hashPath": "system.drawing.common.4.7.0.nupkg.sha512"
},
"System.IO/4.3.0": {
"type": "package",
"serviceable": true,
"sha512": "sha512-3qjaHvxQPDpSOYICjUoTsmoq5u6QJAFRUITgeT/4gqkF1bajbSmb1kwSxEA8AHlofqgcKJcM8udgieRNhaJ5Cg==",
"path": "system.io/4.3.0",
"hashPath": "system.io.4.3.0.nupkg.sha512"
},
"System.IO.Pipelines/6.0.3": {
"type": "package",
"serviceable": true,
"sha512": "sha512-ryTgF+iFkpGZY1vRQhfCzX0xTdlV3pyaTTqRu2ETbEv+HlV7O6y7hyQURnghNIXvctl5DuZ//Dpks6HdL/Txgw==",
"path": "system.io.pipelines/6.0.3",
"hashPath": "system.io.pipelines.6.0.3.nupkg.sha512"
},
"System.Reflection/4.3.0": {
"type": "package",
"serviceable": true,
"sha512": "sha512-KMiAFoW7MfJGa9nDFNcfu+FpEdiHpWgTcS2HdMpDvt9saK3y/G4GwprPyzqjFH9NTaGPQeWNHU+iDlDILj96aQ==",
"path": "system.reflection/4.3.0",
"hashPath": "system.reflection.4.3.0.nupkg.sha512"
},
"System.Reflection.Primitives/4.3.0": {
"type": "package",
"serviceable": true,
"sha512": "sha512-5RXItQz5As4xN2/YUDxdpsEkMhvw3e6aNveFXUn4Hl/udNTCNhnKp8lT9fnc3MhvGKh1baak5CovpuQUXHAlIA==",
"path": "system.reflection.primitives/4.3.0",
"hashPath": "system.reflection.primitives.4.3.0.nupkg.sha512"
},
"System.Runtime/4.3.0": {
"type": "package",
"serviceable": true,
"sha512": "sha512-JufQi0vPQ0xGnAczR13AUFglDyVYt4Kqnz1AZaiKZ5+GICq0/1MH/mO/eAJHt/mHW1zjKBJd7kV26SrxddAhiw==",
"path": "system.runtime/4.3.0",
"hashPath": "system.runtime.4.3.0.nupkg.sha512"
},
"System.Runtime.CompilerServices.Unsafe/6.0.0": {
"type": "package",
"serviceable": true,
"sha512": "sha512-/iUeP3tq1S0XdNNoMz5C9twLSrM/TH+qElHkXWaPvuNOt+99G75NrV0OS2EqHx5wMN7popYjpc8oTjC1y16DLg==",
"path": "system.runtime.compilerservices.unsafe/6.0.0",
"hashPath": "system.runtime.compilerservices.unsafe.6.0.0.nupkg.sha512"
},
"System.Runtime.Loader/4.3.0": {
"type": "package",
"serviceable": true,
"sha512": "sha512-DHMaRn8D8YCK2GG2pw+UzNxn/OHVfaWx7OTLBD/hPegHZZgcZh3H6seWegrC4BYwsfuGrywIuT+MQs+rPqRLTQ==",
"path": "system.runtime.loader/4.3.0",
"hashPath": "system.runtime.loader.4.3.0.nupkg.sha512"
},
"System.Security.AccessControl/4.7.0": {
"type": "package",
"serviceable": true,
"sha512": "sha512-JECvTt5aFF3WT3gHpfofL2MNNP6v84sxtXxpqhLBCcDRzqsPBmHhQ6shv4DwwN2tRlzsUxtb3G9M3763rbXKDg==",
"path": "system.security.accesscontrol/4.7.0",
"hashPath": "system.security.accesscontrol.4.7.0.nupkg.sha512"
},
"System.Security.Cryptography.ProtectedData/4.4.0": {
"type": "package",
"serviceable": true,
"sha512": "sha512-cJV7ScGW7EhatRsjehfvvYVBvtiSMKgN8bOVI0bQhnF5bU7vnHVIsH49Kva7i7GWaWYvmEzkYVk1TC+gZYBEog==",
"path": "system.security.cryptography.protecteddata/4.4.0",
"hashPath": "system.security.cryptography.protecteddata.4.4.0.nupkg.sha512"
},
"System.Security.Permissions/4.7.0": {
"type": "package",
"serviceable": true,
"sha512": "sha512-dkOV6YYVBnYRa15/yv004eCGRBVADXw8qRbbNiCn/XpdJSUXkkUeIvdvFHkvnko4CdKMqG8yRHC4ox83LSlMsQ==",
"path": "system.security.permissions/4.7.0",
"hashPath": "system.security.permissions.4.7.0.nupkg.sha512"
},
"System.Security.Principal.Windows/4.7.0": {
"type": "package",
"serviceable": true,
"sha512": "sha512-ojD0PX0XhneCsUbAZVKdb7h/70vyYMDYs85lwEI+LngEONe/17A0cFaRFqZU+sOEidcVswYWikYOQ9PPfjlbtQ==",
"path": "system.security.principal.windows/4.7.0",
"hashPath": "system.security.principal.windows.4.7.0.nupkg.sha512"
},
"System.Text.Encoding/4.3.0": {
"type": "package",
"serviceable": true,
"sha512": "sha512-BiIg+KWaSDOITze6jGQynxg64naAPtqGHBwDrLaCtixsa5bKiR8dpPOHA7ge3C0JJQizJE+sfkz1wV+BAKAYZw==",
"path": "system.text.encoding/4.3.0",
"hashPath": "system.text.encoding.4.3.0.nupkg.sha512"
},
"System.Text.Encoding.CodePages/4.4.0": {
"type": "package",
"serviceable": true,
"sha512": "sha512-6JX7ZdaceBiLKLkYt8zJcp4xTJd1uYyXXEkPw6mnlUIjh1gZPIVKPtRXPmY5kLf6DwZmf5YLwR3QUrRonl7l0A==",
"path": "system.text.encoding.codepages/4.4.0",
"hashPath": "system.text.encoding.codepages.4.4.0.nupkg.sha512"
},
"System.Text.Encodings.Web/7.0.0": {
"type": "package",
"serviceable": true,
"sha512": "sha512-OP6umVGxc0Z0MvZQBVigj4/U31Pw72ITihDWP9WiWDm+q5aoe0GaJivsfYGq53o6dxH7DcXWiCTl7+0o2CGdmg==",
"path": "system.text.encodings.web/7.0.0",
"hashPath": "system.text.encodings.web.7.0.0.nupkg.sha512"
},
"System.Text.Json/7.0.1": {
"type": "package",
"serviceable": true,
"sha512": "sha512-OtDEmCCiNl8JAduFKZ/r0Sw6XZNHwIicUYy/mXgMDGeOsZLshH37qi3oPRzFYiryVktiMoQLByMGPtRCEMYbeQ==",
"path": "system.text.json/7.0.1",
"hashPath": "system.text.json.7.0.1.nupkg.sha512"
},
"System.Threading.Tasks/4.3.0": {
"type": "package",
"serviceable": true,
"sha512": "sha512-LbSxKEdOUhVe8BezB/9uOGGppt+nZf6e1VFyw6v3DN6lqitm0OSn2uXMOdtP0M3W4iMcqcivm2J6UgqiwwnXiA==",
"path": "system.threading.tasks/4.3.0",
"hashPath": "system.threading.tasks.4.3.0.nupkg.sha512"
},
"System.Threading.Tasks.Extensions/4.5.4": {
"type": "package",
"serviceable": true,
"sha512": "sha512-zteT+G8xuGu6mS+mzDzYXbzS7rd3K6Fjb9RiZlYlJPam2/hU7JCBZBVEcywNuR+oZ1ncTvc/cq0faRr3P01OVg==",
"path": "system.threading.tasks.extensions/4.5.4",
"hashPath": "system.threading.tasks.extensions.4.5.4.nupkg.sha512"
},
"System.Windows.Extensions/4.7.0": {
"type": "package",
"serviceable": true,
"sha512": "sha512-CeWTdRNfRaSh0pm2gDTJFwVaXfTq6Xwv/sA887iwPTneW7oMtMlpvDIO+U60+3GWTB7Aom6oQwv5VZVUhQRdPQ==",
"path": "system.windows.extensions/4.7.0",
"hashPath": "system.windows.extensions.4.7.0.nupkg.sha512"
}
}
}

View file

@ -0,0 +1,23 @@
{
"runtimeOptions": {
"tfm": "net7.0",
"frameworks": [
{
"name": "Microsoft.NETCore.App",
"version": "7.0.0"
},
{
"name": "Microsoft.WindowsDesktop.App",
"version": "7.0.0"
}
],
"additionalProbingPaths": [
"C:\\Users\\user\\.dotnet\\store\\|arch|\\|tfm|",
"C:\\Users\\user\\.nuget\\packages",
"C:\\Program Files (x86)\\Microsoft Visual Studio\\Shared\\NuGetPackages"
],
"configProperties": {
"Microsoft.NETCore.DotNetHostPolicy.SetAppPaths": true
}
}
}

View file

@ -0,0 +1 @@
3b62c117ed6a34912b1e26c6f7385a0ec7628a34

View file

@ -0,0 +1 @@
obj\Debug\net7.0-windows\\_IsIncrementalBuild

Binary file not shown.

View file

@ -0,0 +1,77 @@
{
"format": 1,
"restore": {
"C:\\Users\\user\\source\\repos\\Mysql-example\\Mysql-example\\Mysql-example.csproj": {}
},
"projects": {
"C:\\Users\\user\\source\\repos\\Mysql-example\\Mysql-example\\Mysql-example.csproj": {
"version": "1.0.0",
"restore": {
"projectUniqueName": "C:\\Users\\user\\source\\repos\\Mysql-example\\Mysql-example\\Mysql-example.csproj",
"projectName": "Mysql-example",
"projectPath": "C:\\Users\\user\\source\\repos\\Mysql-example\\Mysql-example\\Mysql-example.csproj",
"packagesPath": "C:\\Users\\user\\.nuget\\packages\\",
"outputPath": "C:\\Users\\user\\source\\repos\\Mysql-example\\Mysql-example\\obj\\",
"projectStyle": "PackageReference",
"fallbackFolders": [
"C:\\Program Files (x86)\\Microsoft Visual Studio\\Shared\\NuGetPackages"
],
"configFilePaths": [
"C:\\Users\\user\\AppData\\Roaming\\NuGet\\NuGet.Config",
"C:\\Program Files (x86)\\NuGet\\Config\\Microsoft.VisualStudio.FallbackLocation.config",
"C:\\Program Files (x86)\\NuGet\\Config\\Microsoft.VisualStudio.Offline.config"
],
"originalTargetFrameworks": [
"net7.0-windows"
],
"sources": {
"C:\\Program Files (x86)\\Microsoft SDKs\\NuGetPackages\\": {},
"C:\\Program Files\\dotnet\\library-packs": {},
"https://api.nuget.org/v3/index.json": {}
},
"frameworks": {
"net7.0-windows7.0": {
"targetAlias": "net7.0-windows",
"projectReferences": {}
}
},
"warningProperties": {
"warnAsError": [
"NU1605"
]
}
},
"frameworks": {
"net7.0-windows7.0": {
"targetAlias": "net7.0-windows",
"dependencies": {
"MySql.Data": {
"target": "Package",
"version": "[8.0.33, )"
}
},
"imports": [
"net461",
"net462",
"net47",
"net471",
"net472",
"net48",
"net481"
],
"assetTargetFallback": true,
"warn": true,
"frameworkReferences": {
"Microsoft.NETCore.App": {
"privateAssets": "all"
},
"Microsoft.WindowsDesktop.App.WindowsForms": {
"privateAssets": "none"
}
},
"runtimeIdentifierGraphPath": "C:\\Program Files\\dotnet\\sdk\\7.0.103\\RuntimeIdentifierGraph.json"
}
}
}
}
}

View file

@ -0,0 +1,16 @@
<?xml version="1.0" encoding="utf-8" standalone="no"?>
<Project ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup Condition=" '$(ExcludeRestorePackageImports)' != 'true' ">
<RestoreSuccess Condition=" '$(RestoreSuccess)' == '' ">True</RestoreSuccess>
<RestoreTool Condition=" '$(RestoreTool)' == '' ">NuGet</RestoreTool>
<ProjectAssetsFile Condition=" '$(ProjectAssetsFile)' == '' ">$(MSBuildThisFileDirectory)project.assets.json</ProjectAssetsFile>
<NuGetPackageRoot Condition=" '$(NuGetPackageRoot)' == '' ">$(UserProfile)\.nuget\packages\</NuGetPackageRoot>
<NuGetPackageFolders Condition=" '$(NuGetPackageFolders)' == '' ">C:\Users\user\.nuget\packages\;C:\Program Files (x86)\Microsoft Visual Studio\Shared\NuGetPackages</NuGetPackageFolders>
<NuGetProjectStyle Condition=" '$(NuGetProjectStyle)' == '' ">PackageReference</NuGetProjectStyle>
<NuGetToolVersion Condition=" '$(NuGetToolVersion)' == '' ">6.4.0</NuGetToolVersion>
</PropertyGroup>
<ItemGroup Condition=" '$(ExcludeRestorePackageImports)' != 'true' ">
<SourceRoot Include="C:\Users\user\.nuget\packages\" />
<SourceRoot Include="C:\Program Files (x86)\Microsoft Visual Studio\Shared\NuGetPackages\" />
</ItemGroup>
</Project>

View file

@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8" standalone="no"?>
<Project ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ImportGroup Condition=" '$(ExcludeRestorePackageImports)' != 'true' ">
<Import Project="$(NuGetPackageRoot)system.text.json\7.0.1\buildTransitive\net6.0\System.Text.Json.targets" Condition="Exists('$(NuGetPackageRoot)system.text.json\7.0.1\buildTransitive\net6.0\System.Text.Json.targets')" />
</ImportGroup>
</Project>

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,39 @@
{
"version": 2,
"dgSpecHash": "ubpZGaMJD7GOHwBwenSMOctr323bHnhdqBlvN644qmokm5NRe7SViElXbc4/twhSqHa/uhLPVbMDOl1cVAFbCg==",
"success": true,
"projectFilePath": "C:\\Users\\user\\source\\repos\\Mysql-example\\Mysql-example\\Mysql-example.csproj",
"expectedPackageFiles": [
"C:\\Users\\user\\.nuget\\packages\\google.protobuf\\3.21.9\\google.protobuf.3.21.9.nupkg.sha512",
"C:\\Users\\user\\.nuget\\packages\\k4os.compression.lz4\\1.3.5\\k4os.compression.lz4.1.3.5.nupkg.sha512",
"C:\\Users\\user\\.nuget\\packages\\k4os.compression.lz4.streams\\1.3.5\\k4os.compression.lz4.streams.1.3.5.nupkg.sha512",
"C:\\Users\\user\\.nuget\\packages\\k4os.hash.xxhash\\1.0.8\\k4os.hash.xxhash.1.0.8.nupkg.sha512",
"C:\\Users\\user\\.nuget\\packages\\microsoft.netcore.platforms\\3.1.0\\microsoft.netcore.platforms.3.1.0.nupkg.sha512",
"C:\\Users\\user\\.nuget\\packages\\microsoft.netcore.targets\\1.1.0\\microsoft.netcore.targets.1.1.0.nupkg.sha512",
"C:\\Users\\user\\.nuget\\packages\\microsoft.win32.systemevents\\4.7.0\\microsoft.win32.systemevents.4.7.0.nupkg.sha512",
"C:\\Users\\user\\.nuget\\packages\\mysql.data\\8.0.33\\mysql.data.8.0.33.nupkg.sha512",
"C:\\Users\\user\\.nuget\\packages\\portable.bouncycastle\\1.9.0\\portable.bouncycastle.1.9.0.nupkg.sha512",
"C:\\Users\\user\\.nuget\\packages\\system.buffers\\4.5.1\\system.buffers.4.5.1.nupkg.sha512",
"C:\\Users\\user\\.nuget\\packages\\system.configuration.configurationmanager\\4.4.1\\system.configuration.configurationmanager.4.4.1.nupkg.sha512",
"C:\\Users\\user\\.nuget\\packages\\system.drawing.common\\4.7.0\\system.drawing.common.4.7.0.nupkg.sha512",
"C:\\Users\\user\\.nuget\\packages\\system.io\\4.3.0\\system.io.4.3.0.nupkg.sha512",
"C:\\Users\\user\\.nuget\\packages\\system.io.pipelines\\6.0.3\\system.io.pipelines.6.0.3.nupkg.sha512",
"C:\\Users\\user\\.nuget\\packages\\system.reflection\\4.3.0\\system.reflection.4.3.0.nupkg.sha512",
"C:\\Users\\user\\.nuget\\packages\\system.reflection.primitives\\4.3.0\\system.reflection.primitives.4.3.0.nupkg.sha512",
"C:\\Users\\user\\.nuget\\packages\\system.runtime\\4.3.0\\system.runtime.4.3.0.nupkg.sha512",
"C:\\Users\\user\\.nuget\\packages\\system.runtime.compilerservices.unsafe\\6.0.0\\system.runtime.compilerservices.unsafe.6.0.0.nupkg.sha512",
"C:\\Users\\user\\.nuget\\packages\\system.runtime.loader\\4.3.0\\system.runtime.loader.4.3.0.nupkg.sha512",
"C:\\Users\\user\\.nuget\\packages\\system.security.accesscontrol\\4.7.0\\system.security.accesscontrol.4.7.0.nupkg.sha512",
"C:\\Users\\user\\.nuget\\packages\\system.security.cryptography.protecteddata\\4.4.0\\system.security.cryptography.protecteddata.4.4.0.nupkg.sha512",
"C:\\Users\\user\\.nuget\\packages\\system.security.permissions\\4.7.0\\system.security.permissions.4.7.0.nupkg.sha512",
"C:\\Users\\user\\.nuget\\packages\\system.security.principal.windows\\4.7.0\\system.security.principal.windows.4.7.0.nupkg.sha512",
"C:\\Users\\user\\.nuget\\packages\\system.text.encoding\\4.3.0\\system.text.encoding.4.3.0.nupkg.sha512",
"C:\\Users\\user\\.nuget\\packages\\system.text.encoding.codepages\\4.4.0\\system.text.encoding.codepages.4.4.0.nupkg.sha512",
"C:\\Users\\user\\.nuget\\packages\\system.text.encodings.web\\7.0.0\\system.text.encodings.web.7.0.0.nupkg.sha512",
"C:\\Users\\user\\.nuget\\packages\\system.text.json\\7.0.1\\system.text.json.7.0.1.nupkg.sha512",
"C:\\Users\\user\\.nuget\\packages\\system.threading.tasks\\4.3.0\\system.threading.tasks.4.3.0.nupkg.sha512",
"C:\\Users\\user\\.nuget\\packages\\system.threading.tasks.extensions\\4.5.4\\system.threading.tasks.extensions.4.5.4.nupkg.sha512",
"C:\\Users\\user\\.nuget\\packages\\system.windows.extensions\\4.7.0\\system.windows.extensions.4.7.0.nupkg.sha512"
],
"logs": []
}

View file

@ -1,13 +1,18 @@
## Tec Stack ## Tec Stack
Language: `lang` Language: `C#`
Framework: `none` Framework: `Dotnet 7.0 Forms`
Librarys: `none` Database: `Mysql`
## Description ## Description
Basic Template for a Learning Repo A Basic Controll Panel for Users and Addresses
## Setup ## Setup
### Locations
- Database Schema: `/Database/schema.sql`
- Config: `/Config.cs`
### On Linux ### On Linux
- step1 - step1