48 Commits

Author SHA1 Message Date
8245955e9c Merge pull request 'feature/auto-update' (#5) from feature/auto-update into master
Reviewed-on: #5
2026-03-10 16:03:55 +01:00
a7aad1a5ef feat: autoupdater 2026-03-10 16:02:23 +01:00
f065f58f71 dev: updater 2026-03-10 15:04:27 +01:00
f2e4addbb0 feat: settings, installer banner 2026-03-09 17:48:11 +01:00
6958781dec Merge pull request 'feature/proxy-creds' (#4) from feature/proxy-creds into master
Reviewed-on: #4
2026-03-09 16:27:24 +01:00
d3d704ebf4 feat: proxy creds 2026-03-09 14:39:25 +01:00
49c963078a dev: implement proxy creds 2026-03-09 14:19:37 +01:00
11ea32b490 feat: file extensions 2026-03-05 12:26:58 +01:00
b20f92274f Merge branch 'master' of https://git.jaro.digital/frozd/carmanager-3 2026-03-05 12:26:41 +01:00
ff3805f8d1 feat: installer 2026-03-05 11:31:36 +01:00
bf42b4219b Update README.md 2026-03-03 14:15:13 +01:00
835286b629 Merge pull request 'feature/welcome' (#3) from feature/welcome into master
Reviewed-on: #3
2026-03-03 14:01:30 +01:00
fe5d22a811 chore: offload img folder to appdata 2026-03-03 13:58:33 +01:00
808b0c4720 feature: welcome screen, toolbar & chore: more docs 2026-03-03 13:44:34 +01:00
9be57d3c5f Merge pull request 'feature/search-design' (#2) from feature/search-design into master
Reviewed-on: #2
2026-03-03 11:34:15 +01:00
3d8b7e921a Merge pull request 'feature/cuid' (#1) from feature/cuid into master
Reviewed-on: #1
2026-03-03 11:33:28 +01:00
1082e63244 fix: details form padding 2026-03-03 11:31:20 +01:00
a33baa2166 feat: more design things 2026-03-03 11:27:57 +01:00
5fe1a4cea1 feat: search design 2026-03-02 17:38:54 +01:00
f0d51bc85e feat: CUID & fix: reorder bug 2026-03-02 16:34:18 +01:00
9b261dbf78 chore: updated to .NET 8.0 2026-03-02 16:26:17 +01:00
a6112bec44 chore: folders 2026-03-02 16:01:12 +01:00
272ed999d8 feat: reordering 2026-03-02 15:33:56 +01:00
48be020dc4 feat: GUID 2026-03-02 14:23:15 +01:00
f6b70fa387 feat: Better car creation 2026-02-24 08:57:47 +01:00
4404ac3c7b chore: clean unused imports 2026-02-23 17:49:40 +01:00
c70407b40b chore: cleanup 2026-02-23 17:47:54 +01:00
d733e49698 feat: display car age 2026-02-23 17:47:01 +01:00
160352383a feat: set & get validation 2026-02-23 17:35:49 +01:00
2aeee0a009 fix: extra error messages 2026-02-19 08:41:43 +01:00
96d9334b56 fix: safeManager error handeling & Load fix 2026-02-19 08:25:07 +01:00
e431a05124 chore: created README.md 2026-01-23 13:05:10 +01:00
b20e0a94dd chore: partially document MainForm 2026-01-23 12:46:57 +01:00
afa98b2681 chore: document StateManager 2026-01-23 12:44:00 +01:00
6d50c28c02 chore: document SafeManager 2026-01-23 12:38:17 +01:00
8be81812c1 chore: document ImageManager 2026-01-23 12:34:54 +01:00
de603b5cef chore: document Car and remove getter setter 2026-01-23 12:30:28 +01:00
640d9acbf6 chore: renamed solution 2026-01-23 12:16:38 +01:00
e511610052 Initial commit 2026-01-23 12:09:56 +01:00
Frozd
d17e1183f9 feat: keybinds 2025-11-28 13:08:18 +01:00
Frozd
bb71806a22 fix: better Image loading 2025-11-28 13:00:32 +01:00
Frozd
e89fc79ebb fix: more performant loading 2025-11-28 12:53:29 +01:00
Frozd
5b56d76cd7 fix: ordering 2025-11-28 12:41:45 +01:00
Frozd
0c8b10cfe6 fix: ordering with search v0 2025-11-28 12:37:22 +01:00
Frozd
d4f3ac8776 fix: search 2025-11-28 12:22:56 +01:00
Frozd
746f8c4039 fix: Update instead of re-fill 2025-11-28 12:09:07 +01:00
Frozd
cca7c37ffe chore: async loading 2025-11-28 10:46:06 +01:00
Frozd
306994542e fix: async car update 2025-11-28 10:35:59 +01:00
73 changed files with 37275 additions and 10854 deletions

4
.gitignore vendored
View File

@@ -361,4 +361,6 @@ MigrationBackup/
# Fody - auto-generated XML schema
FodyWeavers.xsd
IAF42_Kaulmann_CarmanagerV2.zip
# Submissions folder (contains submission ZIPs)
submissions/

15
.idea/.idea.CarManagerV3/.idea/.gitignore generated vendored Normal file
View File

@@ -0,0 +1,15 @@
# Default ignored files
/shelf/
/workspace.xml
# Rider ignored files
/contentModel.xml
/.idea.CarManagerV3.iml
/modules.xml
/projectSettingsUpdater.xml
# Ignored default folder with query files
/queries/
# Datasource local storage ignored files
/dataSources/
/dataSources.local.xml
# Editor-based HTTP Client requests
/httpRequests/

View File

@@ -0,0 +1,4 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="Encoding" addBOMForNewFiles="with BOM under Windows, with no BOM otherwise" />
</project>

View File

@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="UserContentModel">
<attachedFolders />
<explicitIncludes />
<explicitExcludes />
</component>
</project>

6
.idea/.idea.CarManagerV3/.idea/vcs.xml generated Normal file
View File

@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="VcsDirectoryMappings">
<mapping directory="" vcs="Git" />
</component>
</project>

File diff suppressed because it is too large Load Diff

View File

@@ -1,6 +0,0 @@
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.7.2" />
</startup>
</configuration>

View File

@@ -1,60 +0,0 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace CarManagerV2
{
public class Car
{
int id;
string make;
string model;
int year;
string color;
int mileage;
decimal price;
public Car(int id, string make, string model, int year, string color, int mileage, decimal price)
{
this.id = id;
this.make = make;
this.model = model;
this.year = year;
this.color = color;
this.mileage = mileage;
this.price = price;
}
public int Id { get { return id; } set { id = value; } }
public string Make { get { return make; } set { make = value; } }
public string Model { get { return model; } set { model = value; } }
public int Year { get { return year; } set { year = value; } }
public string Color { get { return color; } set { color = value; } }
public int Mileage { get { return mileage; } set { mileage = value; } }
public decimal Price { get { return price; } set { price = value; } }
public override string ToString()
{
return $"{make} {model} ({year})";
}
public string ToCsvString()
{
return $"{id};{make};{model};{year};{color};{mileage};{price}";
}
public static Car FromCsvString(string csv)
{
string[] parts = csv.Split(';');
return new Car(int.Parse(parts[0]), parts[1], parts[2], int.Parse(parts[3]), parts[4], int.Parse(parts[5]), decimal.Parse(parts[6]));
}
public bool IsChanged(Car other)
{
return make != other.make || model != other.model || year != other.year || color != other.color || mileage != other.mileage || price != other.price;
}
}
}

View File

@@ -1,116 +0,0 @@
namespace CarManagerV2
{
partial class CarCard
{
/// <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 Component Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(CarCard));
this.tableLayoutPanel1 = new System.Windows.Forms.TableLayoutPanel();
this.lblCarDetails = new System.Windows.Forms.Label();
this.lblCarName = new System.Windows.Forms.Label();
this.pbxCar = new System.Windows.Forms.PictureBox();
this.tableLayoutPanel1.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.pbxCar)).BeginInit();
this.SuspendLayout();
//
// tableLayoutPanel1
//
this.tableLayoutPanel1.AutoSize = true;
this.tableLayoutPanel1.ColumnCount = 1;
this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 100F));
this.tableLayoutPanel1.Controls.Add(this.lblCarDetails, 0, 2);
this.tableLayoutPanel1.Controls.Add(this.lblCarName, 0, 1);
this.tableLayoutPanel1.Controls.Add(this.pbxCar, 0, 0);
this.tableLayoutPanel1.Dock = System.Windows.Forms.DockStyle.Fill;
this.tableLayoutPanel1.Location = new System.Drawing.Point(0, 0);
this.tableLayoutPanel1.MaximumSize = new System.Drawing.Size(210, 0);
this.tableLayoutPanel1.Name = "tableLayoutPanel1";
this.tableLayoutPanel1.RowCount = 3;
this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 130F));
this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle());
this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle());
this.tableLayoutPanel1.Size = new System.Drawing.Size(210, 200);
this.tableLayoutPanel1.TabIndex = 0;
//
// lblCarDetails
//
this.lblCarDetails.AutoSize = true;
this.lblCarDetails.Location = new System.Drawing.Point(3, 184);
this.lblCarDetails.Name = "lblCarDetails";
this.lblCarDetails.Size = new System.Drawing.Size(101, 16);
this.lblCarDetails.TabIndex = 5;
this.lblCarDetails.Text = "2009 - 13.000km";
//
// lblCarName
//
this.lblCarName.AutoSize = true;
this.lblCarName.Dock = System.Windows.Forms.DockStyle.Fill;
this.lblCarName.Font = new System.Drawing.Font("Arial", 13.8F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.lblCarName.Location = new System.Drawing.Point(3, 130);
this.lblCarName.Name = "lblCarName";
this.lblCarName.Size = new System.Drawing.Size(204, 54);
this.lblCarName.TabIndex = 4;
this.lblCarName.Text = "Skoda Fabia fdsdfsdfsdfsdf";
this.lblCarName.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
//
// pbxCar
//
this.pbxCar.Dock = System.Windows.Forms.DockStyle.Fill;
this.pbxCar.Image = ((System.Drawing.Image)(resources.GetObject("pbxCar.Image")));
this.pbxCar.ImageLocation = "";
this.pbxCar.Location = new System.Drawing.Point(3, 3);
this.pbxCar.Name = "pbxCar";
this.pbxCar.Size = new System.Drawing.Size(204, 124);
this.pbxCar.SizeMode = System.Windows.Forms.PictureBoxSizeMode.Zoom;
this.pbxCar.TabIndex = 3;
this.pbxCar.TabStop = false;
//
// CarCard
//
this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 16F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.AutoSize = true;
this.BackColor = System.Drawing.SystemColors.Control;
this.Controls.Add(this.tableLayoutPanel1);
this.Name = "CarCard";
this.Size = new System.Drawing.Size(210, 200);
this.tableLayoutPanel1.ResumeLayout(false);
this.tableLayoutPanel1.PerformLayout();
((System.ComponentModel.ISupportInitialize)(this.pbxCar)).EndInit();
this.ResumeLayout(false);
this.PerformLayout();
}
#endregion
private System.Windows.Forms.TableLayoutPanel tableLayoutPanel1;
private System.Windows.Forms.Label lblCarDetails;
private System.Windows.Forms.Label lblCarName;
private System.Windows.Forms.PictureBox pbxCar;
}
}

View File

@@ -1,62 +0,0 @@
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace CarManagerV2
{
public partial class CarCard : UserControl
{
public string CarName
{
get { return lblCarName.Text; }
set { lblCarName.Text = value; }
}
public string CarDetails
{
get { return lblCarDetails.Text; }
set { lblCarDetails.Text = value; }
}
public Image CarImage
{
get { return pbxCar.Image; }
set { pbxCar.Image = value; }
}
public CarCard()
{
InitializeComponent();
this.Cursor = Cursors.Hand;
foreach (Control ctrl in this.Controls)
{
ctrl.Click += ForwardClick;
foreach (Control inner in ctrl.Controls) // In case you have nested controls
inner.Click += ForwardClick;
}
this.Click += (s, e) => this.OnCardClicked();
}
private void ForwardClick(object sender, EventArgs e)
{
// Raise your CardClicked event no matter what got clicked
CardClicked?.Invoke(this, EventArgs.Empty);
}
public event EventHandler CardClicked;
private void OnCardClicked()
{
if (this.CardClicked != null)
{
this.CardClicked(this, EventArgs.Empty);
}
}
}
}

File diff suppressed because it is too large Load Diff

View File

@@ -1,317 +0,0 @@
namespace CarManagerV2
{
partial class CarDetailsForm
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Windows Form Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(CarDetailsForm));
this.tableLayoutPanel1 = new System.Windows.Forms.TableLayoutPanel();
this.pbxCarImage = new System.Windows.Forms.PictureBox();
this.label1 = new System.Windows.Forms.Label();
this.tbxMake = new System.Windows.Forms.TextBox();
this.label2 = new System.Windows.Forms.Label();
this.tbxModel = new System.Windows.Forms.TextBox();
this.label3 = new System.Windows.Forms.Label();
this.label4 = new System.Windows.Forms.Label();
this.label5 = new System.Windows.Forms.Label();
this.label6 = new System.Windows.Forms.Label();
this.flowLayoutPanel1 = new System.Windows.Forms.FlowLayoutPanel();
this.btnSave = new System.Windows.Forms.Button();
this.btnDelete = new System.Windows.Forms.Button();
this.lblID = new System.Windows.Forms.Label();
this.nudYear = new System.Windows.Forms.NumericUpDown();
this.tbxColor = new System.Windows.Forms.TextBox();
this.nudMileage = new System.Windows.Forms.NumericUpDown();
this.nudPrice = new System.Windows.Forms.NumericUpDown();
this.tableLayoutPanel1.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.pbxCarImage)).BeginInit();
this.flowLayoutPanel1.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.nudYear)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.nudMileage)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.nudPrice)).BeginInit();
this.SuspendLayout();
//
// tableLayoutPanel1
//
this.tableLayoutPanel1.AutoSize = true;
this.tableLayoutPanel1.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink;
this.tableLayoutPanel1.ColumnCount = 2;
this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle());
this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle());
this.tableLayoutPanel1.Controls.Add(this.pbxCarImage, 0, 0);
this.tableLayoutPanel1.Controls.Add(this.label1, 0, 1);
this.tableLayoutPanel1.Controls.Add(this.tbxMake, 1, 1);
this.tableLayoutPanel1.Controls.Add(this.label2, 0, 2);
this.tableLayoutPanel1.Controls.Add(this.tbxModel, 1, 2);
this.tableLayoutPanel1.Controls.Add(this.label3, 0, 3);
this.tableLayoutPanel1.Controls.Add(this.label4, 0, 4);
this.tableLayoutPanel1.Controls.Add(this.label5, 0, 5);
this.tableLayoutPanel1.Controls.Add(this.label6, 0, 6);
this.tableLayoutPanel1.Controls.Add(this.flowLayoutPanel1, 0, 7);
this.tableLayoutPanel1.Controls.Add(this.nudYear, 1, 3);
this.tableLayoutPanel1.Controls.Add(this.tbxColor, 1, 4);
this.tableLayoutPanel1.Controls.Add(this.nudMileage, 1, 5);
this.tableLayoutPanel1.Controls.Add(this.nudPrice, 1, 6);
this.tableLayoutPanel1.Dock = System.Windows.Forms.DockStyle.Fill;
this.tableLayoutPanel1.Location = new System.Drawing.Point(0, 0);
this.tableLayoutPanel1.Name = "tableLayoutPanel1";
this.tableLayoutPanel1.RowCount = 8;
this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 200F));
this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 30F));
this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 30F));
this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 30F));
this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 30F));
this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 30F));
this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 30F));
this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 40F));
this.tableLayoutPanel1.Size = new System.Drawing.Size(536, 450);
this.tableLayoutPanel1.TabIndex = 0;
//
// pbxCarImage
//
this.tableLayoutPanel1.SetColumnSpan(this.pbxCarImage, 2);
this.pbxCarImage.Dock = System.Windows.Forms.DockStyle.Fill;
this.pbxCarImage.Image = ((System.Drawing.Image)(resources.GetObject("pbxCarImage.Image")));
this.pbxCarImage.Location = new System.Drawing.Point(3, 3);
this.pbxCarImage.Name = "pbxCarImage";
this.pbxCarImage.Size = new System.Drawing.Size(538, 194);
this.pbxCarImage.SizeMode = System.Windows.Forms.PictureBoxSizeMode.Zoom;
this.pbxCarImage.TabIndex = 0;
this.pbxCarImage.TabStop = false;
//
// label1
//
this.label1.AutoSize = true;
this.label1.Location = new System.Drawing.Point(3, 200);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(44, 16);
this.label1.TabIndex = 1;
this.label1.Text = "Make:";
//
// tbxMake
//
this.tbxMake.Dock = System.Windows.Forms.DockStyle.Fill;
this.tbxMake.Location = new System.Drawing.Point(68, 203);
this.tbxMake.Name = "tbxMake";
this.tbxMake.Size = new System.Drawing.Size(473, 22);
this.tbxMake.TabIndex = 2;
this.tbxMake.TextChanged += new System.EventHandler(this.tbxMake_TextChanged);
//
// label2
//
this.label2.AutoSize = true;
this.label2.Location = new System.Drawing.Point(3, 230);
this.label2.Name = "label2";
this.label2.Size = new System.Drawing.Size(48, 16);
this.label2.TabIndex = 3;
this.label2.Text = "Model:";
//
// tbxModel
//
this.tbxModel.Dock = System.Windows.Forms.DockStyle.Fill;
this.tbxModel.Location = new System.Drawing.Point(68, 233);
this.tbxModel.Name = "tbxModel";
this.tbxModel.Size = new System.Drawing.Size(473, 22);
this.tbxModel.TabIndex = 4;
this.tbxModel.TextChanged += new System.EventHandler(this.tbxModel_TextChanged);
//
// label3
//
this.label3.AutoSize = true;
this.label3.Location = new System.Drawing.Point(3, 260);
this.label3.Name = "label3";
this.label3.Size = new System.Drawing.Size(39, 16);
this.label3.TabIndex = 5;
this.label3.Text = "Year:";
//
// label4
//
this.label4.AutoSize = true;
this.label4.Location = new System.Drawing.Point(3, 290);
this.label4.Name = "label4";
this.label4.Size = new System.Drawing.Size(42, 16);
this.label4.TabIndex = 6;
this.label4.Text = "Color:";
//
// label5
//
this.label5.AutoSize = true;
this.label5.Location = new System.Drawing.Point(3, 320);
this.label5.Name = "label5";
this.label5.Size = new System.Drawing.Size(59, 16);
this.label5.TabIndex = 7;
this.label5.Text = "Mileage:";
//
// label6
//
this.label6.AutoSize = true;
this.label6.Location = new System.Drawing.Point(3, 350);
this.label6.Name = "label6";
this.label6.Size = new System.Drawing.Size(41, 16);
this.label6.TabIndex = 8;
this.label6.Text = "Price:";
//
// flowLayoutPanel1
//
this.tableLayoutPanel1.SetColumnSpan(this.flowLayoutPanel1, 2);
this.flowLayoutPanel1.Controls.Add(this.btnSave);
this.flowLayoutPanel1.Controls.Add(this.btnDelete);
this.flowLayoutPanel1.Controls.Add(this.lblID);
this.flowLayoutPanel1.Dock = System.Windows.Forms.DockStyle.Fill;
this.flowLayoutPanel1.FlowDirection = System.Windows.Forms.FlowDirection.RightToLeft;
this.flowLayoutPanel1.Location = new System.Drawing.Point(3, 383);
this.flowLayoutPanel1.Name = "flowLayoutPanel1";
this.flowLayoutPanel1.Padding = new System.Windows.Forms.Padding(5);
this.flowLayoutPanel1.Size = new System.Drawing.Size(538, 64);
this.flowLayoutPanel1.TabIndex = 9;
//
// btnSave
//
this.btnSave.Location = new System.Drawing.Point(450, 8);
this.btnSave.Name = "btnSave";
this.btnSave.Size = new System.Drawing.Size(75, 23);
this.btnSave.TabIndex = 0;
this.btnSave.Text = "Save";
this.btnSave.UseVisualStyleBackColor = true;
this.btnSave.Click += new System.EventHandler(this.btnSave_Click);
//
// btnDelete
//
this.btnDelete.Location = new System.Drawing.Point(369, 8);
this.btnDelete.Name = "btnDelete";
this.btnDelete.Size = new System.Drawing.Size(75, 23);
this.btnDelete.TabIndex = 1;
this.btnDelete.Text = "Delete";
this.btnDelete.UseVisualStyleBackColor = true;
this.btnDelete.Click += new System.EventHandler(this.btnDelete_Click);
//
// lblID
//
this.lblID.AutoSize = true;
this.lblID.Location = new System.Drawing.Point(343, 5);
this.lblID.Name = "lblID";
this.lblID.Size = new System.Drawing.Size(20, 16);
this.lblID.TabIndex = 2;
this.lblID.Text = "ID";
//
// nudYear
//
this.nudYear.Location = new System.Drawing.Point(68, 263);
this.nudYear.Maximum = new decimal(new int[] {
3000,
0,
0,
0});
this.nudYear.Name = "nudYear";
this.nudYear.Size = new System.Drawing.Size(120, 22);
this.nudYear.TabIndex = 10;
this.nudYear.ValueChanged += new System.EventHandler(this.nudYear_ValueChanged);
//
// tbxColor
//
this.tbxColor.Dock = System.Windows.Forms.DockStyle.Fill;
this.tbxColor.Location = new System.Drawing.Point(68, 293);
this.tbxColor.Name = "tbxColor";
this.tbxColor.Size = new System.Drawing.Size(473, 22);
this.tbxColor.TabIndex = 11;
this.tbxColor.TextChanged += new System.EventHandler(this.tbxColor_TextChanged);
//
// nudMileage
//
this.nudMileage.Location = new System.Drawing.Point(68, 323);
this.nudMileage.Maximum = new decimal(new int[] {
999999,
0,
0,
0});
this.nudMileage.Name = "nudMileage";
this.nudMileage.Size = new System.Drawing.Size(120, 22);
this.nudMileage.TabIndex = 12;
this.nudMileage.ThousandsSeparator = true;
this.nudMileage.ValueChanged += new System.EventHandler(this.nudMileage_ValueChanged);
//
// nudPrice
//
this.nudPrice.DecimalPlaces = 2;
this.nudPrice.Location = new System.Drawing.Point(68, 353);
this.nudPrice.Maximum = new decimal(new int[] {
999999,
0,
0,
0});
this.nudPrice.Name = "nudPrice";
this.nudPrice.Size = new System.Drawing.Size(120, 22);
this.nudPrice.TabIndex = 13;
this.nudPrice.ThousandsSeparator = true;
this.nudPrice.ValueChanged += new System.EventHandler(this.nudPrice_ValueChanged);
//
// CarDetailsForm
//
this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 16F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(536, 450);
this.Controls.Add(this.tableLayoutPanel1);
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog;
this.MaximizeBox = false;
this.Name = "CarDetailsForm";
this.Text = "Details";
this.tableLayoutPanel1.ResumeLayout(false);
this.tableLayoutPanel1.PerformLayout();
((System.ComponentModel.ISupportInitialize)(this.pbxCarImage)).EndInit();
this.flowLayoutPanel1.ResumeLayout(false);
this.flowLayoutPanel1.PerformLayout();
((System.ComponentModel.ISupportInitialize)(this.nudYear)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.nudMileage)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.nudPrice)).EndInit();
this.ResumeLayout(false);
this.PerformLayout();
}
#endregion
private System.Windows.Forms.TableLayoutPanel tableLayoutPanel1;
private System.Windows.Forms.Label label1;
private System.Windows.Forms.TextBox tbxMake;
private System.Windows.Forms.Label label2;
private System.Windows.Forms.TextBox tbxModel;
private System.Windows.Forms.Label label3;
private System.Windows.Forms.Label label4;
private System.Windows.Forms.Label label5;
private System.Windows.Forms.Label label6;
private System.Windows.Forms.FlowLayoutPanel flowLayoutPanel1;
private System.Windows.Forms.Button btnSave;
private System.Windows.Forms.Button btnDelete;
private System.Windows.Forms.NumericUpDown nudYear;
private System.Windows.Forms.TextBox tbxColor;
private System.Windows.Forms.NumericUpDown nudMileage;
private System.Windows.Forms.NumericUpDown nudPrice;
private System.Windows.Forms.PictureBox pbxCarImage;
private System.Windows.Forms.Label lblID;
}
}

View File

@@ -1,89 +0,0 @@
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace CarManagerV2
{
public partial class CarDetailsForm : Form
{
Car car;
public CarDetailsForm(Car car)
{
InitializeComponent();
this.car = car;
tbxMake.Text = car.Make;
tbxModel.Text = car.Model;
nudYear.Value = car.Year;
tbxColor.Text = car.Color;
nudMileage.Value = car.Mileage;
nudPrice.Value = car.Price;
pbxCarImage.Image = ImageManager.GetImage(car);
lblID.Text = $"ID: {car.Id}";
}
private void tbxMake_TextChanged(object sender, EventArgs e)
{
car.Make = tbxMake.Text;
}
private void tbxModel_TextChanged(object sender, EventArgs e)
{
car.Model = tbxModel.Text;
}
private void nudYear_ValueChanged(object sender, EventArgs e)
{
car.Year = (int)nudYear.Value;
}
private void tbxColor_TextChanged(object sender, EventArgs e)
{
car.Color = tbxColor.Text;
}
private void nudMileage_ValueChanged(object sender, EventArgs e)
{
car.Mileage = (int)nudMileage.Value;
}
private void nudPrice_ValueChanged(object sender, EventArgs e)
{
car.Price = nudPrice.Value;
}
private void btnSave_Click(object sender, EventArgs e)
{
// save car to cars.csv and close form
//saving car... popuo
var msgbox = new PleaseWait();
msgbox.Show();
Application.DoEvents();
StateManager.UpdateCar(car);
Image fooimg = ImageManager.GetImage(car);
msgbox.Close();
this.Close();
}
private void btnDelete_Click(object sender, EventArgs e)
{
//are you sure?
var result = MessageBox.Show("Are you sure you want to delete this car?", "Delete Car", MessageBoxButtons.YesNo, MessageBoxIcon.Warning);
if (result == DialogResult.Yes)
{
Console.WriteLine("Deleting car: " + car.Id);
StateManager.RemoveCar(car);
this.Close();
}
}
}
}

View File

@@ -1,114 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProjectGuid>{93CA258B-A645-41A8-A24F-59036ABC173F}</ProjectGuid>
<OutputType>WinExe</OutputType>
<RootNamespace>CarManagerV2</RootNamespace>
<AssemblyName>CarManagerV2</AssemblyName>
<TargetFrameworkVersion>v4.7.2</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
<Deterministic>true</Deterministic>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget>
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget>
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<ItemGroup>
<Reference Include="System" />
<Reference Include="System.Core" />
<Reference Include="System.Xml.Linq" />
<Reference Include="System.Data.DataSetExtensions" />
<Reference Include="Microsoft.CSharp" />
<Reference Include="System.Data" />
<Reference Include="System.Deployment" />
<Reference Include="System.Drawing" />
<Reference Include="System.Net.Http" />
<Reference Include="System.Windows.Forms" />
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
<Compile Include="Car.cs" />
<Compile Include="CarCard.cs">
<SubType>UserControl</SubType>
</Compile>
<Compile Include="CarCard.Designer.cs">
<DependentUpon>CarCard.cs</DependentUpon>
</Compile>
<Compile Include="MainForm.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="MainForm.Designer.cs">
<DependentUpon>MainForm.cs</DependentUpon>
</Compile>
<Compile Include="CarDetailsForm.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="CarDetailsForm.Designer.cs">
<DependentUpon>CarDetailsForm.cs</DependentUpon>
</Compile>
<Compile Include="ImageManager.cs" />
<Compile Include="PleaseWait.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="PleaseWait.Designer.cs">
<DependentUpon>PleaseWait.cs</DependentUpon>
</Compile>
<Compile Include="Program.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="SafeManager.cs" />
<Compile Include="StateManager.cs" />
<EmbeddedResource Include="CarCard.resx">
<DependentUpon>CarCard.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="MainForm.resx">
<DependentUpon>MainForm.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="CarDetailsForm.resx">
<DependentUpon>CarDetailsForm.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="PleaseWait.resx">
<DependentUpon>PleaseWait.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Properties\Resources.resx">
<Generator>ResXFileCodeGenerator</Generator>
<LastGenOutput>Resources.Designer.cs</LastGenOutput>
<SubType>Designer</SubType>
</EmbeddedResource>
<Compile Include="Properties\Resources.Designer.cs">
<AutoGen>True</AutoGen>
<DependentUpon>Resources.resx</DependentUpon>
</Compile>
<None Include="Properties\Settings.settings">
<Generator>SettingsSingleFileGenerator</Generator>
<LastGenOutput>Settings.Designer.cs</LastGenOutput>
</None>
<Compile Include="Properties\Settings.Designer.cs">
<AutoGen>True</AutoGen>
<DependentUpon>Settings.settings</DependentUpon>
<DesignTimeSharedInput>True</DesignTimeSharedInput>
</Compile>
</ItemGroup>
<ItemGroup>
<None Include="App.config" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
</Project>

View File

@@ -1,75 +0,0 @@
using System;
using System.Collections.Generic;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace CarManagerV2
{
internal class ImageManager
{
public static void InitializeImageFolder()
{
string path = "images";
if (!System.IO.Directory.Exists(path))
{
System.IO.Directory.CreateDirectory(path);
}
}
public static string GetImagePath(Car car)
{
string basePath = "images/";
string fileName = $"{car.Make}_{car.Model}_{car.Year}_{car.Color}.png";
return basePath + fileName;
}
public static Image GetImage(Car car)
{
InitializeImageFolder();
FetchImage(car);
string path = GetImagePath(car);
// does image exist?
if (System.IO.File.Exists(path))
{
return Image.FromFile(path);
}
else
{
return Image.FromFile("images/no_image_available.png");
}
}
public static void FetchImage(Car car)
{
// Fetch the image from https://cdn.imagin.studio/getimage and save it to images/Make_Model_Year.webp
// use params like this: ?customer=hrjavascript-mastery&zoomType=fullscreen&make={make}&modelFamily={model}&modelYear={year}&angle=front&paintDescription={color}&fileType=png
// check if the image already exists
string path = GetImagePath(car);
if (System.IO.File.Exists(path))
{
return;
}
string url = $"https://cdn.imagin.studio/getimage?customer=hrjavascript-mastery&zoomType=fullscreen&make={car.Make}&modelFamily={car.Model}&modelYear={car.Year}&angle=front&paintDescription={car.Color}&fileType=png";
//add Referer header
using (var client = new System.Net.WebClient())
{
client.Headers.Add("Referer", "http://localhost");
try
{
client.DownloadFile(url, path);
}
catch
{
// if error, use no_image_available.png
System.IO.File.Copy("images/no_image_available.png", path);
}
}
}
}
}

View File

@@ -1,126 +0,0 @@
namespace CarManagerV2
{
partial class MainForm
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Windows Form Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(MainForm));
this.tableLayoutPanel1 = new System.Windows.Forms.TableLayoutPanel();
this.flpCars = new System.Windows.Forms.FlowLayoutPanel();
this.tableLayoutPanel2 = new System.Windows.Forms.TableLayoutPanel();
this.tbxSearch = new System.Windows.Forms.TextBox();
this.btnNewCar = new System.Windows.Forms.Button();
this.tableLayoutPanel1.SuspendLayout();
this.tableLayoutPanel2.SuspendLayout();
this.SuspendLayout();
//
// tableLayoutPanel1
//
this.tableLayoutPanel1.ColumnCount = 1;
this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 100F));
this.tableLayoutPanel1.Controls.Add(this.flpCars, 0, 1);
this.tableLayoutPanel1.Controls.Add(this.tableLayoutPanel2, 0, 0);
this.tableLayoutPanel1.Dock = System.Windows.Forms.DockStyle.Fill;
this.tableLayoutPanel1.Location = new System.Drawing.Point(0, 0);
this.tableLayoutPanel1.Name = "tableLayoutPanel1";
this.tableLayoutPanel1.RowCount = 2;
this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 40F));
this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle());
this.tableLayoutPanel1.Size = new System.Drawing.Size(800, 450);
this.tableLayoutPanel1.TabIndex = 0;
//
// flpCars
//
this.flpCars.AutoScroll = true;
this.flpCars.AutoScrollMargin = new System.Drawing.Size(0, 200);
this.flpCars.Dock = System.Windows.Forms.DockStyle.Fill;
this.flpCars.Location = new System.Drawing.Point(3, 43);
this.flpCars.Name = "flpCars";
this.flpCars.Size = new System.Drawing.Size(794, 404);
this.flpCars.TabIndex = 1;
//
// tableLayoutPanel2
//
this.tableLayoutPanel2.ColumnCount = 2;
this.tableLayoutPanel2.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 50F));
this.tableLayoutPanel2.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 50F));
this.tableLayoutPanel2.Controls.Add(this.tbxSearch, 0, 0);
this.tableLayoutPanel2.Controls.Add(this.btnNewCar, 1, 0);
this.tableLayoutPanel2.Dock = System.Windows.Forms.DockStyle.Fill;
this.tableLayoutPanel2.Location = new System.Drawing.Point(3, 3);
this.tableLayoutPanel2.Name = "tableLayoutPanel2";
this.tableLayoutPanel2.RowCount = 1;
this.tableLayoutPanel2.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 100F));
this.tableLayoutPanel2.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 34F));
this.tableLayoutPanel2.Size = new System.Drawing.Size(794, 34);
this.tableLayoutPanel2.TabIndex = 2;
//
// tbxSearch
//
this.tbxSearch.Dock = System.Windows.Forms.DockStyle.Fill;
this.tbxSearch.Location = new System.Drawing.Point(3, 3);
this.tbxSearch.Name = "tbxSearch";
this.tbxSearch.Size = new System.Drawing.Size(391, 22);
this.tbxSearch.TabIndex = 3;
this.tbxSearch.TextChanged += new System.EventHandler(this.tbxSearch_TextChanged);
//
// btnNewCar
//
this.btnNewCar.Location = new System.Drawing.Point(400, 3);
this.btnNewCar.Name = "btnNewCar";
this.btnNewCar.Size = new System.Drawing.Size(75, 23);
this.btnNewCar.TabIndex = 4;
this.btnNewCar.Text = "Add Car";
this.btnNewCar.UseVisualStyleBackColor = true;
this.btnNewCar.Click += new System.EventHandler(this.btnNewCar_Click);
//
// MainForm
//
this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 16F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(800, 450);
this.Controls.Add(this.tableLayoutPanel1);
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
this.MinimumSize = new System.Drawing.Size(818, 497);
this.Name = "MainForm";
this.Text = "Carmanager 2";
this.tableLayoutPanel1.ResumeLayout(false);
this.tableLayoutPanel2.ResumeLayout(false);
this.tableLayoutPanel2.PerformLayout();
this.ResumeLayout(false);
}
#endregion
private System.Windows.Forms.TableLayoutPanel tableLayoutPanel1;
private System.Windows.Forms.FlowLayoutPanel flpCars;
private System.Windows.Forms.TableLayoutPanel tableLayoutPanel2;
private System.Windows.Forms.TextBox tbxSearch;
private System.Windows.Forms.Button btnNewCar;
}
}

View File

@@ -1,150 +0,0 @@
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace CarManagerV2
{
public partial class MainForm : Form
{
List<Car> cars = new List<Car>();
public MainForm()
{
InitializeComponent();
SafeManager.InitializeFile("cars.csv");
List<Car> _cars = SafeManager.ReadCars("cars.csv");
refreshCars(_cars);
}
private void refreshCars(List<Car> _cars)
{
//if cars havent changed, dont refresh
//bool changed = false;
//foreach (Car car in _cars)
//{
// Car existing = cars.FirstOrDefault(c => c.Id == car.Id);
// if (existing == null)
// {
// Console.WriteLine($"Added: {car.Id}");
// changed = true;
// break;
// }
// else if (existing.isChanged(car))
// {
// Console.WriteLine($"Modified: {car.Id} / {existing.Id}");
// changed = true;
// break;
// }
//}
//if(!changed && cars.Count == _cars.Count)
//{
// Console.WriteLine("Cars are the same, not refreshing.");
// cars = _cars;
// return;
//}
cars = _cars;
//if(cars.SequenceEqual(_cars))
//{
// Console.WriteLine("Cars are the same, not refreshing.");
// return;
//}
//else
//{
// Console.WriteLine("Cars have changed, refreshing.");
// Console.WriteLine($"Old cars count: {cars.Count}, New cars count: {_cars.Count}");
// //find differences
// Console.WriteLine("Saved:");
// foreach (var car in cars)
// {
// Console.Write($"{car.Id}, {car.Make} {car.Model}, {car.Year} | ");
// }
// Console.WriteLine("-------------------");
// Console.WriteLine("New:");
// foreach (var car in _cars)
// {
// Console.Write($"{car.Id}, {car.Make} {car.Model}, {car.Year} | ");
// }
// Console.WriteLine();
// var addedCars = _cars.Except(cars).ToList();
// var removedCars = cars.Except(_cars).ToList();
// var modifiedCars = _cars.Where(c => cars.Any(c2 => c2.Id == c.Id && !c2.Equals(c))).ToList();
// Console.WriteLine($"Added cars: {addedCars.Count}, Removed cars: {removedCars.Count}, Modified cars: {modifiedCars.Count}");
//}
flpCars.Controls.Clear();
foreach (Car car in _cars)
{
CarCard card = new CarCard();
card.CarName = $"{car.Make} {car.Model}";
card.CarDetails = $"{car.Year}, {car.Mileage} km, ${car.Price}";
card.CarImage = ImageManager.GetImage(car);
card.CardClicked += (s, e) =>
{
Console.WriteLine($"Card clicked: {car.Id}");
CarDetailsForm detailsForm = new CarDetailsForm(car);
detailsForm.FormClosed += (s2, e2) =>
{
// refresh cars
Application.DoEvents();
Console.WriteLine("Refreshing cars...");
List<Car> __cars = SafeManager.ReadCars("cars.csv");
refreshCars(__cars);
};
detailsForm.ShowDialog();
};
flpCars.Controls.Add(card);
}
}
private void btnNewCar_Click(object sender, EventArgs e)
{
Car foocar = StateManager.CreateCar("New", "Car", 2020, "White", 0, 20000);
CarDetailsForm detailsForm = new CarDetailsForm(foocar);
detailsForm.FormClosed += (s2, e2) =>
{
// refresh cars
Console.WriteLine("Refreshing cars...");
cars = SafeManager.ReadCars("cars.csv");
refreshCars(cars);
};
detailsForm.ShowDialog();
}
void searchList(string query)
{
List<Car> results = new List<Car>();
foreach (Car car in cars)
{
if (car.Make.ToLower().Contains(query.ToLower()) || car.Model.ToLower().Contains(query.ToLower()) || car.Year.ToString().Contains(query) || car.Mileage.ToString().Contains(query) || car.Price.ToString().Contains(query))
{
results.Add(car);
}
}
refreshCars(results);
}
private void tbxSearch_TextChanged(object sender, EventArgs e)
{
string query = tbxSearch.Text;
if(string.IsNullOrWhiteSpace(query))
{
refreshCars(cars);
}
else
{
searchList(query);
}
}
}
}

View File

@@ -1,820 +0,0 @@
<?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>
<assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<data name="$this.Icon" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft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AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA////////////////8AAAAP//
//////////////AAAAD////////////////wAAAA////////////////8AAAAP////////////////AA
AAD////////////////wAAAA////////////////8AAAAP////////////////AAAAD/////////////
///wAAAA////////////////8AAAAP////////////////AAAAD////////////////wAAAA//////+A
AB//////8AAAAP/////8AAAD//////AAAAD/////4AAAAH/////wAAAA/////4AAAAAf////8AAAAP//
//4AAAAAB/////AAAAD////4AAAAAAH////wAAAA////8AAAAAAA////8AAAAP///8AAAAAAAD////AA
AAD///+AAAAAAAAf///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AAAAAAAP//wAAAA//AAAAAA
AAAAAH//8AAAAP/wAAAAAAAAAAB///AAAAD/8AAAAAAAAAAA///wAAAA//AAAAAAAAAAAf//8AAAAP/w
AAAAAAAAAAP///AAAAD/8AAAAAAAAAAH///wAAAA//AAAAAAAAAAD///8AAAAP/wAAAAAAAAAB////AA
AAD/+AAAAAAAAAA////wAAAA//gAAAAAAAAA////8AAAAP/8AAAAAAAAAf////AAAAD//gAAAAAAAAf/
///wAAAA//4AAAAAAAAf////8AAAAP//gAAAAAAAf/////AAAAD//8AAAAAAA//////wAAAA///wAAAA
AB//////8AAAAP////////////////AAAAD////////////////wAAAA////////////////8AAAAP//
//////////////AAAAD////////////////wAAAA////////////////8AAAAP////////////////AA
AAD////////////////wAAAA////////////////8AAAAP////////////////AAAAD/////////////
///wAAAA////////////////8AAAAA==
</value>
</data>
</root>

View File

@@ -1,92 +0,0 @@
namespace CarManagerV2
{
partial class PleaseWait
{
/// <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.progressBar1 = new System.Windows.Forms.ProgressBar();
this.label1 = new System.Windows.Forms.Label();
this.label2 = new System.Windows.Forms.Label();
this.SuspendLayout();
//
// progressBar1
//
this.progressBar1.Location = new System.Drawing.Point(12, 62);
this.progressBar1.Name = "progressBar1";
this.progressBar1.Size = new System.Drawing.Size(422, 23);
this.progressBar1.Style = System.Windows.Forms.ProgressBarStyle.Marquee;
this.progressBar1.TabIndex = 0;
this.progressBar1.Click += new System.EventHandler(this.progressBar1_Click);
//
// label1
//
this.label1.AutoSize = true;
this.label1.Font = new System.Drawing.Font("Microsoft Sans Serif", 10.2F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.label1.Location = new System.Drawing.Point(12, 13);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(121, 20);
this.label1.TabIndex = 1;
this.label1.Text = "Please wait...";
//
// label2
//
this.label2.AutoSize = true;
this.label2.Location = new System.Drawing.Point(13, 33);
this.label2.Name = "label2";
this.label2.Size = new System.Drawing.Size(133, 16);
this.label2.TabIndex = 2;
this.label2.Text = "Saving your changes";
//
// PleaseWait
//
this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 16F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.AutoSize = true;
this.ClientSize = new System.Drawing.Size(446, 97);
this.ControlBox = false;
this.Controls.Add(this.label2);
this.Controls.Add(this.label1);
this.Controls.Add(this.progressBar1);
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog;
this.MaximizeBox = false;
this.MinimizeBox = false;
this.Name = "PleaseWait";
this.ShowIcon = false;
this.ShowInTaskbar = false;
this.Text = "Please Wait";
this.ResumeLayout(false);
this.PerformLayout();
}
#endregion
private System.Windows.Forms.ProgressBar progressBar1;
private System.Windows.Forms.Label label1;
private System.Windows.Forms.Label label2;
}
}

View File

@@ -1,29 +0,0 @@
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace CarManagerV2
{
public partial class PleaseWait : Form
{
public PleaseWait()
{
InitializeComponent();
// loading animation
progressBar1.Style = ProgressBarStyle.Marquee;
progressBar1.MarqueeAnimationSpeed = 30;
}
private void progressBar1_Click(object sender, EventArgs e)
{
}
}
}

View File

@@ -1,33 +0,0 @@
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
[assembly: AssemblyTitle("CarManagerV2")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("CarManagerV2")]
[assembly: AssemblyCopyright("Copyright © 2025")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
// Setting ComVisible to false makes the types in this assembly not visible
// to COM components. If you need to access a type in this assembly from
// COM, set the ComVisible attribute to true on that type.
[assembly: ComVisible(false)]
// The following GUID is for the ID of the typelib if this project is exposed to COM
[assembly: Guid("93ca258b-a645-41a8-a24f-59036abc173f")]
// Version information for an assembly consists of the following four values:
//
// Major Version
// Minor Version
// Build Number
// Revision
//
[assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyFileVersion("1.0.0.0")]

View File

@@ -1,30 +0,0 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Runtime Version:4.0.30319.42000
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
namespace CarManagerV2.Properties
{
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "11.0.0.0")]
internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase
{
private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
public static Settings Default
{
get
{
return defaultInstance;
}
}
}
}

View File

@@ -1,7 +0,0 @@
<?xml version='1.0' encoding='utf-8'?>
<SettingsFile xmlns="http://schemas.microsoft.com/VisualStudio/2004/01/settings" CurrentProfile="(Default)">
<Profiles>
<Profile Name="(Default)" />
</Profiles>
<Settings />
</SettingsFile>

View File

@@ -1,52 +0,0 @@
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace CarManagerV2
{
internal class SafeManager
{
public static void InitializeFile(string path)
{
if (!File.Exists(@path))
{
using (StreamWriter writer = new StreamWriter(@path))
{
// Create the file, empty
writer.WriteLine();
}
}
}
public static List<Car> ReadCars(string path)
{
List<Car> cars = new List<Car>();
using (StreamReader reader = new StreamReader(@path))
{
string line;
while ((line = reader.ReadLine()) != null)
{
// Process the line
if (line == "") continue;
cars.Add(Car.FromCsvString(line));
}
}
return cars;
}
public static void SaveCars(string path, List<Car> cars)
{
using (StreamWriter writer = new StreamWriter(@path))
{
foreach (Car car in cars)
{
writer.WriteLine(car.ToCsvString());
}
}
}
}
}

View File

@@ -1,59 +0,0 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace CarManagerV2
{
internal class StateManager
{
static List<Car> cars = new List<Car>();
public static Car GetCarById(int id)
{
cars = SafeManager.ReadCars("cars.csv");
return cars.FirstOrDefault(c => c.Id == id);
}
public static List<Car> Cars { get { return cars; } set { cars = value; } }
public static void AddCar(Car car)
{
cars = SafeManager.ReadCars("cars.csv");
cars.Add(car);
SafeManager.SaveCars("cars.csv", cars);
}
public static void RemoveCar(Car car)
{
cars = SafeManager.ReadCars("cars.csv");
Car existingCar = GetCarById(car.Id);
if (existingCar == null) return;
cars.Remove(existingCar);
SafeManager.SaveCars("cars.csv", cars);
}
public static void UpdateCar(Car car)
{
Car existingCar = GetCarById(car.Id);
if (existingCar != null)
{
int index = cars.IndexOf(existingCar);
cars[index] = car;
Console.WriteLine("Updated car: " + existingCar.Id);
SafeManager.SaveCars("cars.csv", cars);
}
}
public static Car CreateCar(string make, string model, int year, string color, int mileage, decimal price)
{
cars = SafeManager.ReadCars("cars.csv");
int newId = cars.Count > 0 ? cars.Max(c => c.Id) + 1 : 1;
Car newCar = new Car(newId, make, model, year, color, mileage, price);
AddCar(newCar);
return newCar;
}
}
}

View File

@@ -1,9 +1,11 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 17
VisualStudioVersion = 17.14.36414.22 d17.14
# Visual Studio Version 18
VisualStudioVersion = 18.3.11520.95
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CarManagerV2", "CarManagerV2\CarManagerV2.csproj", "{93CA258B-A645-41A8-A24F-59036ABC173F}"
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CarManagerV3", "CarManagerV3\CarManagerV3.csproj", "{93CA258B-A645-41A8-A24F-59036ABC173F}"
EndProject
Project("{54435603-DBB4-11D2-8724-00A0C9A8B90C}") = "CarManager3Setup", "CarManager3Setup\CarManager3Setup.vdproj", "{47ED51EB-1DD0-B8F0-88C8-92C6E3E06030}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
@@ -15,6 +17,8 @@ Global
{93CA258B-A645-41A8-A24F-59036ABC173F}.Debug|Any CPU.Build.0 = Debug|Any CPU
{93CA258B-A645-41A8-A24F-59036ABC173F}.Release|Any CPU.ActiveCfg = Release|Any CPU
{93CA258B-A645-41A8-A24F-59036ABC173F}.Release|Any CPU.Build.0 = Release|Any CPU
{47ED51EB-1DD0-B8F0-88C8-92C6E3E06030}.Debug|Any CPU.ActiveCfg = Debug
{47ED51EB-1DD0-B8F0-88C8-92C6E3E06030}.Release|Any CPU.ActiveCfg = Release
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE

21
CarManagerV3/App.config Normal file
View File

@@ -0,0 +1,21 @@
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<configSections>
<sectionGroup name="userSettings" type="System.Configuration.UserSettingsGroup, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" >
<section name="CarManagerV3.Properties.Settings" type="System.Configuration.ClientSettingsSection, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" allowExeDefinition="MachineToLocalUser" requirePermission="false" />
</sectionGroup>
</configSections>
<startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.7.2" />
</startup>
<userSettings>
<CarManagerV3.Properties.Settings>
<setting name="DataLocation" serializeAs="String">
<value />
</setting>
<setting name="AllowPrerelease" serializeAs="String">
<value>False</value>
</setting>
</CarManagerV3.Properties.Settings>
</userSettings>
</configuration>

View File

@@ -0,0 +1,66 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net8.0-windows</TargetFramework>
<PublishSingleFile>true</PublishSingleFile>
<SelfContained>true</SelfContained>
<OutputType>WinExe</OutputType>
<PublishUrl>publish\</PublishUrl>
<Install>true</Install>
<InstallFrom>Disk</InstallFrom>
<UpdateEnabled>false</UpdateEnabled>
<UpdateMode>Foreground</UpdateMode>
<UpdateInterval>7</UpdateInterval>
<UpdateIntervalUnits>Days</UpdateIntervalUnits>
<UpdatePeriodically>false</UpdatePeriodically>
<UpdateRequired>false</UpdateRequired>
<MapFileExtensions>true</MapFileExtensions>
<ApplicationRevision>0</ApplicationRevision>
<ApplicationVersion>1.4.0</ApplicationVersion>
<IsWebBootstrapper>false</IsWebBootstrapper>
<UseApplicationTrust>false</UseApplicationTrust>
<BootstrapperEnabled>true</BootstrapperEnabled>
<!--<GenerateAssemblyInfo>false</GenerateAssemblyInfo>-->
<UseWindowsForms>true</UseWindowsForms>
<ImportWindowsDesktopTargets>true</ImportWindowsDesktopTargets>
<ApplicationIcon>CarMgm_Icon.ico</ApplicationIcon>
<AssemblyTitle>Car Manager 3</AssemblyTitle>
<Product>Car Manager 3</Product>
<Version>1.4.0</Version>
</PropertyGroup>
<ItemGroup>
<Compile Update="Forms\Components\CarCard.cs">
<SubType>UserControl</SubType>
</Compile>
<Compile Update="Properties\Settings.Designer.cs">
<DesignTimeSharedInput>True</DesignTimeSharedInput>
<AutoGen>True</AutoGen>
<DependentUpon>Settings.settings</DependentUpon>
</Compile>
<PackageReference Include="Microsoft.CSharp" Version="4.7.0" />
<PackageReference Include="Newtonsoft.Json" Version="13.0.4" />
<PackageReference Include="System.Data.DataSetExtensions" Version="4.5.0" />
<PackageReference Include="System.Net.Http" Version="4.3.4" />
</ItemGroup>
<ItemGroup>
<BootstrapperPackage Include=".NETFramework,Version=v4.7.2">
<Visible>False</Visible>
<ProductName>Microsoft .NET Framework 4.7.2 %28x86 and x64%29</ProductName>
<Install>true</Install>
</BootstrapperPackage>
<BootstrapperPackage Include="Microsoft.Net.Framework.3.5.SP1">
<Visible>False</Visible>
<ProductName>.NET Framework 3.5 SP1</ProductName>
<Install>false</Install>
</BootstrapperPackage>
</ItemGroup>
<ItemGroup>
<Content Include="CarMgm_Icon.ico" />
</ItemGroup>
<ItemGroup>
<None Update="Properties\Settings.settings">
<Generator>SettingsSingleFileGenerator</Generator>
<LastGenOutput>Settings.Designer.cs</LastGenOutput>
</None>
</ItemGroup>
</Project>

Binary file not shown.

After

Width:  |  Height:  |  Size: 264 KiB

235
CarManagerV3/Classes/Car.cs Normal file
View File

@@ -0,0 +1,235 @@
using System;
using CarManagerV3.Util;
namespace CarManagerV3
{
/// <summary>
/// Class <c>Car</c> represents a car with various attributes such as make, model, year, color, mileage, and price.
/// </summary>
public class Car
{
private string id;
private string make;
private string model;
private int year;
private string color;
private int mileage;
private decimal price;
private int order;
public string Id { get => id; }
public string Make
{
get => make;
set
{
if (string.IsNullOrWhiteSpace(value)) throw new ArgumentException("Make cannot be empty.");
make = value;
}
}
public string Model
{
get => model;
set
{
if (string.IsNullOrWhiteSpace(value)) throw new ArgumentException("Model cannot be empty.");
model = value;
}
}
public int Year
{
get => year;
set
{
if (value < 1886 || value > DateTime.Now.Year + 1) throw new ArgumentException("Year must be between 1886 and next year.");
year = value;
}
}
public string Color
{
get => color;
set
{
if (string.IsNullOrWhiteSpace(value)) throw new ArgumentException("Color cannot be empty.");
color = value;
}
}
public int Mileage
{
get => mileage;
set
{
if (value < 0) throw new ArgumentException("Mileage cannot be negative.");
mileage = value;
}
}
public decimal Price
{
get => price;
set
{
if (value < 0) throw new ArgumentException("Price cannot be negative.");
price = value;
}
}
public int Order { get => order; set => order = value; }
public int Age { get => DateTime.Now.Year - year; }
public string AgeString
{
get
{
int age = this.Age;
if (age == 0) return "New";
else if (age == 1) return "1 year";
else if (age < 0) return "From the future!";
else return $"{age} years";
}
}
//TODO: Make Id read-only CUID. Allows for better integrity, especially when merging.
//TODO: Add buying price and automatic calculation of profit/loss with selling price suggestion.
//TODO: Add Buying Date.
//TODO: Add sold boolean and Sold Date.
//TODO: Add "hidden" attribute for cars that are not for sale anymore but should be kept in the database for records.
/// <summary>
/// Initializes a new instance of the <see cref="Car"/> class.
/// </summary>
/// <param name="id">The unique identifier as an Integer.</param>
/// <param name="make">The make / manufacturer of the car.</param>
/// <param name="model">The model.</param>
/// <param name="year">The year the car was built.</param>
/// <param name="color">The color of the car.</param>
/// <param name="mileage">The current mileage on the car.</param>
/// <param name="price">The selling-price of the car.</param>
/// <param name="order">The order.</param>
public Car(string id, string make, string model, int year, string color, int mileage, decimal price, int order = 0)
{
// is ID just a number? Then it is legacy and needs a new ID string.
int numericId = 0;
if ((string.IsNullOrWhiteSpace(id) || int.TryParse(id, out numericId)) && id != "0")
{
id = CUID.NewCUID().ToString();
if (numericId > 0)
{
order = numericId + order;
}
}
if(id.Length > 8)
{
id = CUID.NewCUID().ToString();
}
// Sets the properties using the setters to ensure validation is applied.
this.id = id;
this.Make = make;
this.Model = model;
this.Year = year;
this.Color = color;
this.Mileage = mileage;
this.Price = price;
this.Order = order;
}
/// <summary>
/// Converts to string in a custom readable format.
/// <example>
/// For Example:
/// Skoda Fabia (2015)
/// </example>
/// </summary>
/// <returns>
/// A <see cref="System.String" /> that represents this instance.
/// </returns>
public override string ToString()
{
return $"{this.Make} {this.Model} ({this.Year})";
}
/// <summary>
/// Converts to default CSV savable string.
/// </summary>
/// <returns></returns>
public string ToCsvString()
{
return $"{this.Id};{this.Make};{this.Model};{this.Year};{this.Color};{this.Mileage};{this.Price};{this.Order}";
}
//TODO: Add error handling for malformed CSV strings and detection for missing fields.
//TODO: Add support for different CSV formats (e.g., different delimiters, quoted fields, etc.).
//TODO: Add support for nil or optional fields.
//TODO: Add detectin for invalid data / nonsensical values (e.g., negative mileage or year in the future). / Validate it actually is a car.
/// <summary>
/// Creates a <see cref="Car"/> instance from a CSV string in the default format.
/// </summary>
/// <param name="csv">The CSV Line.</param>
/// <returns>
/// A new <see cref="Car"/> instance.
/// </returns>
public static Car FromCsvString(string csv)
{
try
{
string[] parts = csv.Split(';');
// is part 7 a valid int? if not set it to 0 and log a warning.
if (parts.Length == 7)
{
Console.Error.WriteLine($"Warning: CSV string has only 7 fields, expected 8. Setting Order to 0. CSV: {csv}");
if (!StateManager.askForMigration())
{
throw new Exception("User declined migration. Cannot parse CSV string with missing Order field.");
}
Array.Resize(ref parts, 8);
parts[7] = "0";
}
else if (parts.Length != 8)
{
throw new FormatException($"CSV string has {parts.Length} fields, expected 8. CSV: {csv}");
}
Car temp = new Car(parts[0], parts[1], parts[2], int.Parse(parts[3]), parts[4], int.Parse(parts[5]), decimal.Parse(parts[6]), int.Parse(parts[7]));
return temp;
}
catch (Exception ex)
{
Console.Error.WriteLine($"Error parsing CSV Car string: {ex.Message}");
return null;
}
}
/// <summary>
/// Determines whether this <see cref="Car"/> is any different from the provided <see cref="Car" />.
/// </summary>
/// <param name="other">The <see cref="Car"/> to check against</param>
/// <returns>
/// <c>true</c> if the specified other is changed; otherwise, <c>false</c>.
/// </returns>
public bool IsChanged(Car other)
{
return this.Make != other.Make || this.Model != other.Model || this.Year != other.Year || this.Color != other.Color || this.Mileage != other.Mileage || this.Price != other.Price || this.Color != other.Color || this.Order != other.Order;
}
/// <summary>
/// Clones this instance.
/// </summary>
/// <returns>An identical but seperate <see cref="Car"/></returns>
public Car Clone()
{
return new Car(this.Id, this.Make, this.Model, this.Year, this.Color, this.Mileage, this.Price, this.Order);
}
public static bool isLegacyCsvString(string csv)
{
string[] parts = csv.Split(';');
return parts.Length == 7; // Legacy format has 7 fields, new format has 8 fields (with Order).
}
}
}

View File

@@ -0,0 +1,16 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace CarManagerV3
{
/// <summary>
/// LegacyException is a custom exception class used to indicate that a file is in a legacy format that cannot be read by the current version of the application. It is thrown when the SafeManager encounters a file format that it does not recognize, allowing the application to handle this specific case separately from other types of exceptions.
/// </summary>
/// <seealso cref="System.Exception" />
internal class LegacyException : Exception
{
}
}

View File

@@ -0,0 +1,382 @@
namespace CarManagerV3
{
partial class CarDetailsForm
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Windows Form Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(CarDetailsForm));
tableLayoutPanel1 = new System.Windows.Forms.TableLayoutPanel();
pbxCarImage = new System.Windows.Forms.PictureBox();
label1 = new System.Windows.Forms.Label();
tbxMake = new System.Windows.Forms.TextBox();
label2 = new System.Windows.Forms.Label();
tbxModel = new System.Windows.Forms.TextBox();
label3 = new System.Windows.Forms.Label();
label4 = new System.Windows.Forms.Label();
label5 = new System.Windows.Forms.Label();
label6 = new System.Windows.Forms.Label();
flowLayoutPanel1 = new System.Windows.Forms.FlowLayoutPanel();
btnSave = new System.Windows.Forms.Button();
btnDelete = new System.Windows.Forms.Button();
lblID = new System.Windows.Forms.Label();
tbxColor = new System.Windows.Forms.TextBox();
nudMileage = new System.Windows.Forms.NumericUpDown();
nudPrice = new System.Windows.Forms.NumericUpDown();
tableLayoutPanel2 = new System.Windows.Forms.TableLayoutPanel();
nudYear = new System.Windows.Forms.NumericUpDown();
lblAge = new System.Windows.Forms.Label();
tbxAge = new System.Windows.Forms.TextBox();
tableLayoutPanel1.SuspendLayout();
((System.ComponentModel.ISupportInitialize)pbxCarImage).BeginInit();
flowLayoutPanel1.SuspendLayout();
((System.ComponentModel.ISupportInitialize)nudMileage).BeginInit();
((System.ComponentModel.ISupportInitialize)nudPrice).BeginInit();
tableLayoutPanel2.SuspendLayout();
((System.ComponentModel.ISupportInitialize)nudYear).BeginInit();
SuspendLayout();
//
// tableLayoutPanel1
//
tableLayoutPanel1.AutoSize = true;
tableLayoutPanel1.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink;
tableLayoutPanel1.ColumnCount = 2;
tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 80F));
tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 100F));
tableLayoutPanel1.Controls.Add(pbxCarImage, 0, 0);
tableLayoutPanel1.Controls.Add(label1, 0, 1);
tableLayoutPanel1.Controls.Add(tbxMake, 1, 1);
tableLayoutPanel1.Controls.Add(label2, 0, 2);
tableLayoutPanel1.Controls.Add(tbxModel, 1, 2);
tableLayoutPanel1.Controls.Add(label3, 0, 3);
tableLayoutPanel1.Controls.Add(label4, 0, 4);
tableLayoutPanel1.Controls.Add(label5, 0, 5);
tableLayoutPanel1.Controls.Add(label6, 0, 6);
tableLayoutPanel1.Controls.Add(flowLayoutPanel1, 0, 7);
tableLayoutPanel1.Controls.Add(tbxColor, 1, 4);
tableLayoutPanel1.Controls.Add(nudMileage, 1, 5);
tableLayoutPanel1.Controls.Add(nudPrice, 1, 6);
tableLayoutPanel1.Controls.Add(tableLayoutPanel2, 1, 3);
tableLayoutPanel1.Dock = System.Windows.Forms.DockStyle.Fill;
tableLayoutPanel1.Location = new System.Drawing.Point(0, 0);
tableLayoutPanel1.Margin = new System.Windows.Forms.Padding(3, 4, 30, 4);
tableLayoutPanel1.Name = "tableLayoutPanel1";
tableLayoutPanel1.RowCount = 8;
tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 251F));
tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 37F));
tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 37F));
tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 37F));
tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 37F));
tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 37F));
tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 37F));
tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 51F));
tableLayoutPanel1.Size = new System.Drawing.Size(536, 563);
tableLayoutPanel1.TabIndex = 0;
//
// pbxCarImage
//
tableLayoutPanel1.SetColumnSpan(pbxCarImage, 2);
pbxCarImage.Dock = System.Windows.Forms.DockStyle.Fill;
pbxCarImage.Image = (System.Drawing.Image)resources.GetObject("pbxCarImage.Image");
pbxCarImage.Location = new System.Drawing.Point(3, 4);
pbxCarImage.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4);
pbxCarImage.Name = "pbxCarImage";
pbxCarImage.Size = new System.Drawing.Size(530, 243);
pbxCarImage.SizeMode = System.Windows.Forms.PictureBoxSizeMode.Zoom;
pbxCarImage.TabIndex = 0;
pbxCarImage.TabStop = false;
//
// label1
//
label1.AutoSize = true;
label1.Dock = System.Windows.Forms.DockStyle.Fill;
label1.Location = new System.Drawing.Point(3, 251);
label1.Name = "label1";
label1.Size = new System.Drawing.Size(74, 37);
label1.TabIndex = 1;
label1.Text = "Make:";
label1.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
//
// tbxMake
//
tbxMake.Dock = System.Windows.Forms.DockStyle.Fill;
tbxMake.Location = new System.Drawing.Point(83, 255);
tbxMake.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4);
tbxMake.Name = "tbxMake";
tbxMake.Size = new System.Drawing.Size(450, 27);
tbxMake.TabIndex = 1;
tbxMake.TextChanged += tbxMake_TextChanged;
tbxMake.Leave += tbxMake_Leave;
//
// label2
//
label2.AutoSize = true;
label2.Dock = System.Windows.Forms.DockStyle.Fill;
label2.Location = new System.Drawing.Point(3, 288);
label2.Name = "label2";
label2.Size = new System.Drawing.Size(74, 37);
label2.TabIndex = 3;
label2.Text = "Model:";
label2.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
//
// tbxModel
//
tbxModel.Dock = System.Windows.Forms.DockStyle.Fill;
tbxModel.Location = new System.Drawing.Point(83, 292);
tbxModel.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4);
tbxModel.Name = "tbxModel";
tbxModel.Size = new System.Drawing.Size(450, 27);
tbxModel.TabIndex = 2;
tbxModel.TextChanged += tbxModel_TextChanged;
tbxModel.Leave += tbxModel_Leave;
//
// label3
//
label3.AutoSize = true;
label3.Dock = System.Windows.Forms.DockStyle.Fill;
label3.Location = new System.Drawing.Point(3, 325);
label3.Name = "label3";
label3.Size = new System.Drawing.Size(74, 37);
label3.TabIndex = 5;
label3.Text = "Year:";
label3.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
//
// label4
//
label4.AutoSize = true;
label4.Dock = System.Windows.Forms.DockStyle.Fill;
label4.Location = new System.Drawing.Point(3, 362);
label4.Name = "label4";
label4.Size = new System.Drawing.Size(74, 37);
label4.TabIndex = 6;
label4.Text = "Color:";
label4.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
//
// label5
//
label5.AutoSize = true;
label5.Dock = System.Windows.Forms.DockStyle.Fill;
label5.Location = new System.Drawing.Point(3, 399);
label5.Name = "label5";
label5.Size = new System.Drawing.Size(74, 37);
label5.TabIndex = 7;
label5.Text = "Mileage:";
label5.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
//
// label6
//
label6.AutoSize = true;
label6.Dock = System.Windows.Forms.DockStyle.Fill;
label6.Location = new System.Drawing.Point(3, 436);
label6.Name = "label6";
label6.Size = new System.Drawing.Size(74, 37);
label6.TabIndex = 8;
label6.Text = "Price:";
label6.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
//
// flowLayoutPanel1
//
tableLayoutPanel1.SetColumnSpan(flowLayoutPanel1, 2);
flowLayoutPanel1.Controls.Add(btnSave);
flowLayoutPanel1.Controls.Add(btnDelete);
flowLayoutPanel1.Controls.Add(lblID);
flowLayoutPanel1.Dock = System.Windows.Forms.DockStyle.Fill;
flowLayoutPanel1.FlowDirection = System.Windows.Forms.FlowDirection.RightToLeft;
flowLayoutPanel1.Location = new System.Drawing.Point(3, 477);
flowLayoutPanel1.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4);
flowLayoutPanel1.Name = "flowLayoutPanel1";
flowLayoutPanel1.Padding = new System.Windows.Forms.Padding(5);
flowLayoutPanel1.Size = new System.Drawing.Size(530, 82);
flowLayoutPanel1.TabIndex = 9;
//
// btnSave
//
btnSave.Location = new System.Drawing.Point(442, 9);
btnSave.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4);
btnSave.Name = "btnSave";
btnSave.Size = new System.Drawing.Size(75, 29);
btnSave.TabIndex = 7;
btnSave.Text = "Save";
btnSave.UseVisualStyleBackColor = true;
btnSave.Click += btnSave_Click;
//
// btnDelete
//
btnDelete.Location = new System.Drawing.Point(361, 9);
btnDelete.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4);
btnDelete.Name = "btnDelete";
btnDelete.Size = new System.Drawing.Size(75, 29);
btnDelete.TabIndex = 8;
btnDelete.Text = "Delete";
btnDelete.UseVisualStyleBackColor = true;
btnDelete.Click += btnDelete_Click;
//
// lblID
//
lblID.AutoSize = true;
lblID.Location = new System.Drawing.Point(331, 5);
lblID.Name = "lblID";
lblID.Size = new System.Drawing.Size(24, 20);
lblID.TabIndex = 2;
lblID.Text = "ID";
//
// tbxColor
//
tbxColor.Dock = System.Windows.Forms.DockStyle.Fill;
tbxColor.Location = new System.Drawing.Point(83, 366);
tbxColor.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4);
tbxColor.Name = "tbxColor";
tbxColor.Size = new System.Drawing.Size(450, 27);
tbxColor.TabIndex = 4;
tbxColor.TextChanged += tbxColor_TextChanged;
tbxColor.Leave += tbxColor_Leave;
//
// nudMileage
//
nudMileage.Location = new System.Drawing.Point(83, 403);
nudMileage.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4);
nudMileage.Maximum = new decimal(new int[] { 999999, 0, 0, 0 });
nudMileage.Name = "nudMileage";
nudMileage.Size = new System.Drawing.Size(120, 27);
nudMileage.TabIndex = 5;
nudMileage.ThousandsSeparator = true;
nudMileage.ValueChanged += nudMileage_ValueChanged;
//
// nudPrice
//
nudPrice.DecimalPlaces = 2;
nudPrice.Location = new System.Drawing.Point(83, 440);
nudPrice.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4);
nudPrice.Maximum = new decimal(new int[] { 999999, 0, 0, 0 });
nudPrice.Name = "nudPrice";
nudPrice.Size = new System.Drawing.Size(120, 27);
nudPrice.TabIndex = 6;
nudPrice.ThousandsSeparator = true;
nudPrice.ValueChanged += nudPrice_ValueChanged;
//
// tableLayoutPanel2
//
tableLayoutPanel2.ColumnCount = 3;
tableLayoutPanel2.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 33.33333F));
tableLayoutPanel2.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 33.33333F));
tableLayoutPanel2.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 33.33333F));
tableLayoutPanel2.Controls.Add(nudYear, 0, 0);
tableLayoutPanel2.Controls.Add(lblAge, 1, 0);
tableLayoutPanel2.Controls.Add(tbxAge, 2, 0);
tableLayoutPanel2.Dock = System.Windows.Forms.DockStyle.Fill;
tableLayoutPanel2.Location = new System.Drawing.Point(83, 329);
tableLayoutPanel2.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4);
tableLayoutPanel2.Name = "tableLayoutPanel2";
tableLayoutPanel2.RowCount = 1;
tableLayoutPanel2.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 100F));
tableLayoutPanel2.Size = new System.Drawing.Size(450, 29);
tableLayoutPanel2.TabIndex = 10;
//
// nudYear
//
nudYear.Location = new System.Drawing.Point(3, 4);
nudYear.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4);
nudYear.Maximum = new decimal(new int[] { 3000, 0, 0, 0 });
nudYear.Name = "nudYear";
nudYear.Size = new System.Drawing.Size(120, 27);
nudYear.TabIndex = 3;
nudYear.ValueChanged += nudYear_ValueChanged;
//
// lblAge
//
lblAge.AutoSize = true;
lblAge.Dock = System.Windows.Forms.DockStyle.Fill;
lblAge.Location = new System.Drawing.Point(153, 0);
lblAge.Name = "lblAge";
lblAge.RightToLeft = System.Windows.Forms.RightToLeft.No;
lblAge.Size = new System.Drawing.Size(144, 29);
lblAge.TabIndex = 4;
lblAge.Text = "Age";
lblAge.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
//
// tbxAge
//
tbxAge.Dock = System.Windows.Forms.DockStyle.Fill;
tbxAge.Enabled = false;
tbxAge.Location = new System.Drawing.Point(303, 4);
tbxAge.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4);
tbxAge.Name = "tbxAge";
tbxAge.ReadOnly = true;
tbxAge.Size = new System.Drawing.Size(144, 27);
tbxAge.TabIndex = 5;
//
// CarDetailsForm
//
AutoScaleDimensions = new System.Drawing.SizeF(8F, 20F);
AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
ClientSize = new System.Drawing.Size(536, 563);
Controls.Add(tableLayoutPanel1);
FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog;
Margin = new System.Windows.Forms.Padding(3, 4, 3, 4);
MaximizeBox = false;
Name = "CarDetailsForm";
Text = "Details";
tableLayoutPanel1.ResumeLayout(false);
tableLayoutPanel1.PerformLayout();
((System.ComponentModel.ISupportInitialize)pbxCarImage).EndInit();
flowLayoutPanel1.ResumeLayout(false);
flowLayoutPanel1.PerformLayout();
((System.ComponentModel.ISupportInitialize)nudMileage).EndInit();
((System.ComponentModel.ISupportInitialize)nudPrice).EndInit();
tableLayoutPanel2.ResumeLayout(false);
tableLayoutPanel2.PerformLayout();
((System.ComponentModel.ISupportInitialize)nudYear).EndInit();
ResumeLayout(false);
PerformLayout();
}
#endregion
private System.Windows.Forms.TableLayoutPanel tableLayoutPanel1;
private System.Windows.Forms.Label label1;
private System.Windows.Forms.TextBox tbxMake;
private System.Windows.Forms.Label label2;
private System.Windows.Forms.TextBox tbxModel;
private System.Windows.Forms.Label label3;
private System.Windows.Forms.Label label4;
private System.Windows.Forms.Label label5;
private System.Windows.Forms.Label label6;
private System.Windows.Forms.FlowLayoutPanel flowLayoutPanel1;
private System.Windows.Forms.Button btnSave;
private System.Windows.Forms.Button btnDelete;
private System.Windows.Forms.NumericUpDown nudYear;
private System.Windows.Forms.TextBox tbxColor;
private System.Windows.Forms.NumericUpDown nudMileage;
private System.Windows.Forms.NumericUpDown nudPrice;
private System.Windows.Forms.PictureBox pbxCarImage;
private System.Windows.Forms.Label lblID;
private System.Windows.Forms.TableLayoutPanel tableLayoutPanel2;
private System.Windows.Forms.Label lblAge;
private System.Windows.Forms.TextBox tbxAge;
}
}

View File

@@ -0,0 +1,201 @@
using System;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace CarManagerV3
{
public partial class CarDetailsForm : Form
{
public Car car;
public CarDetailsForm(Car car)
{
InitializeComponent();
this.car = car;
tbxMake.Text = car.Make;
tbxModel.Text = car.Model;
nudYear.Value = car.Year;
tbxColor.Text = car.Color;
nudMileage.Value = car.Mileage;
nudPrice.Value = car.Price;
tbxAge.Text = car.AgeString;
pbxCarImage.Image = ImageManager.GetImage(car);
if (car.Id == "0")
{
lblID.Text = "New Car";
}
else
{
lblID.Text = $"ID: {car.Id}";
}
}
/// <summary>
/// Updates a car property safely by executing the update action and reverting it if an exception occurs.
/// </summary>
/// <param name="updateAction">The update action.</param>
/// <param name="revertAction">The action to perform when the update fails.</param>
private void SafeUpdate(Action updateAction, Action revertAction)
{
try
{
updateAction();
}
catch (ArgumentException ex)
{
MessageBox.Show(ex.Message, "Invalid Input", MessageBoxButtons.OK, MessageBoxIcon.Error);
revertAction();
}
}
//private string ValueOrFormer(string newValue, string oldValue)
//{
// return string.IsNullOrWhiteSpace(newValue) ? oldValue : newValue;
//}
private T ValueOrFormer<T>(T newValue, T oldValue)
{
if (newValue is string str)
{
return string.IsNullOrWhiteSpace(str) ? oldValue : newValue;
}
return newValue;
}
private void tbxMake_TextChanged(object sender, EventArgs e)
{
SafeUpdate(
() => car.Make = ValueOrFormer(tbxMake.Text, car.Make),
() => tbxMake.Text = car.Make
);
}
private void tbxModel_TextChanged(object sender, EventArgs e)
{
SafeUpdate(
() => car.Model = ValueOrFormer(tbxModel.Text, car.Model),
() => tbxModel.Text = car.Model
);
}
private void nudYear_ValueChanged(object sender, EventArgs e)
{
SafeUpdate(
() =>
{
car.Year = (int)ValueOrFormer(nudYear.Value, car.Year);
tbxAge.Text = car.AgeString;
},
() => nudYear.Value = car.Year
);
}
private void tbxColor_TextChanged(object sender, EventArgs e)
{
SafeUpdate(
() => car.Color = ValueOrFormer(tbxColor.Text, car.Color),
() => tbxColor.Text = car.Color
);
}
private void nudMileage_ValueChanged(object sender, EventArgs e)
{
SafeUpdate(
() => car.Mileage = (int)nudMileage.Value,
() => nudMileage.Value = car.Mileage
);
}
private void nudPrice_ValueChanged(object sender, EventArgs e)
{
SafeUpdate(
() => car.Price = nudPrice.Value,
() => nudPrice.Value = car.Price
);
}
private async void btnSave_Click(object sender, EventArgs e)
{
// save car to cars.csv and close form
//saving car... popuo
btnSave.Enabled = false;
btnDelete.Enabled = false;
var msgbox = new PleaseWait();
msgbox.Show();
await Task.Run(() =>
{
if(car.Id == "0") {
car = StateManager.CreateCar(car.Make, car.Model, car.Year, car.Color, car.Mileage, car.Price);
}
else {
StateManager.UpdateCar(car);
}
Console.WriteLine("Saved car: " + car.Id);
});
Console.WriteLine("Car saved. " + car.Id);
btnSave.Enabled = true;
btnDelete.Enabled = true;
this.Close();
msgbox.Close();
}
private void btnDelete_Click(object sender, EventArgs e)
{
if(car.Id == "0")
{
//just close form if car is not saved yet
this.Close();
return;
}
//are you sure?
var result = MessageBox.Show("Are you sure you want to delete this car?", "Delete Car", MessageBoxButtons.YesNo, MessageBoxIcon.Warning);
if (result == DialogResult.Yes)
{
Console.WriteLine("Deleting car: " + car.Id);
StateManager.RemoveCar(car);
this.Close();
}
}
protected override bool ProcessCmdKey(ref Message msg, Keys keyData)
{
if (keyData == Keys.Enter)
{
btnSave.PerformClick();
return true; // Indicate that the key has been handled
}
if (keyData == Keys.Escape)
{
this.Close();
return true; // Indicate that the key has been handled
}
if (keyData == Keys.Delete)
{
btnDelete.PerformClick();
return true; // Indicate that the key has been handled
}
return base.ProcessCmdKey(ref msg, keyData);
}
private void tbxMake_Leave(object sender, EventArgs e)
{
tbxMake.Text = ValueOrFormer(tbxMake.Text, car.Make);
}
private void tbxModel_Leave(object sender, EventArgs e)
{
tbxModel.Text = ValueOrFormer(tbxModel.Text, car.Model);
}
private void tbxColor_Leave(object sender, EventArgs e)
{
tbxColor.Text = ValueOrFormer(tbxColor.Text, car.Color);
}
}
}

View File

@@ -1,17 +1,17 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
<!--
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
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>
@@ -26,36 +26,36 @@
<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
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
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
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
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
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
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
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->

View File

@@ -0,0 +1,180 @@
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Drawing.Drawing2D;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace CarManagerV3
{
public class AnimatedProgressBar : UserControl
{
private Timer animationTimer;
private float animationPosition = 0f;
private Color primaryColor = Color.FromArgb(0, 120, 215);
private Color secondaryColor = Color.FromArgb(100, 180, 255);
private Color backgroundColor = Color.FromArgb(240, 240, 240);
public AnimatedProgressBar()
{
this.SetStyle(
ControlStyles.AllPaintingInWmPaint |
ControlStyles.UserPaint |
ControlStyles.OptimizedDoubleBuffer |
ControlStyles.ResizeRedraw,
true);
this.Height = 8;
// Initialize animation timer
animationTimer = new Timer();
animationTimer.Interval = 20; // 50 FPS
animationTimer.Tick += AnimationTimer_Tick;
animationTimer.Start();
}
private void AnimationTimer_Tick(object sender, EventArgs e)
{
animationPosition += 2f;
if (animationPosition > this.Width + 100)
{
animationPosition = -100;
}
this.Invalidate();
}
protected override void OnPaint(PaintEventArgs e)
{
base.OnPaint(e);
Graphics g = e.Graphics;
g.SmoothingMode = SmoothingMode.AntiAlias;
g.PixelOffsetMode = PixelOffsetMode.HighQuality;
// Draw background with rounded corners
using (GraphicsPath path = GetRoundedRect(ClientRectangle, 4))
{
using (SolidBrush bgBrush = new SolidBrush(backgroundColor))
{
g.FillPath(bgBrush, path);
}
}
// Create animated gradient bar
float barWidth = 100f;
RectangleF barRect = new RectangleF(animationPosition, 0, barWidth, this.Height);
if (barRect.Right > 0 && barRect.Left < this.Width)
{
using (GraphicsPath barPath = GetRoundedRect(barRect, 4))
{
// Create gradient brush
using (LinearGradientBrush gradientBrush = new LinearGradientBrush(
barRect,
Color.Transparent,
Color.Transparent,
LinearGradientMode.Horizontal))
{
ColorBlend colorBlend = new ColorBlend();
colorBlend.Colors = new Color[] {
Color.FromArgb(0, primaryColor),
primaryColor,
secondaryColor,
primaryColor,
Color.FromArgb(0, primaryColor)
};
colorBlend.Positions = new float[] { 0f, 0.2f, 0.5f, 0.8f, 1f };
gradientBrush.InterpolationColors = colorBlend;
// Clip to control bounds
Region oldClip = g.Clip;
using (GraphicsPath clipPath = GetRoundedRect(ClientRectangle, 4))
{
g.SetClip(clipPath);
g.FillPath(gradientBrush, barPath);
g.Clip = oldClip;
}
}
}
}
// Draw subtle border
using (GraphicsPath borderPath = GetRoundedRect(ClientRectangle, 4))
{
using (Pen borderPen = new Pen(Color.FromArgb(220, 220, 220), 1))
{
g.DrawPath(borderPen, borderPath);
}
}
}
private GraphicsPath GetRoundedRect(RectangleF rect, float radius)
{
GraphicsPath path = new GraphicsPath();
float diameter = radius * 2;
path.AddArc(rect.X, rect.Y, diameter, diameter, 180, 90);
path.AddArc(rect.Right - diameter, rect.Y, diameter, diameter, 270, 90);
path.AddArc(rect.Right - diameter, rect.Bottom - diameter, diameter, diameter, 0, 90);
path.AddArc(rect.X, rect.Bottom - diameter, diameter, diameter, 90, 90);
path.CloseFigure();
return path;
}
public void StartAnimation()
{
animationTimer.Start();
}
public void StopAnimation()
{
animationTimer.Stop();
}
//protected override void Dispose(bool disposing)
//{
// if (disposing)
// {
// animationTimer?.Stop();
// animationTimer?.Dispose();
// }
// base.Dispose(disposing);
//}
// Properties for customization
public Color PrimaryColor
{
get => primaryColor;
set
{
primaryColor = value;
this.Invalidate();
}
}
public Color SecondaryColor
{
get => secondaryColor;
set
{
secondaryColor = value;
this.Invalidate();
}
}
public Color ProgressBackColor
{
get => backgroundColor;
set
{
backgroundColor = value;
this.Invalidate();
}
}
}
}

View File

@@ -0,0 +1,118 @@
namespace CarManagerV3
{
partial class CarCard
{
/// <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 Component Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(CarCard));
tableLayoutPanel1 = new System.Windows.Forms.TableLayoutPanel();
lblCarDetails = new System.Windows.Forms.Label();
lblCarName = new System.Windows.Forms.Label();
pbxCar = new System.Windows.Forms.PictureBox();
tableLayoutPanel1.SuspendLayout();
((System.ComponentModel.ISupportInitialize)pbxCar).BeginInit();
SuspendLayout();
//
// tableLayoutPanel1
//
tableLayoutPanel1.AutoSize = true;
tableLayoutPanel1.ColumnCount = 1;
tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 100F));
tableLayoutPanel1.Controls.Add(lblCarDetails, 0, 2);
tableLayoutPanel1.Controls.Add(lblCarName, 0, 1);
tableLayoutPanel1.Controls.Add(pbxCar, 0, 0);
tableLayoutPanel1.Dock = System.Windows.Forms.DockStyle.Fill;
tableLayoutPanel1.Location = new System.Drawing.Point(0, 0);
tableLayoutPanel1.MaximumSize = new System.Drawing.Size(184, 0);
tableLayoutPanel1.Name = "tableLayoutPanel1";
tableLayoutPanel1.RowCount = 3;
tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 122F));
tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle());
tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle());
tableLayoutPanel1.Size = new System.Drawing.Size(184, 188);
tableLayoutPanel1.TabIndex = 0;
//
// lblCarDetails
//
lblCarDetails.AutoSize = true;
lblCarDetails.Location = new System.Drawing.Point(3, 166);
lblCarDetails.Name = "lblCarDetails";
lblCarDetails.Size = new System.Drawing.Size(92, 15);
lblCarDetails.TabIndex = 5;
lblCarDetails.Text = "2009 - 13.000km";
//
// lblCarName
//
lblCarName.AutoSize = true;
lblCarName.Dock = System.Windows.Forms.DockStyle.Fill;
lblCarName.Font = new System.Drawing.Font("Arial", 13.8F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, 0);
lblCarName.Location = new System.Drawing.Point(3, 122);
lblCarName.Name = "lblCarName";
lblCarName.Size = new System.Drawing.Size(178, 44);
lblCarName.TabIndex = 4;
lblCarName.Text = "Skoda Fabia fdsdfsdfsdfsdf";
lblCarName.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
//
// pbxCar
//
pbxCar.Dock = System.Windows.Forms.DockStyle.Fill;
pbxCar.ErrorImage = (System.Drawing.Image)resources.GetObject("pbxCar.ErrorImage");
pbxCar.Image = (System.Drawing.Image)resources.GetObject("pbxCar.Image");
pbxCar.ImageLocation = "";
pbxCar.InitialImage = (System.Drawing.Image)resources.GetObject("pbxCar.InitialImage");
pbxCar.Location = new System.Drawing.Point(3, 3);
pbxCar.Name = "pbxCar";
pbxCar.Size = new System.Drawing.Size(178, 116);
pbxCar.SizeMode = System.Windows.Forms.PictureBoxSizeMode.Zoom;
pbxCar.TabIndex = 3;
pbxCar.TabStop = false;
//
// CarCard
//
AutoScaleDimensions = new System.Drawing.SizeF(7F, 15F);
AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
AutoSize = true;
BackColor = System.Drawing.SystemColors.Control;
Controls.Add(tableLayoutPanel1);
Name = "CarCard";
Size = new System.Drawing.Size(184, 188);
tableLayoutPanel1.ResumeLayout(false);
tableLayoutPanel1.PerformLayout();
((System.ComponentModel.ISupportInitialize)pbxCar).EndInit();
ResumeLayout(false);
PerformLayout();
}
#endregion
private System.Windows.Forms.TableLayoutPanel tableLayoutPanel1;
private System.Windows.Forms.Label lblCarDetails;
private System.Windows.Forms.Label lblCarName;
private System.Windows.Forms.PictureBox pbxCar;
}
}

View File

@@ -0,0 +1,102 @@
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace CarManagerV3
{
public partial class CarCard : UserControl
{
public Car Car;
public string CarName
{
get { return lblCarName.Text; }
set { lblCarName.Text = value; }
}
public string CarDetails
{
get { return lblCarDetails.Text; }
set { lblCarDetails.Text = value; }
}
public Image CarImage
{
get { return pbxCar.Image; }
set { pbxCar.Image = value; }
}
public CarCard()
{
InitializeComponent();
this.Cursor = Cursors.Hand;
foreach (Control ctrl in this.Controls)
{
ctrl.MouseClick += ForwardClick;
foreach (Control inner in ctrl.Controls)
{
inner.MouseClick += ForwardClick;
}
}
this.MouseClick += (s, e) => this.OnCardClicked(s, e);
}
public async void LoadImage()
{
this.CarImage = null; // Clear current image
this.CarImage = pbxCar.InitialImage; // Set to loading image
await Task.Run(() =>
{
Image img = ImageManager.GetImage(this.Car);
if (img != null)
{
this.CarImage = img;
}
else
{
this.CarImage = pbxCar.ErrorImage; // Set to error image if loading fails
}
});
}
private void ForwardClick(object sender, MouseEventArgs e)
{
// Raise your CardClicked event no matter what got clicked
if (e.Button == MouseButtons.Right) return;
Console.WriteLine($"Forwarding click from {sender.GetType().Name}");
CardClicked?.Invoke(this, EventArgs.Empty);
}
public event EventHandler CardClicked;
private void OnCardClicked(object sender, MouseEventArgs e)
{
Console.WriteLine($"Card clicked at {e.Location} with button {e.Button}");
if (e.Button == MouseButtons.Right) return;
Console.WriteLine($"Card clicked: {this.CarName}");
if (this.CardClicked != null)
{
this.CardClicked(this, EventArgs.Empty);
}
}
public void ClearCardClickedHandlers()
{
if (this.CardClicked != null)
{
foreach (Delegate d in this.CardClicked.GetInvocationList())
{
this.CardClicked -= (EventHandler)d;
}
}
}
}
}

File diff suppressed because it is too large Load Diff

379
CarManagerV3/Forms/MainForm.Designer.cs generated Normal file
View File

@@ -0,0 +1,379 @@
namespace CarManagerV3
{
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()
{
components = new System.ComponentModel.Container();
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(MainForm));
tableLayoutPanel1 = new System.Windows.Forms.TableLayoutPanel();
flpCars = new System.Windows.Forms.FlowLayoutPanel();
tlpControls = new System.Windows.Forms.TableLayoutPanel();
btnNewCar = new System.Windows.Forms.Button();
tlpSearch = new System.Windows.Forms.TableLayoutPanel();
tbxSearch = new System.Windows.Forms.TextBox();
pbxSearch = new System.Windows.Forms.PictureBox();
menuStrip1 = new System.Windows.Forms.MenuStrip();
fileToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
openToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
saveToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
saveAsToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
recentFilesToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
revealInFileExplorerToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
exitToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
editToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
addCarToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
importToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
clearSearchToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
settingsToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
toolsToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
openWelcomeScreenToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
clearRecentFilesToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
imageList1 = new System.Windows.Forms.ImageList(components);
aboutToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
checkForUpdatesToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
gitRepositoryToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
tableLayoutPanel1.SuspendLayout();
tlpControls.SuspendLayout();
tlpSearch.SuspendLayout();
((System.ComponentModel.ISupportInitialize)pbxSearch).BeginInit();
menuStrip1.SuspendLayout();
SuspendLayout();
//
// tableLayoutPanel1
//
tableLayoutPanel1.ColumnCount = 1;
tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 100F));
tableLayoutPanel1.Controls.Add(flpCars, 0, 2);
tableLayoutPanel1.Controls.Add(tlpControls, 0, 1);
tableLayoutPanel1.Controls.Add(menuStrip1, 0, 0);
tableLayoutPanel1.Dock = System.Windows.Forms.DockStyle.Fill;
tableLayoutPanel1.Location = new System.Drawing.Point(0, 0);
tableLayoutPanel1.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4);
tableLayoutPanel1.Name = "tableLayoutPanel1";
tableLayoutPanel1.RowCount = 3;
tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle());
tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 50F));
tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle());
tableLayoutPanel1.Size = new System.Drawing.Size(902, 653);
tableLayoutPanel1.TabIndex = 0;
tableLayoutPanel1.Paint += tableLayoutPanel1_Paint;
//
// flpCars
//
flpCars.AutoScroll = true;
flpCars.AutoScrollMargin = new System.Drawing.Size(0, 200);
flpCars.Dock = System.Windows.Forms.DockStyle.Fill;
flpCars.Location = new System.Drawing.Point(3, 82);
flpCars.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4);
flpCars.Name = "flpCars";
flpCars.Size = new System.Drawing.Size(896, 567);
flpCars.TabIndex = 1;
//
// tlpControls
//
tlpControls.ColumnCount = 2;
tlpControls.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 100F));
tlpControls.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 80F));
tlpControls.Controls.Add(btnNewCar, 1, 0);
tlpControls.Controls.Add(tlpSearch, 0, 0);
tlpControls.Dock = System.Windows.Forms.DockStyle.Fill;
tlpControls.Location = new System.Drawing.Point(0, 28);
tlpControls.Margin = new System.Windows.Forms.Padding(0);
tlpControls.Name = "tlpControls";
tlpControls.RowCount = 1;
tlpControls.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 100F));
tlpControls.Size = new System.Drawing.Size(902, 50);
tlpControls.TabIndex = 2;
//
// btnNewCar
//
btnNewCar.BackColor = System.Drawing.SystemColors.MenuHighlight;
btnNewCar.BackgroundImageLayout = System.Windows.Forms.ImageLayout.None;
btnNewCar.Cursor = System.Windows.Forms.Cursors.Hand;
btnNewCar.Dock = System.Windows.Forms.DockStyle.Fill;
btnNewCar.FlatAppearance.BorderSize = 0;
btnNewCar.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
btnNewCar.Image = (System.Drawing.Image)resources.GetObject("btnNewCar.Image");
btnNewCar.Location = new System.Drawing.Point(822, 0);
btnNewCar.Margin = new System.Windows.Forms.Padding(0);
btnNewCar.Name = "btnNewCar";
btnNewCar.Size = new System.Drawing.Size(80, 50);
btnNewCar.TabIndex = 4;
btnNewCar.UseVisualStyleBackColor = false;
btnNewCar.Click += btnNewCar_Click;
//
// tlpSearch
//
tlpSearch.BackColor = System.Drawing.SystemColors.Window;
tlpSearch.ColumnCount = 2;
tlpSearch.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 50F));
tlpSearch.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 100F));
tlpSearch.Controls.Add(tbxSearch, 1, 0);
tlpSearch.Controls.Add(pbxSearch, 0, 0);
tlpSearch.Dock = System.Windows.Forms.DockStyle.Fill;
tlpSearch.Location = new System.Drawing.Point(0, 0);
tlpSearch.Margin = new System.Windows.Forms.Padding(0);
tlpSearch.Name = "tlpSearch";
tlpSearch.RowCount = 1;
tlpSearch.RowStyles.Add(new System.Windows.Forms.RowStyle());
tlpSearch.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 20F));
tlpSearch.Size = new System.Drawing.Size(822, 50);
tlpSearch.TabIndex = 5;
//
// tbxSearch
//
tbxSearch.Anchor = System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right;
tbxSearch.BackColor = System.Drawing.SystemColors.Window;
tbxSearch.BorderStyle = System.Windows.Forms.BorderStyle.None;
tbxSearch.Font = new System.Drawing.Font("Segoe UI", 9F);
tbxSearch.Location = new System.Drawing.Point(53, 15);
tbxSearch.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4);
tbxSearch.Name = "tbxSearch";
tbxSearch.Size = new System.Drawing.Size(766, 20);
tbxSearch.TabIndex = 3;
tbxSearch.TextChanged += tbxSearch_TextChanged;
//
// pbxSearch
//
pbxSearch.Dock = System.Windows.Forms.DockStyle.Fill;
pbxSearch.Image = (System.Drawing.Image)resources.GetObject("pbxSearch.Image");
pbxSearch.Location = new System.Drawing.Point(0, 0);
pbxSearch.Margin = new System.Windows.Forms.Padding(0);
pbxSearch.Name = "pbxSearch";
pbxSearch.Size = new System.Drawing.Size(50, 50);
pbxSearch.SizeMode = System.Windows.Forms.PictureBoxSizeMode.CenterImage;
pbxSearch.TabIndex = 0;
pbxSearch.TabStop = false;
//
// menuStrip1
//
menuStrip1.BackColor = System.Drawing.SystemColors.ButtonFace;
menuStrip1.ImageScalingSize = new System.Drawing.Size(20, 20);
menuStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { fileToolStripMenuItem, editToolStripMenuItem, toolsToolStripMenuItem, aboutToolStripMenuItem });
menuStrip1.Location = new System.Drawing.Point(0, 0);
menuStrip1.Name = "menuStrip1";
menuStrip1.Size = new System.Drawing.Size(902, 28);
menuStrip1.TabIndex = 3;
menuStrip1.Text = "menuStrip1";
//
// fileToolStripMenuItem
//
fileToolStripMenuItem.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Text;
fileToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { openToolStripMenuItem, saveToolStripMenuItem, saveAsToolStripMenuItem, recentFilesToolStripMenuItem, revealInFileExplorerToolStripMenuItem, exitToolStripMenuItem });
fileToolStripMenuItem.Name = "fileToolStripMenuItem";
fileToolStripMenuItem.Size = new System.Drawing.Size(46, 24);
fileToolStripMenuItem.Text = "File";
//
// openToolStripMenuItem
//
openToolStripMenuItem.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Text;
openToolStripMenuItem.Name = "openToolStripMenuItem";
openToolStripMenuItem.Size = new System.Drawing.Size(238, 26);
openToolStripMenuItem.Text = "Open";
openToolStripMenuItem.Click += openToolStripMenuItem_Click;
//
// saveToolStripMenuItem
//
saveToolStripMenuItem.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Text;
saveToolStripMenuItem.Name = "saveToolStripMenuItem";
saveToolStripMenuItem.Size = new System.Drawing.Size(238, 26);
saveToolStripMenuItem.Text = "Save";
saveToolStripMenuItem.Click += saveToolStripMenuItem_Click;
//
// saveAsToolStripMenuItem
//
saveAsToolStripMenuItem.Name = "saveAsToolStripMenuItem";
saveAsToolStripMenuItem.Size = new System.Drawing.Size(238, 26);
saveAsToolStripMenuItem.Text = "Save as";
saveAsToolStripMenuItem.Click += saveAsToolStripMenuItem_Click;
//
// recentFilesToolStripMenuItem
//
recentFilesToolStripMenuItem.Name = "recentFilesToolStripMenuItem";
recentFilesToolStripMenuItem.Size = new System.Drawing.Size(238, 26);
recentFilesToolStripMenuItem.Text = "Recent Files";
recentFilesToolStripMenuItem.Click += recentFilesToolStripMenuItem_Click;
//
// revealInFileExplorerToolStripMenuItem
//
revealInFileExplorerToolStripMenuItem.Name = "revealInFileExplorerToolStripMenuItem";
revealInFileExplorerToolStripMenuItem.Size = new System.Drawing.Size(238, 26);
revealInFileExplorerToolStripMenuItem.Text = "Reveal in File Explorer";
revealInFileExplorerToolStripMenuItem.Click += revealInFileExplorerToolStripMenuItem_Click;
//
// exitToolStripMenuItem
//
exitToolStripMenuItem.Name = "exitToolStripMenuItem";
exitToolStripMenuItem.Size = new System.Drawing.Size(238, 26);
exitToolStripMenuItem.Text = "Save and Exit";
exitToolStripMenuItem.Click += exitToolStripMenuItem_Click;
//
// editToolStripMenuItem
//
editToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { addCarToolStripMenuItem, importToolStripMenuItem, clearSearchToolStripMenuItem, settingsToolStripMenuItem });
editToolStripMenuItem.Name = "editToolStripMenuItem";
editToolStripMenuItem.Size = new System.Drawing.Size(49, 24);
editToolStripMenuItem.Text = "Edit";
//
// addCarToolStripMenuItem
//
addCarToolStripMenuItem.Name = "addCarToolStripMenuItem";
addCarToolStripMenuItem.Size = new System.Drawing.Size(174, 26);
addCarToolStripMenuItem.Text = "Add Car";
addCarToolStripMenuItem.Click += addCarToolStripMenuItem_Click;
//
// importToolStripMenuItem
//
importToolStripMenuItem.Name = "importToolStripMenuItem";
importToolStripMenuItem.Size = new System.Drawing.Size(174, 26);
importToolStripMenuItem.Text = "Import";
importToolStripMenuItem.Click += importToolStripMenuItem_Click;
//
// clearSearchToolStripMenuItem
//
clearSearchToolStripMenuItem.Name = "clearSearchToolStripMenuItem";
clearSearchToolStripMenuItem.Size = new System.Drawing.Size(174, 26);
clearSearchToolStripMenuItem.Text = "Clear Search";
clearSearchToolStripMenuItem.Click += clearSearchToolStripMenuItem_Click;
//
// settingsToolStripMenuItem
//
settingsToolStripMenuItem.Name = "settingsToolStripMenuItem";
settingsToolStripMenuItem.Size = new System.Drawing.Size(174, 26);
settingsToolStripMenuItem.Text = "Settings";
settingsToolStripMenuItem.Click += settingsToolStripMenuItem_Click;
//
// toolsToolStripMenuItem
//
toolsToolStripMenuItem.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Text;
toolsToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { openWelcomeScreenToolStripMenuItem, clearRecentFilesToolStripMenuItem });
toolsToolStripMenuItem.Name = "toolsToolStripMenuItem";
toolsToolStripMenuItem.Size = new System.Drawing.Size(58, 24);
toolsToolStripMenuItem.Text = "Tools";
//
// openWelcomeScreenToolStripMenuItem
//
openWelcomeScreenToolStripMenuItem.BackgroundImageLayout = System.Windows.Forms.ImageLayout.None;
openWelcomeScreenToolStripMenuItem.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Text;
openWelcomeScreenToolStripMenuItem.Name = "openWelcomeScreenToolStripMenuItem";
openWelcomeScreenToolStripMenuItem.Size = new System.Drawing.Size(238, 26);
openWelcomeScreenToolStripMenuItem.Text = "Open welcome screen";
openWelcomeScreenToolStripMenuItem.Click += openWelcomeScreenToolStripMenuItem_Click;
//
// clearRecentFilesToolStripMenuItem
//
clearRecentFilesToolStripMenuItem.Name = "clearRecentFilesToolStripMenuItem";
clearRecentFilesToolStripMenuItem.Size = new System.Drawing.Size(238, 26);
clearRecentFilesToolStripMenuItem.Text = "Clear recent files";
clearRecentFilesToolStripMenuItem.Click += clearRecentFilesToolStripMenuItem_Click;
//
// imageList1
//
imageList1.ColorDepth = System.Windows.Forms.ColorDepth.Depth32Bit;
imageList1.ImageStream = (System.Windows.Forms.ImageListStreamer)resources.GetObject("imageList1.ImageStream");
imageList1.TransparentColor = System.Drawing.Color.Transparent;
imageList1.Images.SetKeyName(0, "Icon_Search.png");
imageList1.Images.SetKeyName(1, "Icon_Add.png");
//
// aboutToolStripMenuItem
//
aboutToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { checkForUpdatesToolStripMenuItem, gitRepositoryToolStripMenuItem });
aboutToolStripMenuItem.Name = "aboutToolStripMenuItem";
aboutToolStripMenuItem.Size = new System.Drawing.Size(64, 24);
aboutToolStripMenuItem.Text = "About";
//
// checkForUpdatesToolStripMenuItem
//
checkForUpdatesToolStripMenuItem.Name = "checkForUpdatesToolStripMenuItem";
checkForUpdatesToolStripMenuItem.Size = new System.Drawing.Size(224, 26);
checkForUpdatesToolStripMenuItem.Text = "Check for Updates";
checkForUpdatesToolStripMenuItem.Click += checkForUpdatesToolStripMenuItem_Click;
//
// gitRepositoryToolStripMenuItem
//
gitRepositoryToolStripMenuItem.Name = "gitRepositoryToolStripMenuItem";
gitRepositoryToolStripMenuItem.Size = new System.Drawing.Size(224, 26);
gitRepositoryToolStripMenuItem.Text = "Git Repository";
gitRepositoryToolStripMenuItem.Click += gitRepositoryToolStripMenuItem_Click;
//
// MainForm
//
AutoScaleDimensions = new System.Drawing.SizeF(8F, 20F);
AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
ClientSize = new System.Drawing.Size(902, 653);
Controls.Add(tableLayoutPanel1);
Icon = (System.Drawing.Icon)resources.GetObject("$this.Icon");
MainMenuStrip = menuStrip1;
Margin = new System.Windows.Forms.Padding(3, 4, 3, 4);
MinimumSize = new System.Drawing.Size(920, 700);
Name = "MainForm";
StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
Text = "Carmanager 3";
tableLayoutPanel1.ResumeLayout(false);
tableLayoutPanel1.PerformLayout();
tlpControls.ResumeLayout(false);
tlpSearch.ResumeLayout(false);
tlpSearch.PerformLayout();
((System.ComponentModel.ISupportInitialize)pbxSearch).EndInit();
menuStrip1.ResumeLayout(false);
menuStrip1.PerformLayout();
ResumeLayout(false);
}
#endregion
private System.Windows.Forms.TableLayoutPanel tableLayoutPanel1;
private System.Windows.Forms.FlowLayoutPanel flpCars;
private System.Windows.Forms.TableLayoutPanel tlpControls;
private System.Windows.Forms.TextBox tbxSearch;
private System.Windows.Forms.Button btnNewCar;
private System.Windows.Forms.MenuStrip menuStrip1;
private System.Windows.Forms.ToolStripMenuItem fileToolStripMenuItem;
private System.Windows.Forms.ToolStripMenuItem openToolStripMenuItem;
private System.Windows.Forms.ToolStripMenuItem saveToolStripMenuItem;
private System.Windows.Forms.ToolStripMenuItem saveAsToolStripMenuItem;
private System.Windows.Forms.ToolStripMenuItem recentFilesToolStripMenuItem;
private System.Windows.Forms.ToolStripMenuItem revealInFileExplorerToolStripMenuItem;
private System.Windows.Forms.TableLayoutPanel tlpSearch;
private System.Windows.Forms.PictureBox pbxSearch;
private System.Windows.Forms.ImageList imageList1;
private System.Windows.Forms.ToolStripMenuItem toolsToolStripMenuItem;
private System.Windows.Forms.ToolStripMenuItem openWelcomeScreenToolStripMenuItem;
private System.Windows.Forms.ToolStripMenuItem editToolStripMenuItem;
private System.Windows.Forms.ToolStripMenuItem addCarToolStripMenuItem;
private System.Windows.Forms.ToolStripMenuItem clearSearchToolStripMenuItem;
private System.Windows.Forms.ToolStripMenuItem importToolStripMenuItem;
private System.Windows.Forms.ToolStripMenuItem exitToolStripMenuItem;
private System.Windows.Forms.ToolStripMenuItem clearRecentFilesToolStripMenuItem;
private System.Windows.Forms.ToolStripMenuItem settingsToolStripMenuItem;
private System.Windows.Forms.ToolStripMenuItem aboutToolStripMenuItem;
private System.Windows.Forms.ToolStripMenuItem checkForUpdatesToolStripMenuItem;
private System.Windows.Forms.ToolStripMenuItem gitRepositoryToolStripMenuItem;
}
}

View File

@@ -0,0 +1,598 @@
using System;
using System.Collections.Generic;
using System.Data;
using System.Linq;
using System.Threading.Tasks;
using System.Windows.Forms;
using CarManagerV3.Forms;
using CarManagerV3.Manager;
namespace CarManagerV3
{
public partial class MainForm : Form
{
List<Car> cars = new List<Car>();
string filepath = "";
public static MainForm GetMainForm()
{
// This is a singleton pattern to ensure only one instance of MainForm exists.
// If you need to access the MainForm instance, you can use this method.
return Application.OpenForms.OfType<MainForm>().FirstOrDefault() ?? new MainForm();
}
public MainForm(string pathToOpen = "")
{
InitializeComponent();
if (Properties.Settings.Default.DataLocation == "")
{
Properties.Settings.Default.DataLocation = Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData) + "\\CarManagerV3";
Properties.Settings.Default.Save();
}
// Open the most recent file if it exists. Otherwise, use default filepath.
List<string> recentFiles = SafeManager.GetRecentPaths();
if (!String.IsNullOrEmpty(pathToOpen))
{
filepath = pathToOpen;
SafeManager.AddRecentPath(filepath);
}
else if (recentFiles.Count > 0)
{
filepath = recentFiles[0];
}
else
{
openWelcomeScreen();
}
SafeManager.InitializeFile(filepath);
StateManager.setFilePath(filepath);
try
{
List<Car> _cars = SafeManager.ReadCars(filepath);
cars = _cars;
refreshCars(_cars, false);
}
catch (LegacyException)
{
Console.Error.WriteLine("Legacy file format detected. Prompting user to select a new file.");
showOpenFileDialog();
}
refreshRecents();
try
{
if (Updater.IsUpdateAvailable(Properties.Settings.Default.AllowPrerelease))
{
UpdatePromptForm updatePrompt = new UpdatePromptForm(Updater.GetCurrentVersion(), Updater.GetLatestVersion());
updatePrompt.ShowDialog();
}
}
catch (Exception ex)
{
Console.Error.WriteLine("Error checking for updates: " + ex.Message);
}
}
public void openWelcomeScreen()
{
Welcome welcome = new Welcome();
// disable main form while welcome screen is open
this.Enabled = false;
welcome.OpenFileCallback = () =>
{
showOpenFileDialog();
if (filepath != "")
{
welcome.Close();
this.Enabled = true;
}
};
welcome.NewFileCallback = () =>
{
showSaveAsDialog();
if (filepath != "")
{
welcome.Close();
this.Enabled = true;
}
};
welcome.ShowDialog();
}
public void showOpenFileDialog()
{
openToolStripMenuItem.PerformClick();
}
public void showSaveAsDialog()
{
saveAsToolStripMenuItem.PerformClick();
}
/// <summary>
/// Refreshes the cars displayed in the flow layout panel.
/// </summary>
/// <param name="_cars">The cars.</param>
/// <param name="updateGlobal">if set to <c>true</c> [update global].</param>
private async void refreshCars(List<Car> _cars, bool updateGlobal = true, bool force = false)
{
this.Text = "Car Manager - " + System.IO.Path.GetFileName(filepath);
// Sort by Car.Order. If equal, sort by ID
_cars = _cars.Count > 0 ? _cars.OrderBy(c => c.Order).ToList() : _cars;
if (updateGlobal)
{
cars = _cars;
}
foreach (Car car in _cars)
{
// not in list? add it
bool isNew = flpCars.Controls.OfType<CarCard>().All(c => c.Car.Id != car.Id);
// existing but changed? update it
CarCard card = new CarCard();
if (!isNew)
{
CarCard existing = flpCars.Controls.OfType<CarCard>().First(c => c.Car.Id == car.Id);
Car existingCar = existing.Car;
if (existing == null)
{
Console.Error.WriteLine($"[L] Error: Existing car card not found for car ID: {car.Id}");
continue;
}
// compare details
// Console.WriteLine($"[L] Checking car: {car.Id} | Car Color: {car.Color} | Ex Color: {existingCar.Color}");
if (existingCar.IsChanged(car) || force)
{
Console.WriteLine($"[L] Updating car: {car.Id}");
// changes
card = existing;
if (force) card.LoadImage(); // reload image if forced refresh
}
else
{
// no changes
// Console.WriteLine($"[L] No changes for car: {car.Id}");
flpCars.Controls.SetChildIndex(existing, _cars.IndexOf(car));
continue;
}
}
card.CarName = $"{car.Make} {car.Model}";
card.CarDetails = $"({car.Order}) {car.Year}, {car.Mileage} km, ${car.Price}";
card.Car = car.Clone();
card.LoadImage();
// clear existing event handlers to prevent multiple subscriptions
card.ClearCardClickedHandlers();
card.CardClicked += (s, e) =>
{
Console.WriteLine($"Card clicked: {car.Id}");
CarDetailsForm detailsForm = new CarDetailsForm(car);
detailsForm.FormClosed += async (s2, e2) =>
{
Console.WriteLine("Car details form closed.");
// refresh cars
Console.WriteLine("Refreshing cars...");
List<Car> __cars = await Task.Run(() => SafeManager.ReadCars(filepath));
if (tbxSearch.Text.Length > 0)
{
Console.WriteLine("Search box has text, applying search filter.");
cars = __cars;
searchList(tbxSearch.Text);
return;
}
refreshCars(__cars);
};
detailsForm.ShowDialog();
};
ContextMenuStrip cms = new ContextMenuStrip();
cms.Items.Add("Move up", null, (s, e) =>
{
int order = car.Order;
// find car with order just less than this one
Car other = cars.Where(c => c.Order < order).OrderByDescending(c => c.Order).FirstOrDefault();
if (other != null)
{
Console.WriteLine($"Swapping order of {car.ToString()} ({car.Order}) and {other.ToString()} ({other.Order})");
int temp = car.Order;
car.Order = other.Order;
other.Order = temp;
cars = StateManager.normalizeOrders(cars);
SafeManager.SaveCars(filepath, cars);
refreshCars(cars);
}
});
cms.Items.Add("Move down", null, (s, e) =>
{
int order = car.Order;
// find car with order just greater than this one
Car other = cars.Where(c => c.Order > order).OrderBy(c => c.Order).FirstOrDefault();
if (other != null)
{
Console.WriteLine($"Swapping order of {car.ToString()} ({car.Order}) and {other.ToString()} ({other.Order})");
int temp = car.Order;
car.Order = other.Order;
other.Order = temp;
cars = StateManager.normalizeOrders(cars);
SafeManager.SaveCars(filepath, cars);
refreshCars(cars);
}
});
card.ContextMenuStrip = cms;
if (isNew)
{
flpCars.Controls.Add(card);
}
flpCars.Controls.SetChildIndex(card, _cars.IndexOf(car));
}
// Remove cards that are no longer in _cars
var carIds = _cars.Select(c => c.Id).ToList();
var cardsToRemove = flpCars.Controls.OfType<CarCard>().Where(c => !carIds.Contains(c.Car.Id)).ToList();
foreach (var card in cardsToRemove)
{
flpCars.Controls.Remove(card);
}
flpCars.Refresh();
flpCars.Invalidate();
flpCars.Update();
}
private void btnNewCar_Click(object sender, EventArgs e)
{
Car foocar = new Car("0", "New", "Car", 2020, "White", 0, 20000);
CarDetailsForm detailsForm = new CarDetailsForm(foocar);
detailsForm.FormClosed += (s2, e2) =>
{
// refresh cars
Console.WriteLine("Refreshing cars...");
List<Car> cars_ = SafeManager.ReadCars(filepath);
refreshCars(cars_, false);
};
detailsForm.ShowDialog();
}
/// <summary>
/// Filters the cars by a search query.
/// </summary>
/// <param name="query">The search query.</param>
/// <returns>
/// A list of <see cref="Car"/> objects that match the query.
/// </returns>
List<Car> filterCarsByQuery(string query)
{
List<Car> results = new List<Car>();
foreach (Car car in cars)
{
if (car.Make.ToLower().Contains(query.ToLower()) || car.Model.ToLower().Contains(query.ToLower()) || car.Year.ToString().Contains(query) || car.Mileage.ToString().Contains(query) || car.Price.ToString().Contains(query))
{
results.Add(car);
}
}
return results;
}
/// <summary>
/// Searches the list of cars by a query and refreshes the display.
/// </summary>
/// <param name="query">The query.</param>
void searchList(string query)
{
List<Car> results = filterCarsByQuery(query);
refreshCars(results, false);
}
private async void tbxSearch_TextChanged(object sender, EventArgs e)
{
string query = tbxSearch.Text;
await Task.Delay(100); // debounce
if (query != tbxSearch.Text) return; // text changed during delay
//flpCars.Controls.Clear();
if (string.IsNullOrWhiteSpace(query))
{
refreshCars(cars);
}
else
{
searchList(query);
}
}
private void tableLayoutPanel1_Paint(object sender, PaintEventArgs e)
{
}
private void openToolStripMenuItem_Click(object sender, EventArgs e)
{
OpenFileDialog dlgOpen = new OpenFileDialog();
dlgOpen.Filter = "Compatible Files (*.csv;*.cars)|*.csv;*.cars|CSV Files (*.csv)|*.csv|Car Manager CSV (*.cars)|*.cars|All Files (*.*)|*.*";
dlgOpen.Title = "Open Car Data File";
// Default to users documents
dlgOpen.InitialDirectory = SafeManager.getRecentFolder();
DialogResult result = dlgOpen.ShowDialog();
if (result == DialogResult.OK)
{
try
{
List<Car> importedCars = SafeManager.ReadCars(dlgOpen.FileName);
if (importedCars.Count == 0)
{
throw new Exception("File doesn't contain valid Cars.");
}
filepath = dlgOpen.FileName;
cars = importedCars;
StateManager.setFilePath(filepath);
// Refresh display
refreshCars(cars);
MessageBox.Show("File loaded successfully.", "Load File", MessageBoxButtons.OK, MessageBoxIcon.Information);
SafeManager.AddRecentPath(filepath);
refreshRecents();
}
catch (LegacyException)
{
showOpenFileDialog();
}
catch (Exception ex)
{
MessageBox.Show("Error loading file: " + ex.Message);
}
}
}
private void saveToolStripMenuItem_Click(object sender, EventArgs e)
{
refreshCars(cars);
SafeManager.SaveCars(filepath, cars);
MessageBox.Show("File saved successfully.", "Save File", MessageBoxButtons.OK, MessageBoxIcon.Information);
}
private void saveAsToolStripMenuItem_Click(object sender, EventArgs e)
{
SaveFileDialog dlgSave = new SaveFileDialog();
dlgSave.Filter = "Compatible Files (*.csv;*.cars)|*.csv;*.cars|CSV Files (*.csv)|*.csv|Car Manager CSV (*.cars)|*.cars|All Files (*.*)|*.*";
dlgSave.Title = "Save Car Data File As";
// Default to users documents
dlgSave.InitialDirectory = SafeManager.getRecentFolder();
DialogResult result = dlgSave.ShowDialog();
if (result == DialogResult.OK)
{
// does file already exist?
/*if (System.IO.File.Exists(dlgSave.FileName))
{
var overwriteResult = MessageBox.Show("File already exists. Overwrite?", "Overwrite File", MessageBoxButtons.YesNo, MessageBoxIcon.Warning);
if (overwriteResult != DialogResult.Yes)
{
return;
}
}*/
// Windows already handles this lmao
filepath = dlgSave.FileName;
this.Text = "Car Manager - " + System.IO.Path.GetFileName(filepath);
StateManager.setFilePath(filepath);
SafeManager.SaveCars(filepath, cars);
SafeManager.AddRecentPath(filepath);
}
refreshRecents();
}
private void importToolStripMenuItem_Click(object sender, EventArgs e)
{
DialogResult result = MessageBox.Show("Importing will add cars from another file to this file. This action cannot be undone. Continue?", "Import Cars", MessageBoxButtons.YesNo, MessageBoxIcon.Warning);
if (result == DialogResult.Yes)
{
OpenFileDialog dlgOpen = new OpenFileDialog();
dlgOpen.Filter = "Compatible Files (*.csv;*.cars)|*.csv;*.cars|CSV Files (*.csv)|*.csv|Car Manager CSV (*.cars)|*.cars|All Files (*.*)|*.*";
dlgOpen.Title = "Import Car Data File";
// Default to users documents
dlgOpen.InitialDirectory = SafeManager.getRecentFolder();
DialogResult dlgResult = dlgOpen.ShowDialog();
if (dlgResult == DialogResult.OK)
{
try
{
Console.WriteLine("Starting merge...");
List<Car> importedCars = SafeManager.ReadCars(dlgOpen.FileName);
if (importedCars.Count == 0)
{
throw new Exception("File doesn't contain valid Cars.");
}
// merge cars
foreach (Car car in importedCars)
{
cars.Add(car);
}
DialogResult mergeAsNewFileResult = MessageBox.Show("Do you want to save the merged cars as a new file?", "Save As New File", MessageBoxButtons.YesNo, MessageBoxIcon.Question);
if (mergeAsNewFileResult == DialogResult.Yes)
{
SaveFileDialog dlgSave = new SaveFileDialog();
dlgSave.Filter = "Compatible Files (*.csv;*.cars)|*.csv;*.cars|CSV Files (*.csv)|*.csv|Car Manager CSV (*.cars)|*.cars|All Files (*.*)|*.*";
dlgSave.Title = "Save Merged Car Data File As";
// Default to users documents
dlgSave.InitialDirectory = SafeManager.getRecentFolder();
DialogResult saveResult = dlgSave.ShowDialog();
if (saveResult == DialogResult.OK)
{
filepath = dlgSave.FileName;
StateManager.setFilePath(filepath);
SafeManager.SaveCars(filepath, cars);
SafeManager.AddRecentPath(filepath);
refreshRecents();
}
}
else
{
// save to current file
SafeManager.SaveCars(filepath, cars);
}
// Refresh display
refreshCars(cars);
MessageBox.Show("File imported successfully.", "Import File", MessageBoxButtons.OK, MessageBoxIcon.Information);
}
catch (LegacyException)
{
MessageBox.Show("The file you are trying to import is in a legacy format that is no longer supported. Please convert the file to the new format and try again.", "Import Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
}
catch (Exception ex)
{
MessageBox.Show("Error importing file: " + ex.Message);
}
}
else
{
Console.WriteLine("Import cancelled.");
}
}
}
// TODO: Unbind and remove this.
private void recentFilesToolStripMenuItem_Click(object sender, EventArgs e)
{
}
/// <summary>
/// Refreshes the recently opened files menu.
/// </summary>
private void refreshRecents()
{
recentFilesToolStripMenuItem.DropDownItems.Clear();
List<string> recentFiles = SafeManager.GetRecentPaths();
recentFilesToolStripMenuItem.Enabled = recentFiles.Count > 0;
recentFilesToolStripMenuItem.ToolTipText = recentFiles.Count > 0 ? "" : "No recent files.";
foreach (string path in recentFiles)
{
ToolStripMenuItem item = new ToolStripMenuItem(path);
item.Click += (s, e2) =>
{
try
{
List<Car> importedCars = SafeManager.ReadCars(path);
if (importedCars.Count == 0)
{
throw new Exception("File doesn't contain valid Cars.");
}
filepath = path;
cars = importedCars;
StateManager.setFilePath(filepath);
// Refresh display
refreshCars(cars);
MessageBox.Show("File loaded successfully.", "Load File", MessageBoxButtons.OK, MessageBoxIcon.Information);
}
catch (LegacyException)
{
MessageBox.Show("The file you are trying to open is in a legacy format that is no longer supported. Please convert the file to the new format and try again.", "Load Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
}
catch (Exception ex)
{
MessageBox.Show("Error loading file: " + ex.Message);
}
};
recentFilesToolStripMenuItem.DropDownItems.Add(item);
}
}
private void revealInFileExplorerToolStripMenuItem_Click(object sender, EventArgs e)
{
// Open File Explorer at the location of the current filepath
if (System.IO.File.Exists(filepath))
{
System.Diagnostics.Process.Start("explorer.exe", "/select,\"" + filepath + "\"");
}
else
{
MessageBox.Show("File does not exist.", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
}
}
private void openWelcomeScreenToolStripMenuItem_Click(object sender, EventArgs e)
{
openWelcomeScreen();
}
private void addCarToolStripMenuItem_Click(object sender, EventArgs e)
{
btnNewCar.PerformClick();
}
private void clearSearchToolStripMenuItem_Click(object sender, EventArgs e)
{
tbxSearch.Text = "";
}
private void exitToolStripMenuItem_Click(object sender, EventArgs e)
{
SafeManager.SaveCars(filepath, cars);
Environment.Exit(0);
}
private void clearRecentFilesToolStripMenuItem_Click(object sender, EventArgs e)
{
SafeManager.ClearRecentPaths();
}
private void settingsToolStripMenuItem_Click(object sender, EventArgs e)
{
SettingsForm settingsForm = new SettingsForm();
settingsForm.FormClosed += (s2, e2) =>
{
// refresh cars in case data location changed
List<Car> cars_ = SafeManager.ReadCars(filepath);
refreshCars(cars_, false, true);
System.Diagnostics.Debug.WriteLine("Refreshed!");
};
settingsForm.ShowDialog();
}
private void checkForUpdatesToolStripMenuItem_Click(object sender, EventArgs e)
{
try
{
if (Updater.IsUpdateAvailable(Properties.Settings.Default.AllowPrerelease))
{
UpdatePromptForm updatePrompt = new UpdatePromptForm(Updater.GetCurrentVersion(), Updater.GetLatestVersion());
updatePrompt.ShowDialog();
}
else
{
MessageBox.Show($"You are already using the latest version. ({Updater.GetCurrentVersion()})", "No Updates Available", MessageBoxButtons.OK, MessageBoxIcon.Information);
}
}
catch (Exception ex)
{
MessageBox.Show("Error checking for updates: " + ex.Message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
}
}
private void gitRepositoryToolStripMenuItem_Click(object sender, EventArgs e)
{
// Open the Git repository in the user's default browser
System.Diagnostics.Process.Start(new System.Diagnostics.ProcessStartInfo
{
FileName = "https://git.jaro.digital/frozd/carmanager-3",
UseShellExecute = true
});
}
}
}

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,182 @@
namespace CarManagerV3.Forms
{
partial class NetCredentials
{
/// <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()
{
flowLayoutPanel1 = new System.Windows.Forms.FlowLayoutPanel();
label1 = new System.Windows.Forms.Label();
label2 = new System.Windows.Forms.Label();
label3 = new System.Windows.Forms.Label();
tbxUsername = new System.Windows.Forms.TextBox();
label4 = new System.Windows.Forms.Label();
tbxPassword = new System.Windows.Forms.TextBox();
flowLayoutPanel2 = new System.Windows.Forms.FlowLayoutPanel();
btnAccept = new System.Windows.Forms.Button();
btnCancel = new System.Windows.Forms.Button();
flowLayoutPanel1.SuspendLayout();
flowLayoutPanel2.SuspendLayout();
SuspendLayout();
//
// flowLayoutPanel1
//
flowLayoutPanel1.Controls.Add(label1);
flowLayoutPanel1.Controls.Add(label2);
flowLayoutPanel1.Controls.Add(label3);
flowLayoutPanel1.Controls.Add(tbxUsername);
flowLayoutPanel1.Controls.Add(label4);
flowLayoutPanel1.Controls.Add(tbxPassword);
flowLayoutPanel1.Dock = System.Windows.Forms.DockStyle.Fill;
flowLayoutPanel1.FlowDirection = System.Windows.Forms.FlowDirection.TopDown;
flowLayoutPanel1.Location = new System.Drawing.Point(0, 0);
flowLayoutPanel1.Name = "flowLayoutPanel1";
flowLayoutPanel1.Padding = new System.Windows.Forms.Padding(10);
flowLayoutPanel1.Size = new System.Drawing.Size(349, 248);
flowLayoutPanel1.TabIndex = 0;
//
// label1
//
label1.AutoSize = true;
label1.Font = new System.Drawing.Font("Segoe UI", 14F);
label1.Location = new System.Drawing.Point(13, 10);
label1.Name = "label1";
label1.Size = new System.Drawing.Size(232, 25);
label1.TabIndex = 0;
label1.Text = "Enter Network Credentials";
//
// label2
//
label2.AutoSize = true;
label2.Location = new System.Drawing.Point(13, 35);
label2.Name = "label2";
label2.Size = new System.Drawing.Size(308, 30);
label2.TabIndex = 1;
label2.Text = "Your network requires credentials to access data through the proxy";
//
// label3
//
label3.AutoSize = true;
label3.Location = new System.Drawing.Point(13, 85);
label3.Margin = new System.Windows.Forms.Padding(3, 20, 3, 0);
label3.Name = "label3";
label3.Size = new System.Drawing.Size(86, 15);
label3.TabIndex = 2;
label3.Text = "Your username";
//
// tbxUsername
//
tbxUsername.Location = new System.Drawing.Point(13, 103);
tbxUsername.Name = "tbxUsername";
tbxUsername.Size = new System.Drawing.Size(308, 23);
tbxUsername.TabIndex = 3;
//
// label4
//
label4.AutoSize = true;
label4.Location = new System.Drawing.Point(13, 139);
label4.Margin = new System.Windows.Forms.Padding(3, 10, 3, 0);
label4.Name = "label4";
label4.Size = new System.Drawing.Size(84, 15);
label4.TabIndex = 4;
label4.Text = "Your password";
//
// tbxPassword
//
tbxPassword.Location = new System.Drawing.Point(13, 157);
tbxPassword.Name = "tbxPassword";
tbxPassword.PasswordChar = '*';
tbxPassword.Size = new System.Drawing.Size(308, 23);
tbxPassword.TabIndex = 5;
//
// flowLayoutPanel2
//
flowLayoutPanel2.Controls.Add(btnAccept);
flowLayoutPanel2.Controls.Add(btnCancel);
flowLayoutPanel2.Dock = System.Windows.Forms.DockStyle.Bottom;
flowLayoutPanel2.FlowDirection = System.Windows.Forms.FlowDirection.RightToLeft;
flowLayoutPanel2.Location = new System.Drawing.Point(0, 198);
flowLayoutPanel2.Name = "flowLayoutPanel2";
flowLayoutPanel2.Size = new System.Drawing.Size(349, 50);
flowLayoutPanel2.TabIndex = 1;
//
// btnAccept
//
btnAccept.Anchor = System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right;
btnAccept.Location = new System.Drawing.Point(271, 3);
btnAccept.Name = "btnAccept";
btnAccept.Size = new System.Drawing.Size(75, 23);
btnAccept.TabIndex = 0;
btnAccept.Text = "Save";
btnAccept.UseVisualStyleBackColor = true;
btnAccept.Click += btnAccept_Click;
//
// btnCancel
//
btnCancel.Location = new System.Drawing.Point(190, 3);
btnCancel.Name = "btnCancel";
btnCancel.Size = new System.Drawing.Size(75, 23);
btnCancel.TabIndex = 1;
btnCancel.Text = "Cancel";
btnCancel.UseVisualStyleBackColor = true;
//
// NetCredentials
//
AcceptButton = btnAccept;
AutoScaleDimensions = new System.Drawing.SizeF(7F, 15F);
AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
CancelButton = btnCancel;
ClientSize = new System.Drawing.Size(349, 248);
ControlBox = false;
Controls.Add(flowLayoutPanel2);
Controls.Add(flowLayoutPanel1);
FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog;
MaximizeBox = false;
Name = "NetCredentials";
StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
Text = "Enter Network Credentials";
TopMost = true;
Load += NetCredentials_Load;
flowLayoutPanel1.ResumeLayout(false);
flowLayoutPanel1.PerformLayout();
flowLayoutPanel2.ResumeLayout(false);
ResumeLayout(false);
}
#endregion
private System.Windows.Forms.FlowLayoutPanel flowLayoutPanel1;
private System.Windows.Forms.Label label1;
private System.Windows.Forms.Label label2;
private System.Windows.Forms.Label label3;
private System.Windows.Forms.TextBox tbxUsername;
private System.Windows.Forms.Label label4;
private System.Windows.Forms.TextBox tbxPassword;
private System.Windows.Forms.FlowLayoutPanel flowLayoutPanel2;
private System.Windows.Forms.Button btnAccept;
private System.Windows.Forms.Button btnCancel;
}
}

View File

@@ -0,0 +1,38 @@
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Net;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace CarManagerV3.Forms
{
public partial class NetCredentials : Form
{
public NetCredentials()
{
InitializeComponent();
}
public NetworkCredential GetCredentails()
{
return new NetworkCredential(tbxUsername.Text, tbxPassword.Text);
}
private void NetCredentials_Load(object sender, EventArgs e)
{
this.BringToFront();
this.Focus();
}
private void btnAccept_Click(object sender, EventArgs e)
{
this.DialogResult = DialogResult.OK;
this.Close();
}
}
}

View File

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

View File

@@ -0,0 +1,234 @@
namespace CarManagerV3.Forms
{
partial class SettingsForm
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Windows Form Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(SettingsForm));
flowLayoutPanel1 = new System.Windows.Forms.FlowLayoutPanel();
label1 = new System.Windows.Forms.Label();
label2 = new System.Windows.Forms.Label();
flowLayoutPanel2 = new System.Windows.Forms.FlowLayoutPanel();
btnAccept = new System.Windows.Forms.Button();
btnDiscard = new System.Windows.Forms.Button();
tableLayoutPanel1 = new System.Windows.Forms.TableLayoutPanel();
lblDataLocation = new System.Windows.Forms.Label();
tbxDataLocation = new System.Windows.Forms.TextBox();
tableLayoutPanel2 = new System.Windows.Forms.TableLayoutPanel();
btnReset = new System.Windows.Forms.Button();
cbxPreRelease = new System.Windows.Forms.CheckBox();
flowLayoutPanel1.SuspendLayout();
flowLayoutPanel2.SuspendLayout();
tableLayoutPanel1.SuspendLayout();
tableLayoutPanel2.SuspendLayout();
SuspendLayout();
//
// flowLayoutPanel1
//
flowLayoutPanel1.Controls.Add(label1);
flowLayoutPanel1.Controls.Add(label2);
flowLayoutPanel1.Dock = System.Windows.Forms.DockStyle.Top;
flowLayoutPanel1.FlowDirection = System.Windows.Forms.FlowDirection.TopDown;
flowLayoutPanel1.Location = new System.Drawing.Point(0, 0);
flowLayoutPanel1.Name = "flowLayoutPanel1";
flowLayoutPanel1.Padding = new System.Windows.Forms.Padding(11, 13, 11, 13);
flowLayoutPanel1.Size = new System.Drawing.Size(499, 86);
flowLayoutPanel1.TabIndex = 0;
//
// label1
//
label1.AutoSize = true;
label1.Font = new System.Drawing.Font("Segoe UI", 14F);
label1.Location = new System.Drawing.Point(14, 13);
label1.Name = "label1";
label1.Size = new System.Drawing.Size(100, 32);
label1.TabIndex = 2;
label1.Text = "Settings";
//
// label2
//
label2.AutoSize = true;
label2.Location = new System.Drawing.Point(14, 45);
label2.Name = "label2";
label2.Size = new System.Drawing.Size(276, 20);
label2.TabIndex = 3;
label2.Text = "Adjust settings related to Car Manager 3";
//
// flowLayoutPanel2
//
flowLayoutPanel2.Controls.Add(btnAccept);
flowLayoutPanel2.Controls.Add(btnDiscard);
flowLayoutPanel2.Dock = System.Windows.Forms.DockStyle.Fill;
flowLayoutPanel2.FlowDirection = System.Windows.Forms.FlowDirection.RightToLeft;
flowLayoutPanel2.Location = new System.Drawing.Point(249, 0);
flowLayoutPanel2.Margin = new System.Windows.Forms.Padding(0);
flowLayoutPanel2.Name = "flowLayoutPanel2";
flowLayoutPanel2.Size = new System.Drawing.Size(240, 64);
flowLayoutPanel2.TabIndex = 2;
//
// btnAccept
//
btnAccept.Anchor = System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right;
btnAccept.Location = new System.Drawing.Point(151, 4);
btnAccept.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4);
btnAccept.Name = "btnAccept";
btnAccept.Size = new System.Drawing.Size(86, 31);
btnAccept.TabIndex = 0;
btnAccept.Text = "Save";
btnAccept.UseVisualStyleBackColor = true;
btnAccept.Click += btnAccept_Click;
//
// btnDiscard
//
btnDiscard.Location = new System.Drawing.Point(59, 4);
btnDiscard.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4);
btnDiscard.Name = "btnDiscard";
btnDiscard.Size = new System.Drawing.Size(86, 31);
btnDiscard.TabIndex = 1;
btnDiscard.Text = "Discard";
btnDiscard.UseVisualStyleBackColor = true;
btnDiscard.Click += btnDiscard_Click;
//
// tableLayoutPanel1
//
tableLayoutPanel1.ColumnCount = 2;
tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle());
tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 100F));
tableLayoutPanel1.Controls.Add(lblDataLocation, 0, 0);
tableLayoutPanel1.Controls.Add(tbxDataLocation, 1, 0);
tableLayoutPanel1.Controls.Add(cbxPreRelease, 1, 1);
tableLayoutPanel1.Dock = System.Windows.Forms.DockStyle.Fill;
tableLayoutPanel1.Location = new System.Drawing.Point(0, 86);
tableLayoutPanel1.Name = "tableLayoutPanel1";
tableLayoutPanel1.Padding = new System.Windows.Forms.Padding(10, 0, 10, 0);
tableLayoutPanel1.RowCount = 3;
tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle());
tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle());
tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle());
tableLayoutPanel1.Size = new System.Drawing.Size(499, 531);
tableLayoutPanel1.TabIndex = 3;
//
// lblDataLocation
//
lblDataLocation.Anchor = System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right;
lblDataLocation.AutoSize = true;
lblDataLocation.Location = new System.Drawing.Point(13, 6);
lblDataLocation.Name = "lblDataLocation";
lblDataLocation.Size = new System.Drawing.Size(102, 20);
lblDataLocation.TabIndex = 0;
lblDataLocation.Text = "Data Location";
lblDataLocation.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
//
// tbxDataLocation
//
tbxDataLocation.Dock = System.Windows.Forms.DockStyle.Fill;
tbxDataLocation.Location = new System.Drawing.Point(121, 3);
tbxDataLocation.Name = "tbxDataLocation";
tbxDataLocation.Size = new System.Drawing.Size(365, 27);
tbxDataLocation.TabIndex = 1;
//
// tableLayoutPanel2
//
tableLayoutPanel2.ColumnCount = 2;
tableLayoutPanel2.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 50F));
tableLayoutPanel2.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 50F));
tableLayoutPanel2.Controls.Add(flowLayoutPanel2, 1, 0);
tableLayoutPanel2.Controls.Add(btnReset, 0, 0);
tableLayoutPanel2.Dock = System.Windows.Forms.DockStyle.Bottom;
tableLayoutPanel2.Location = new System.Drawing.Point(0, 553);
tableLayoutPanel2.Name = "tableLayoutPanel2";
tableLayoutPanel2.Padding = new System.Windows.Forms.Padding(10, 0, 10, 0);
tableLayoutPanel2.RowCount = 1;
tableLayoutPanel2.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 50F));
tableLayoutPanel2.Size = new System.Drawing.Size(499, 64);
tableLayoutPanel2.TabIndex = 4;
//
// btnReset
//
btnReset.AutoSize = true;
btnReset.Location = new System.Drawing.Point(13, 3);
btnReset.Name = "btnReset";
btnReset.Size = new System.Drawing.Size(130, 30);
btnReset.TabIndex = 3;
btnReset.Text = "Revert to default";
btnReset.UseVisualStyleBackColor = true;
btnReset.Click += btnReset_Click;
//
// cbxPreRelease
//
cbxPreRelease.AutoSize = true;
tableLayoutPanel1.SetColumnSpan(cbxPreRelease, 2);
cbxPreRelease.Location = new System.Drawing.Point(13, 36);
cbxPreRelease.Name = "cbxPreRelease";
cbxPreRelease.RightToLeft = System.Windows.Forms.RightToLeft.Yes;
cbxPreRelease.Size = new System.Drawing.Size(164, 24);
cbxPreRelease.TabIndex = 3;
cbxPreRelease.Text = "Pre-Release channel";
cbxPreRelease.UseVisualStyleBackColor = true;
//
// SettingsForm
//
AutoScaleDimensions = new System.Drawing.SizeF(8F, 20F);
AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
ClientSize = new System.Drawing.Size(499, 617);
Controls.Add(tableLayoutPanel2);
Controls.Add(tableLayoutPanel1);
Controls.Add(flowLayoutPanel1);
FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle;
Icon = (System.Drawing.Icon)resources.GetObject("$this.Icon");
MaximizeBox = false;
MinimizeBox = false;
Name = "SettingsForm";
Text = "Settings";
TopMost = true;
Load += SettingsForm_Load;
flowLayoutPanel1.ResumeLayout(false);
flowLayoutPanel1.PerformLayout();
flowLayoutPanel2.ResumeLayout(false);
tableLayoutPanel1.ResumeLayout(false);
tableLayoutPanel1.PerformLayout();
tableLayoutPanel2.ResumeLayout(false);
tableLayoutPanel2.PerformLayout();
ResumeLayout(false);
}
#endregion
private System.Windows.Forms.FlowLayoutPanel flowLayoutPanel1;
private System.Windows.Forms.Label label1;
private System.Windows.Forms.Label label2;
private System.Windows.Forms.FlowLayoutPanel flowLayoutPanel2;
private System.Windows.Forms.Button btnAccept;
private System.Windows.Forms.Button btnDiscard;
private System.Windows.Forms.TableLayoutPanel tableLayoutPanel1;
private System.Windows.Forms.Label lblDataLocation;
private System.Windows.Forms.TextBox tbxDataLocation;
private System.Windows.Forms.TableLayoutPanel tableLayoutPanel2;
private System.Windows.Forms.Button btnReset;
private System.Windows.Forms.CheckBox cbxPreRelease;
}
}

View File

@@ -0,0 +1,173 @@
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace CarManagerV3.Forms
{
public partial class SettingsForm : Form
{
// Settings map (Maps settings to controls and default values + optional change event handler function that takes previous and new value)
private readonly Dictionary<string, ISettingBinding> settingsMap = new();
public SettingsForm()
{
InitializeComponent();
initializeSettingsMap();
}
private void initializeSettingsMap()
{
// Initialize the settings map with setting keys, associated controls, default values, and optional change event handlers
settingsMap["DataLocation"] =
new SettingBinding<string>(
control: tbxDataLocation,
defaultValue: Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData) + "\\CarManagerV3",
read: () => Properties.Settings.Default.DataLocation, // strongly typed
write: v => Properties.Settings.Default.DataLocation = v, // strongly typed
onChange: (before, after) =>
{
// TODO: handle path change if needed
});
settingsMap["AllowPrerelease"] =
new SettingBinding<bool>(
control: cbxPreRelease,
defaultValue: false,
read: () => Properties.Settings.Default.AllowPrerelease,
write: v => Properties.Settings.Default.AllowPrerelease = v);
}
private void SettingsForm_Load(object sender, EventArgs e)
{
loadSettings();
}
private void loadSettings()
{
foreach (var kvp in settingsMap)
kvp.Value.Load();
}
private void saveSettings()
{
foreach (var kvp in settingsMap)
kvp.Value.Save();
Properties.Settings.Default.Save();
}
private void resetSettings()
{
DialogResult confirmReset = MessageBox.Show(
"Are you sure you want to reset all settings to their default values? This action cannot be undone.",
"Confirm Reset",
MessageBoxButtons.YesNo,
MessageBoxIcon.Warning);
if (confirmReset != DialogResult.Yes)
return;
foreach (var kvp in settingsMap)
kvp.Value.Reset();
Properties.Settings.Default.Save();
loadSettings();
}
private void btnAccept_Click(object sender, EventArgs e)
{
saveSettings();
this.Close();
}
private void btnDiscard_Click(object sender, EventArgs e)
{
this.Close();
}
private void btnReset_Click(object sender, EventArgs e)
{
resetSettings();
}
}
internal interface ISettingBinding
{
void Load();
void Save();
void Reset();
}
internal sealed class SettingBinding<T> : ISettingBinding
{
private readonly Control control;
private readonly T defaultValue;
private readonly Func<T> read;
private readonly Action<T> write;
private readonly Action<T, T>? onChange;
public SettingBinding(Control control, T defaultValue, Func<T> read, Action<T> write, Action<T, T>? onChange = null)
{
this.control = control;
this.defaultValue = defaultValue;
this.read = read;
this.write = write;
this.onChange = onChange;
}
public void Load()
{
T value = read();
ApplyToControl(value);
}
public void Save()
{
T before = read();
T after = ReadFromControl();
write(after);
if (onChange != null && !EqualityComparer<T>.Default.Equals(before, after))
onChange(before, after);
}
public void Reset() => write(defaultValue);
private void ApplyToControl(T value)
{
switch (control)
{
case TextBox tb:
tb.Text = value?.ToString() ?? string.Empty;
break;
case CheckBox cb:
cb.Checked = value is bool b ? b : Convert.ToBoolean(value);
break;
default:
throw new NotSupportedException($"Control type '{control.GetType().Name}' not supported for {typeof(T).Name}.");
}
}
private T ReadFromControl()
{
object result = control switch
{
TextBox tb when typeof(T) == typeof(string) => tb.Text,
CheckBox cb when typeof(T) == typeof(bool) => cb.Checked,
_ => throw new NotSupportedException($"Cannot read {typeof(T).Name} from control type '{control.GetType().Name}'.")
};
return (T)result;
}
}
}

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,191 @@
namespace CarManagerV3.Forms
{
partial class UpdatePromptForm
{
/// <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()
{
flowLayoutPanel1 = new System.Windows.Forms.FlowLayoutPanel();
lblUpdateTitleStatic = new System.Windows.Forms.Label();
label2 = new System.Windows.Forms.Label();
lblInstalledVersion = new System.Windows.Forms.Label();
lblLatestVersion = new System.Windows.Forms.Label();
tableLayoutPanel1 = new System.Windows.Forms.TableLayoutPanel();
flowLayoutPanel2 = new System.Windows.Forms.FlowLayoutPanel();
btnInstallUpdate = new System.Windows.Forms.Button();
btnDismissUpdate = new System.Windows.Forms.Button();
btnReadChangelog = new System.Windows.Forms.Button();
flowLayoutPanel1.SuspendLayout();
tableLayoutPanel1.SuspendLayout();
flowLayoutPanel2.SuspendLayout();
SuspendLayout();
//
// flowLayoutPanel1
//
flowLayoutPanel1.Controls.Add(lblUpdateTitleStatic);
flowLayoutPanel1.Controls.Add(label2);
flowLayoutPanel1.Controls.Add(lblInstalledVersion);
flowLayoutPanel1.Controls.Add(lblLatestVersion);
flowLayoutPanel1.Dock = System.Windows.Forms.DockStyle.Top;
flowLayoutPanel1.FlowDirection = System.Windows.Forms.FlowDirection.TopDown;
flowLayoutPanel1.Location = new System.Drawing.Point(10, 20);
flowLayoutPanel1.Name = "flowLayoutPanel1";
flowLayoutPanel1.Size = new System.Drawing.Size(846, 125);
flowLayoutPanel1.TabIndex = 0;
//
// lblUpdateTitleStatic
//
lblUpdateTitleStatic.AutoSize = true;
lblUpdateTitleStatic.Font = new System.Drawing.Font("Segoe UI", 14F);
lblUpdateTitleStatic.Location = new System.Drawing.Point(3, 0);
lblUpdateTitleStatic.Name = "lblUpdateTitleStatic";
lblUpdateTitleStatic.Size = new System.Drawing.Size(298, 32);
lblUpdateTitleStatic.TabIndex = 4;
lblUpdateTitleStatic.Text = "A new Version is Available!";
//
// label2
//
label2.AutoSize = true;
label2.Location = new System.Drawing.Point(3, 32);
label2.Name = "label2";
label2.Size = new System.Drawing.Size(600, 20);
label2.TabIndex = 5;
label2.Text = "A new version of Car Manager 3 has been released. Update now to get the latest features.";
//
// lblInstalledVersion
//
lblInstalledVersion.AutoSize = true;
lblInstalledVersion.Location = new System.Drawing.Point(3, 57);
lblInstalledVersion.Margin = new System.Windows.Forms.Padding(3, 5, 3, 0);
lblInstalledVersion.Name = "lblInstalledVersion";
lblInstalledVersion.Size = new System.Drawing.Size(123, 20);
lblInstalledVersion.TabIndex = 6;
lblInstalledVersion.Text = "Your version: ?.?.?";
//
// lblLatestVersion
//
lblLatestVersion.AutoSize = true;
lblLatestVersion.Font = new System.Drawing.Font("Segoe UI", 9F, System.Drawing.FontStyle.Bold);
lblLatestVersion.Location = new System.Drawing.Point(3, 77);
lblLatestVersion.Name = "lblLatestVersion";
lblLatestVersion.Size = new System.Drawing.Size(144, 20);
lblLatestVersion.TabIndex = 7;
lblLatestVersion.Text = "Latest version: ?.?.?";
//
// tableLayoutPanel1
//
tableLayoutPanel1.ColumnCount = 2;
tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 50F));
tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 50F));
tableLayoutPanel1.Controls.Add(flowLayoutPanel2, 1, 0);
tableLayoutPanel1.Controls.Add(btnReadChangelog, 0, 0);
tableLayoutPanel1.Dock = System.Windows.Forms.DockStyle.Bottom;
tableLayoutPanel1.Location = new System.Drawing.Point(10, 393);
tableLayoutPanel1.Name = "tableLayoutPanel1";
tableLayoutPanel1.RowCount = 1;
tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 50F));
tableLayoutPanel1.Size = new System.Drawing.Size(846, 47);
tableLayoutPanel1.TabIndex = 1;
//
// flowLayoutPanel2
//
flowLayoutPanel2.Controls.Add(btnInstallUpdate);
flowLayoutPanel2.Controls.Add(btnDismissUpdate);
flowLayoutPanel2.Dock = System.Windows.Forms.DockStyle.Fill;
flowLayoutPanel2.FlowDirection = System.Windows.Forms.FlowDirection.RightToLeft;
flowLayoutPanel2.Location = new System.Drawing.Point(423, 0);
flowLayoutPanel2.Margin = new System.Windows.Forms.Padding(0);
flowLayoutPanel2.Name = "flowLayoutPanel2";
flowLayoutPanel2.Size = new System.Drawing.Size(423, 47);
flowLayoutPanel2.TabIndex = 0;
//
// btnInstallUpdate
//
btnInstallUpdate.AutoSize = true;
btnInstallUpdate.Location = new System.Drawing.Point(320, 3);
btnInstallUpdate.Name = "btnInstallUpdate";
btnInstallUpdate.Size = new System.Drawing.Size(100, 30);
btnInstallUpdate.TabIndex = 0;
btnInstallUpdate.Text = "Update now";
btnInstallUpdate.UseVisualStyleBackColor = true;
btnInstallUpdate.Click += btnInstallUpdate_Click;
//
// btnDismissUpdate
//
btnDismissUpdate.Location = new System.Drawing.Point(220, 3);
btnDismissUpdate.Name = "btnDismissUpdate";
btnDismissUpdate.Size = new System.Drawing.Size(94, 29);
btnDismissUpdate.TabIndex = 1;
btnDismissUpdate.Text = "Dismiss";
btnDismissUpdate.UseVisualStyleBackColor = true;
btnDismissUpdate.Click += btnDismissUpdate_Click;
//
// btnReadChangelog
//
btnReadChangelog.Location = new System.Drawing.Point(3, 3);
btnReadChangelog.Name = "btnReadChangelog";
btnReadChangelog.Size = new System.Drawing.Size(94, 29);
btnReadChangelog.TabIndex = 1;
btnReadChangelog.Text = "Changelog";
btnReadChangelog.UseVisualStyleBackColor = true;
btnReadChangelog.Click += btnReadChangelog_Click;
//
// UpdatePromptForm
//
AutoScaleDimensions = new System.Drawing.SizeF(8F, 20F);
AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
ClientSize = new System.Drawing.Size(866, 450);
Controls.Add(tableLayoutPanel1);
Controls.Add(flowLayoutPanel1);
FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog;
MaximizeBox = false;
MinimizeBox = false;
Name = "UpdatePromptForm";
Padding = new System.Windows.Forms.Padding(10, 20, 10, 10);
Text = "Update Car Manager 3";
TopMost = true;
flowLayoutPanel1.ResumeLayout(false);
flowLayoutPanel1.PerformLayout();
tableLayoutPanel1.ResumeLayout(false);
flowLayoutPanel2.ResumeLayout(false);
flowLayoutPanel2.PerformLayout();
ResumeLayout(false);
}
#endregion
private System.Windows.Forms.FlowLayoutPanel flowLayoutPanel1;
private System.Windows.Forms.Label lblUpdateTitleStatic;
private System.Windows.Forms.Label label2;
private System.Windows.Forms.Label lblInstalledVersion;
private System.Windows.Forms.Label lblLatestVersion;
private System.Windows.Forms.TableLayoutPanel tableLayoutPanel1;
private System.Windows.Forms.FlowLayoutPanel flowLayoutPanel2;
private System.Windows.Forms.Button btnInstallUpdate;
private System.Windows.Forms.Button btnDismissUpdate;
private System.Windows.Forms.Button btnReadChangelog;
}
}

View File

@@ -0,0 +1,64 @@
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using CarManagerV3.Manager;
namespace CarManagerV3.Forms
{
public partial class UpdatePromptForm : Form
{
public UpdatePromptForm(string currentVersion, string latestVersion)
{
InitializeComponent();
lblInstalledVersion.Text = lblInstalledVersion.Text.Replace("?.?.?", currentVersion);
lblLatestVersion.Text = lblLatestVersion.Text.Replace("?.?.?", latestVersion);
}
private void btnDismissUpdate_Click(object sender, EventArgs e)
{
this.Close();
}
private void btnInstallUpdate_Click(object sender, EventArgs e)
{
/*
var msgbox = new PleaseWait();
msgbox.Show();
Application.DoEvents();
StateManager.UpdateCar(car);
Image fooimg = ImageManager.GetImage(car);
msgbox.Close();
this.Close();
*/
PleaseWait loadForm = new PleaseWait("Downloading the newest version...");
try
{
this.Enabled = false;
loadForm.Show();
Application.DoEvents();
//return;
Updater.DownloadNewestInstaller();
}
catch (Exception ex)
{
MessageBox.Show("An error occurred while trying to download the update: " + ex.Message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
}
this.Enabled = true;
loadForm.Close();
this.Close();
}
private void btnReadChangelog_Click(object sender, EventArgs e)
{
Updater.openReleasePage();
}
}
}

View File

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

View File

@@ -0,0 +1,117 @@
namespace CarManagerV3
{
partial class PleaseWait
{
/// <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()
{
label1 = new System.Windows.Forms.Label();
lblContent = new System.Windows.Forms.Label();
animatedProgressBar1 = new AnimatedProgressBar();
flowLayoutPanel1 = new System.Windows.Forms.FlowLayoutPanel();
flowLayoutPanel1.SuspendLayout();
SuspendLayout();
//
// label1
//
label1.AutoSize = true;
label1.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, 0);
label1.Location = new System.Drawing.Point(13, 10);
label1.Name = "label1";
label1.Size = new System.Drawing.Size(140, 25);
label1.TabIndex = 1;
label1.Text = "Please wait...";
label1.UseWaitCursor = true;
//
// lblContent
//
lblContent.AutoSize = true;
lblContent.Location = new System.Drawing.Point(13, 40);
lblContent.Margin = new System.Windows.Forms.Padding(3, 5, 3, 10);
lblContent.Name = "lblContent";
lblContent.Size = new System.Drawing.Size(144, 20);
lblContent.TabIndex = 2;
lblContent.Text = "Saving your changes";
lblContent.UseWaitCursor = true;
//
// animatedProgressBar1
//
animatedProgressBar1.Location = new System.Drawing.Point(13, 73);
animatedProgressBar1.Name = "animatedProgressBar1";
animatedProgressBar1.PrimaryColor = System.Drawing.Color.FromArgb(0, 120, 215);
animatedProgressBar1.ProgressBackColor = System.Drawing.Color.FromArgb(240, 240, 240);
animatedProgressBar1.SecondaryColor = System.Drawing.Color.FromArgb(100, 180, 255);
animatedProgressBar1.Size = new System.Drawing.Size(408, 22);
animatedProgressBar1.TabIndex = 3;
animatedProgressBar1.UseWaitCursor = true;
//
// flowLayoutPanel1
//
flowLayoutPanel1.Anchor = System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom;
flowLayoutPanel1.Controls.Add(label1);
flowLayoutPanel1.Controls.Add(lblContent);
flowLayoutPanel1.Controls.Add(animatedProgressBar1);
flowLayoutPanel1.FlowDirection = System.Windows.Forms.FlowDirection.TopDown;
flowLayoutPanel1.Location = new System.Drawing.Point(0, 0);
flowLayoutPanel1.Name = "flowLayoutPanel1";
flowLayoutPanel1.Padding = new System.Windows.Forms.Padding(10);
flowLayoutPanel1.Size = new System.Drawing.Size(437, 153);
flowLayoutPanel1.TabIndex = 4;
flowLayoutPanel1.UseWaitCursor = true;
flowLayoutPanel1.WrapContents = false;
//
// PleaseWait
//
AutoScaleDimensions = new System.Drawing.SizeF(8F, 20F);
AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
AutoSize = true;
ClientSize = new System.Drawing.Size(437, 153);
ControlBox = false;
Controls.Add(flowLayoutPanel1);
FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog;
Margin = new System.Windows.Forms.Padding(3, 4, 3, 4);
MaximizeBox = false;
MinimizeBox = false;
Name = "PleaseWait";
ShowIcon = false;
ShowInTaskbar = false;
StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
Text = "Please Wait";
TopMost = true;
UseWaitCursor = true;
flowLayoutPanel1.ResumeLayout(false);
flowLayoutPanel1.PerformLayout();
ResumeLayout(false);
}
#endregion
private System.Windows.Forms.Label label1;
private System.Windows.Forms.Label lblContent;
private AnimatedProgressBar animatedProgressBar1;
private System.Windows.Forms.FlowLayoutPanel flowLayoutPanel1;
}
}

View File

@@ -0,0 +1,28 @@
using System;
using System.Windows.Forms;
namespace CarManagerV3
{
public partial class PleaseWait : Form
{
public PleaseWait(string content = "Saving your changes...")
{
InitializeComponent();
this.SetStyle(ControlStyles.OptimizedDoubleBuffer |
ControlStyles.AllPaintingInWmPaint |
ControlStyles.UserPaint, true);
// loading animation
animatedProgressBar1.StartAnimation();
lblContent.Text = content;
}
private void progressBar1_Click(object sender, EventArgs e)
{
}
}
}

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>

274
CarManagerV3/Forms/Welcome.Designer.cs generated Normal file
View File

@@ -0,0 +1,274 @@
namespace CarManagerV3.Forms
{
partial class Welcome
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Windows Form Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(Welcome));
tableLayoutPanel1 = new System.Windows.Forms.TableLayoutPanel();
tableLayoutPanel2 = new System.Windows.Forms.TableLayoutPanel();
pbxLogo = new System.Windows.Forms.PictureBox();
lblWelcome = new System.Windows.Forms.Label();
flowLayoutPanel1 = new System.Windows.Forms.FlowLayoutPanel();
label1 = new System.Windows.Forms.Label();
label2 = new System.Windows.Forms.Label();
label3 = new System.Windows.Forms.Label();
label4 = new System.Windows.Forms.Label();
flowLayoutPanel2 = new System.Windows.Forms.FlowLayoutPanel();
btnNewFile = new System.Windows.Forms.Button();
btnOpenFile = new System.Windows.Forms.Button();
btnExit = new System.Windows.Forms.Button();
tableLayoutPanel1.SuspendLayout();
tableLayoutPanel2.SuspendLayout();
((System.ComponentModel.ISupportInitialize)pbxLogo).BeginInit();
flowLayoutPanel1.SuspendLayout();
flowLayoutPanel2.SuspendLayout();
SuspendLayout();
//
// tableLayoutPanel1
//
tableLayoutPanel1.ColumnCount = 1;
tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 100F));
tableLayoutPanel1.Controls.Add(tableLayoutPanel2, 0, 0);
tableLayoutPanel1.Controls.Add(flowLayoutPanel1, 0, 1);
tableLayoutPanel1.Controls.Add(flowLayoutPanel2, 0, 2);
tableLayoutPanel1.Dock = System.Windows.Forms.DockStyle.Fill;
tableLayoutPanel1.Location = new System.Drawing.Point(0, 0);
tableLayoutPanel1.Margin = new System.Windows.Forms.Padding(0);
tableLayoutPanel1.Name = "tableLayoutPanel1";
tableLayoutPanel1.RowCount = 3;
tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 200F));
tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 100F));
tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 50F));
tableLayoutPanel1.Size = new System.Drawing.Size(590, 492);
tableLayoutPanel1.TabIndex = 0;
//
// tableLayoutPanel2
//
tableLayoutPanel2.BackColor = System.Drawing.SystemColors.MenuHighlight;
tableLayoutPanel2.ColumnCount = 1;
tableLayoutPanel2.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 100F));
tableLayoutPanel2.Controls.Add(pbxLogo, 0, 0);
tableLayoutPanel2.Controls.Add(lblWelcome, 0, 1);
tableLayoutPanel2.Dock = System.Windows.Forms.DockStyle.Fill;
tableLayoutPanel2.ForeColor = System.Drawing.SystemColors.Window;
tableLayoutPanel2.Location = new System.Drawing.Point(0, 0);
tableLayoutPanel2.Margin = new System.Windows.Forms.Padding(0);
tableLayoutPanel2.Name = "tableLayoutPanel2";
tableLayoutPanel2.RowCount = 2;
tableLayoutPanel2.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 70F));
tableLayoutPanel2.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 30F));
tableLayoutPanel2.Size = new System.Drawing.Size(590, 200);
tableLayoutPanel2.TabIndex = 1;
//
// pbxLogo
//
pbxLogo.Anchor = System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right;
pbxLogo.Image = (System.Drawing.Image)resources.GetObject("pbxLogo.Image");
pbxLogo.Location = new System.Drawing.Point(3, 15);
pbxLogo.Margin = new System.Windows.Forms.Padding(3, 15, 3, 3);
pbxLogo.Name = "pbxLogo";
pbxLogo.Size = new System.Drawing.Size(584, 122);
pbxLogo.SizeMode = System.Windows.Forms.PictureBoxSizeMode.Zoom;
pbxLogo.TabIndex = 0;
pbxLogo.TabStop = false;
//
// lblWelcome
//
lblWelcome.Anchor = System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right;
lblWelcome.AutoSize = true;
lblWelcome.Font = new System.Drawing.Font("Segoe UI", 20F, System.Drawing.FontStyle.Bold);
lblWelcome.Location = new System.Drawing.Point(0, 147);
lblWelcome.Margin = new System.Windows.Forms.Padding(0);
lblWelcome.Name = "lblWelcome";
lblWelcome.Size = new System.Drawing.Size(590, 46);
lblWelcome.TabIndex = 1;
lblWelcome.Text = "Welcome to Car Manager";
lblWelcome.TextAlign = System.Drawing.ContentAlignment.TopCenter;
//
// flowLayoutPanel1
//
flowLayoutPanel1.Controls.Add(label1);
flowLayoutPanel1.Controls.Add(label2);
flowLayoutPanel1.Controls.Add(label3);
flowLayoutPanel1.Controls.Add(label4);
flowLayoutPanel1.Dock = System.Windows.Forms.DockStyle.Fill;
flowLayoutPanel1.FlowDirection = System.Windows.Forms.FlowDirection.TopDown;
flowLayoutPanel1.Location = new System.Drawing.Point(3, 203);
flowLayoutPanel1.Name = "flowLayoutPanel1";
flowLayoutPanel1.Padding = new System.Windows.Forms.Padding(20, 20, 20, 0);
flowLayoutPanel1.Size = new System.Drawing.Size(584, 236);
flowLayoutPanel1.TabIndex = 2;
//
// label1
//
label1.Anchor = System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right;
label1.AutoSize = true;
label1.Font = new System.Drawing.Font("Segoe UI", 9F, System.Drawing.FontStyle.Bold);
label1.Location = new System.Drawing.Point(23, 20);
label1.Name = "label1";
label1.Size = new System.Drawing.Size(396, 20);
label1.TabIndex = 0;
label1.Text = "Car Manager lets you manage your lot easier than ever!";
label1.TextAlign = System.Drawing.ContentAlignment.TopCenter;
//
// label2
//
label2.AutoSize = true;
label2.Location = new System.Drawing.Point(23, 40);
label2.Name = "label2";
label2.Size = new System.Drawing.Size(310, 20);
label2.TabIndex = 1;
label2.Text = "Get started by creating or opening a .CSV file.";
//
// label3
//
label3.AutoSize = true;
label3.ForeColor = System.Drawing.SystemColors.AppWorkspace;
label3.Location = new System.Drawing.Point(23, 110);
label3.Margin = new System.Windows.Forms.Padding(3, 50, 3, 0);
label3.Name = "label3";
label3.Size = new System.Drawing.Size(203, 20);
label3.TabIndex = 2;
label3.Text = "Developed by Jaro Kaulmann";
//
// label4
//
label4.AutoSize = true;
label4.ForeColor = System.Drawing.SystemColors.AppWorkspace;
label4.Location = new System.Drawing.Point(23, 130);
label4.Name = "label4";
label4.Size = new System.Drawing.Size(204, 20);
label4.TabIndex = 3;
label4.Text = "Copyright © Jaro.digital 2026";
//
// flowLayoutPanel2
//
flowLayoutPanel2.Controls.Add(btnNewFile);
flowLayoutPanel2.Controls.Add(btnOpenFile);
flowLayoutPanel2.Controls.Add(btnExit);
flowLayoutPanel2.Dock = System.Windows.Forms.DockStyle.Fill;
flowLayoutPanel2.FlowDirection = System.Windows.Forms.FlowDirection.RightToLeft;
flowLayoutPanel2.Location = new System.Drawing.Point(3, 445);
flowLayoutPanel2.Name = "flowLayoutPanel2";
flowLayoutPanel2.Size = new System.Drawing.Size(584, 44);
flowLayoutPanel2.TabIndex = 3;
//
// btnNewFile
//
btnNewFile.Anchor = System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right;
btnNewFile.AutoSize = true;
btnNewFile.BackColor = System.Drawing.SystemColors.MenuHighlight;
btnNewFile.FlatAppearance.BorderSize = 0;
btnNewFile.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
btnNewFile.ForeColor = System.Drawing.SystemColors.Window;
btnNewFile.Location = new System.Drawing.Point(434, 3);
btnNewFile.Name = "btnNewFile";
btnNewFile.Padding = new System.Windows.Forms.Padding(3, 0, 3, 0);
btnNewFile.Size = new System.Drawing.Size(147, 36);
btnNewFile.TabIndex = 2;
btnNewFile.Text = "New File";
btnNewFile.UseVisualStyleBackColor = false;
btnNewFile.Click += btnNewFile_Click;
//
// btnOpenFile
//
btnOpenFile.Anchor = System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right;
btnOpenFile.AutoSize = true;
btnOpenFile.BackColor = System.Drawing.SystemColors.HotTrack;
btnOpenFile.FlatAppearance.BorderSize = 0;
btnOpenFile.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
btnOpenFile.ForeColor = System.Drawing.SystemColors.Window;
btnOpenFile.Location = new System.Drawing.Point(281, 3);
btnOpenFile.Name = "btnOpenFile";
btnOpenFile.Padding = new System.Windows.Forms.Padding(3, 0, 3, 0);
btnOpenFile.Size = new System.Drawing.Size(147, 36);
btnOpenFile.TabIndex = 0;
btnOpenFile.Text = "Open a File";
btnOpenFile.UseVisualStyleBackColor = false;
btnOpenFile.Click += btnOpenFile_Click;
//
// btnExit
//
btnExit.Anchor = System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right;
btnExit.AutoSize = true;
btnExit.BackColor = System.Drawing.SystemColors.ControlDark;
btnExit.FlatAppearance.BorderSize = 0;
btnExit.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
btnExit.ForeColor = System.Drawing.SystemColors.ControlLightLight;
btnExit.Location = new System.Drawing.Point(172, 3);
btnExit.Name = "btnExit";
btnExit.Padding = new System.Windows.Forms.Padding(3, 0, 3, 0);
btnExit.Size = new System.Drawing.Size(103, 36);
btnExit.TabIndex = 1;
btnExit.Text = "Exit";
btnExit.UseVisualStyleBackColor = false;
btnExit.Click += btnExit_Click;
//
// Welcome
//
AutoScaleDimensions = new System.Drawing.SizeF(8F, 20F);
AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
ClientSize = new System.Drawing.Size(590, 492);
ControlBox = false;
Controls.Add(tableLayoutPanel1);
FormBorderStyle = System.Windows.Forms.FormBorderStyle.None;
Icon = (System.Drawing.Icon)resources.GetObject("$this.Icon");
Name = "Welcome";
ShowInTaskbar = false;
StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
Text = "Welcome";
TopMost = true;
Load += Welcome_Load;
tableLayoutPanel1.ResumeLayout(false);
tableLayoutPanel2.ResumeLayout(false);
tableLayoutPanel2.PerformLayout();
((System.ComponentModel.ISupportInitialize)pbxLogo).EndInit();
flowLayoutPanel1.ResumeLayout(false);
flowLayoutPanel1.PerformLayout();
flowLayoutPanel2.ResumeLayout(false);
flowLayoutPanel2.PerformLayout();
ResumeLayout(false);
}
#endregion
private System.Windows.Forms.TableLayoutPanel tableLayoutPanel1;
private System.Windows.Forms.PictureBox pbxLogo;
private System.Windows.Forms.TableLayoutPanel tableLayoutPanel2;
private System.Windows.Forms.Label lblWelcome;
private System.Windows.Forms.FlowLayoutPanel flowLayoutPanel1;
private System.Windows.Forms.Label label1;
private System.Windows.Forms.Label label2;
private System.Windows.Forms.Button btnOpenFile;
private System.Windows.Forms.Button btnExit;
private System.Windows.Forms.FlowLayoutPanel flowLayoutPanel2;
private System.Windows.Forms.Button btnNewFile;
private System.Windows.Forms.Label label3;
private System.Windows.Forms.Label label4;
}
}

View File

@@ -0,0 +1,48 @@
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace CarManagerV3.Forms
{
public partial class Welcome : Form
{
// callback functions
// Open file
public Action OpenFileCallback;
public Action NewFileCallback;
public Welcome()
{
InitializeComponent();
}
private void Welcome_Load(object sender, EventArgs e)
{
}
private void btnOpenFile_Click(object sender, EventArgs e)
{
this.OpenFileCallback();
}
private void btnExit_Click(object sender, EventArgs e)
{
Environment.Exit(0);
}
private void btnNewFile_Click(object sender, EventArgs e)
{
this.NewFileCallback();
}
}
}

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,162 @@
using System;
using System.Drawing;
using System.Net;
using System.Windows.Forms;
using CarManagerV3.Forms;
namespace CarManagerV3
{
/// <summary>
/// The <c>ImageManager</c> class is responsible for managing car images, including fetching and storing them locally.
/// </summary>
internal class ImageManager
{
private static string _imagePath = Properties.Settings.Default.DataLocation + "\\images";
private static NetworkCredential myNetCred = null;
private static bool disableImageFetch = false;
/// <summary>
/// Initializes the image folder by creating it if it does not exist.
/// </summary>
public static void InitializeImageFolder()
{
_imagePath = Properties.Settings.Default.DataLocation + "\\images";
string path = _imagePath;
if (!System.IO.Directory.Exists(path))
{
System.IO.Directory.CreateDirectory(path);
}
// Do not catch here. If we cannot create our images folder, the program wont work.
}
/// <summary>
/// Generates the image path for a given car based on its attributes.
/// </summary>
/// <param name="car">The car.</param>
/// <returns>The image path for this Car.</returns>
public static string GetImagePath(Car car)
{
_imagePath = Properties.Settings.Default.DataLocation + "\\images";
string basePath = $"{_imagePath}/";
string fileName = $"{car.Make}_{car.Model}_{car.Year}_{car.Color}.png";
return basePath + fileName;
}
/// <summary>
/// Gets the image for a given car, fetching it if necessary.
/// </summary>
/// <param name="car">The car.</param>
/// <returns>The <see cref="Image"/> object for the car.</returns>
public static Image GetImage(Car car)
{
InitializeImageFolder();
FetchImage(car);
string path = GetImagePath(car);
// does image exist?
try
{
if (System.IO.File.Exists(path))
{
return Image.FromFile(path);
}
}
catch (Exception ex)
{
Console.Error.WriteLine($"Error loading image: {ex.Message}");
}
try
{
return Image.FromFile($"{_imagePath}/no_image_available.png");
}
catch (Exception ex)
{
Console.Error.WriteLine($"Error loading fallback image: {ex.Message}");
return null;
}
}
/// <summary>
/// Fetches an image for a Car from https://cdn.imagin.studio/getimage if it does not already exist locally and saves it to images/<c>Make_Model_Year_Color.webp</>.
/// If the image cannot be fetched, a placeholder image is used instead.
/// Uses example customer id "hrjavascript-mastery", because they wouldn't give me one. Stole this from a tutorial page. :)
/// </summary>
/// <param name="car">The car.</param>
public static void FetchImage(Car car)
{
// Fetch the image from https://cdn.imagin.studio/getimage and save it to images/Make_Model_Year.webp
// use params like this: ?customer=hrjavascript-mastery&zoomType=fullscreen&make={make}&modelFamily={model}&modelYear={year}&angle=front&paintDescription={color}&fileType=png
// check if the image already exists
string path = GetImagePath(car);
if (System.IO.File.Exists(path))
{
return;
}
if (disableImageFetch) return;
string url = $"https://cdn.imagin.studio/getimage?customer=hrjavascript-mastery&zoomType=fullscreen&make={car.Make}&modelFamily={car.Model}&modelYear={car.Year}&angle=front&paintDescription={car.Color}&fileType=png";
//add Referer header to avoid 403 error
using (var client = new System.Net.WebClient())
{
client.Headers.Add("Referer", "http://localhost");
try
{
client.Credentials = myNetCred;
client.Proxy.Credentials = myNetCred;
//DEBUG:: if (myNetCred == null) throw new WebException();
client.DownloadFile(url, path);
}
catch (WebException ex)
{
// is status code 407?
//if (ex.Response is HttpWebResponse response && response.StatusCode == HttpStatusCode.ProxyAuthenticationRequired)
//{
// Console.Error.WriteLine("Proxy authentication required. Prompting for credentials.");
//}
if (myNetCred != null)
{
DialogResult disableImgDialogRetry = MessageBox.Show("Something went wrong when fetching images. Are you credentials correct? Do you want to disable Image fetching for this session or rety with different credentials?", "Invalid Credentials", MessageBoxButtons.RetryCancel, MessageBoxIcon.Error);
if(disableImgDialogRetry == DialogResult.Cancel)
{
disableImageFetch = true;
return;
}
}
NetCredentials netCredForm = new NetCredentials();
DialogResult dialogRes = netCredForm.ShowDialog();
netCredForm.BringToFront();
netCredForm.Focus();
if (dialogRes == DialogResult.OK)
{
NetworkCredential netcred = netCredForm.GetCredentails();
myNetCred = netcred;
FetchImage(car);
return;
} else
{
DialogResult disableImgDialog = MessageBox.Show("Do you want to disable image fetching for this session?", "Disable Image fetching?", MessageBoxButtons.YesNo, MessageBoxIcon.Question);
if(disableImgDialog == DialogResult.Yes)
{
disableImageFetch = true;
} else
{
FetchImage(car);
return;
}
}
}
catch (Exception ex)
{
Console.Error.WriteLine(ex.Message);
// if error, use fallback image no_image_available.png
//System.IO.File.Copy($"{_imagePath}/no_image_available.png", path);
}
}
}
}
}

View File

@@ -0,0 +1,269 @@
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Windows.Forms;
namespace CarManagerV3
{
/// <summary>
/// Handles safe reading and writing of car data to files.
/// </summary>
internal class SafeManager
{
/// <summary>
/// The path of the txt file that contains recently opened file paths.
/// </summary>
private static string recentPathsFile = Properties.Settings.Default.DataLocation + "\\recent_paths.txt";
/// <summary>
/// Initializes a file at a specified path if it does not already exist.
/// </summary>
/// <param name="path">The path of the file.</param>
public static void InitializeFile(string path)
{
try
{
if (!File.Exists(@path))
{
using (StreamWriter writer = new StreamWriter(@path))
{
// Create the file, empty
//writer.WriteLine();
writer.Close();
}
}
}
catch (Exception ex)
{
Console.Error.WriteLine($"Error initializing file: {ex.Message}");
}
}
/// <summary>
/// Initializes a file and its parent folders at a specified path if they do not already exist.
/// </summary>
/// <param name="path">The path of the file.</param>
public static void initializeFileAndFolders(string path, bool folderOnly = false)
{
try
{
//string directory = Path.GetDirectoryName(path);
Console.WriteLine($"Initializing file and folders for path: {path}");
if (!Directory.Exists(path))
{
Directory.CreateDirectory(path);
}
if(!folderOnly) InitializeFile(path);
}
catch (Exception ex)
{
Console.Error.WriteLine($"Error initializing file and folders: {ex.Message}");
}
}
/// <summary>
/// Reads cars from a specified file path.
/// </summary>
/// <param name="path">The path.</param>
/// <returns>
/// A <see cref="List{Car}"/> containing the cars read from the file.
/// </returns>
public static List<Car> ReadCars(string path)
{
List<Car> cars = new List<Car>();
List<string> failedLines = new List<string>();
bool isLegacy = false;
try
{
using (StreamReader reader = new StreamReader(@path))
{
string line;
while ((line = reader.ReadLine()) != null)
{
// Process the line
if (line == "") continue;
if (Car.isLegacyCsvString(line))
{
if (!StateManager.askForMigration())
{
MessageBox.Show("The file you are trying to open is in an old format that is no longer supported. Please select a different file.", "Unsupported Format", MessageBoxButtons.OK, MessageBoxIcon.Error);
throw new LegacyException();
//Environment.Exit(0);
}
else
{
isLegacy = true;
}
}
Car tmp = Car.FromCsvString(line);
if (tmp == null)
{
failedLines.Add(line);
continue;
}
cars.Add(tmp);
}
reader.Close();
}
}
catch (LegacyException ex)
{
throw ex;
}
catch (Exception ex)
{
Console.Error.WriteLine($"Error reading cars from file: {ex.Message}");
}
if (failedLines.Count > 0)
{
Console.Error.WriteLine($"Warning: {failedLines.Count} lines could not be parsed and were skipped.");
foreach (string failedLine in failedLines)
{
Console.Error.WriteLine($"Failed line: {failedLine}");
}
MessageBox.Show($"Warning: {failedLines.Count} lines in the file could not be parsed and were skipped. Check the console for details.", "Parsing Warning", MessageBoxButtons.OK, MessageBoxIcon.Warning);
}
cars = StateManager.normalizeOrders(cars);
cars = cars.OrderBy(c => c.Order).ToList();
if (isLegacy)
{
SafeManager.SaveCars(path, cars);
}
return cars;
}
/// <summary>
/// Saves the cars to a specified file path.
/// </summary>
/// <param name="path">The path.</param>
/// <param name="cars">A <see cref="List{Car}"/> containing all cars to save.</param>
public static void SaveCars(string path, List<Car> cars)
{
try
{
using (StreamWriter writer = new StreamWriter(@path))
{
foreach (Car car in cars)
{
writer.WriteLine(car.ToCsvString());
}
writer.Close();
}
}
catch (Exception ex)
{
Console.Error.WriteLine($"Error saving cars to file: {ex.Message}");
MessageBox.Show($"Error saving cars to file: {ex.Message}", "Save Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
}
}
/// <summary>
/// Adds a file path to the recent paths list.
/// If a path is already in the list, it is moved to the top.
/// Otherwise, it is added to the top.
/// Keeps only the 5 most recent paths.
/// </summary>
/// <param name="path">The path.</param>
public static void AddRecentPath(string path)
{
List<string> paths = new List<string>();
try
{
paths = GetRecentPaths();
paths.Remove(path);
paths.Insert(0, path);
if (paths.Count > 5)
{
paths = paths.Take(5).ToList();
}
using (StreamWriter writer = new StreamWriter(recentPathsFile))
{
foreach (string p in paths)
{
writer.WriteLine(p);
}
writer.Close();
}
}
catch (Exception ex)
{
Console.Error.WriteLine($"Error managing recent paths: {ex.Message}");
}
}
/// <summary>
/// Gets the recently opened file paths.
/// </summary>
/// <returns>
/// A <see cref="List{String}"/> containing the recent file paths.
/// </returns>
public static List<string> GetRecentPaths()
{
List<string> paths = new List<string>();
try
{
recentPathsFile = Properties.Settings.Default.DataLocation + "\\recent_paths.txt";
initializeFileAndFolders(recentPathsFile);
if (File.Exists(recentPathsFile)) //TODO: Remove
{
using (StreamReader reader = new StreamReader(recentPathsFile))
{
string line;
while ((line = reader.ReadLine()) != null)
{
paths.Add(line);
}
reader.Close();
}
}
}
catch (Exception ex)
{
Console.Error.WriteLine($"Error reading recent paths: {ex.Message}");
}
return paths;
}
/// <summary>
/// Gets the folder of the most recently opened file.
/// </summary>
/// <returns>
/// The folder path of the most recently opened file, or the users documents folder if no recent files.
/// </returns>
public static string getRecentFolder()
{
List<string> recentPaths = GetRecentPaths();
if (recentPaths.Count > 0)
{
string recentFile = recentPaths[0];
if (File.Exists(recentFile))
{
return Path.GetDirectoryName(recentFile);
}
}
return Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments);
}
/// <summary>
/// Clears the recently opened file paths list by deleting the recent paths file.
/// </summary>
public static void ClearRecentPaths()
{
try
{
if (File.Exists(recentPathsFile))
{
File.Delete(recentPathsFile);
}
}
catch (Exception ex)
{
Console.Error.WriteLine($"Error clearing recent paths: {ex.Message}");
}
}
}
}

View File

@@ -0,0 +1,154 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Windows.Forms;
namespace CarManagerV3
{
// Could be made non-static / non-singleton if multiple collections are needed in the future. Not likely though.
/// <summary>
/// The <c>StateManager</c> class is responsible for managing the state of the car collection, including adding, removing, updating, and retrieving cars.
/// Fully static / singleton at the moment, as only one collection is needed.
/// </summary>
internal class StateManager
{
// Initialize global static list of cars
static List<Car> cars = new List<Car>();
// Initialize default file path for car data.
static string filePath = "";
static bool hasConfirmedMigration = false;
/// <summary>
/// Gets a car by its identifier.
/// </summary>
/// <param name="id">The identifier.</param>
/// <returns>
/// A <see cref="Car"/> object if found; otherwise, null.
/// </returns>
public static Car GetCarById(string id)
{
cars = SafeManager.ReadCars(filePath);
return cars.FirstOrDefault(c => c.Id == id);
}
/// <summary>
/// Public getter and setter for the cars list. Used to have better control over the list.
/// </summary>
/// <value>
/// The cars.
/// </value>
public static List<Car> Cars { get { return cars; } set { cars = value; } }
/// <summary>
/// Adds a car to the collection.
/// </summary>
/// <param name="car">The <see cref="Car"/> to add.</param>
public static void AddCar(Car car)
{
cars = SafeManager.ReadCars(filePath);
cars.Add(car);
SafeManager.SaveCars(filePath, cars);
}
/// <summary>
/// Removes a car from the collection.
/// </summary>
/// <param name="car">The <see cref="Car"/> to remove.</param>
public static void RemoveCar(Car car)
{
cars = SafeManager.ReadCars(filePath);
Car existingCar = GetCarById(car.Id);
if (existingCar == null) return;
cars.Remove(existingCar);
SafeManager.SaveCars(filePath, cars);
}
/// <summary>
/// Updates a car in the collection. Identifies itself by its Id.
/// </summary>
/// <remarks>
/// If the car's Id has changed during editing, this will not work correctly. Keep Id immutable!
/// </remarks>
/// <param name="car">The <see cref="Car"/> to update.</param>
public static void UpdateCar(Car car)
{
Car existingCar = GetCarById(car.Id);
if (existingCar != null)
{
int index = cars.IndexOf(existingCar);
cars[index] = car;
Console.WriteLine("Updated car: " + existingCar.Id);
SafeManager.SaveCars(filePath, cars);
}
}
/// <summary>
/// Creates a new car and adds it to the collection.
/// </summary>
/// <param name="make">The make.</param>
/// <param name="model">The model.</param>
/// <param name="year">The year.</param>
/// <param name="color">The color.</param>
/// <param name="mileage">The mileage.</param>
/// <param name="price">The price.</param>
/// <returns>
/// The newly created <see cref="Car"/> object.
/// </returns>
public static Car CreateCar(string make, string model, int year, string color, int mileage, decimal price)
{
cars = SafeManager.ReadCars(filePath);
int newOrder = cars.Count > 0 ? cars.Max(c => c.Order) + 1 : 1;
Car newCar = new Car("", make, model, year, color, mileage, price, newOrder);
AddCar(newCar);
return newCar;
}
/// <summary>
/// Sets the file path used for saving and loading car data.
/// Called when user selects a new file path.
/// </summary>
/// <param name="path">The path.</param>
public static void setFilePath(string path)
{
// Reset migration confirmation when changing file path, as the new file may also require migration.
hasConfirmedMigration = false;
filePath = path;
}
/// <summary>
/// Normalizes the orders of the cars in the collection to be sequential starting from 1, while keeping the relative order the same.
/// </summary>
/// <param name="cars">The list of <see cref="Car"/>s.</param>
/// <returns>A normalized List of <see cref="Car"/>s </returns>
public static List<Car> normalizeOrders(List<Car> cars)
{
// Normalize the Order field of all cars to be sequential starting from 1, while keeping the relative order the same.
var orderedCars = cars.OrderBy(c => c.Order).ToList();
for (int i = 0; i < orderedCars.Count; i++)
{
orderedCars[i].Order = i + 1;
}
return orderedCars;
}
/// <summary>
/// Prompts the user to confirm migration if they haven't already confirmed it for the current session.
/// This is to prevent multiple annoying popups if the user tries to open multiple files that require migration.
/// </summary>
/// <returns>True if the user has accepted to migrate the file, otherwise False</returns>
public static bool askForMigration()
{
if (hasConfirmedMigration)
{
return true;
}
DialogResult result = MessageBox.Show("The file you are trying to open is in an older format. Do you want to attempt to migrate it to the new format? If you choose not to migrate, the file will not be opened.", "Migration Needed", MessageBoxButtons.YesNo, MessageBoxIcon.Warning);
hasConfirmedMigration = result == DialogResult.Yes;
return hasConfirmedMigration;
}
}
}

View File

@@ -0,0 +1,197 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Reflection;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace CarManagerV3.Manager
{
internal class Updater
{
private static readonly string GitApiUrl = "https://git.jaro.digital/api/v1";
private static readonly string GitRepoOwner = "frozd";
private static readonly string GitRepoName = "carmanager-3";
private static readonly string GitApiRepoUrl = $"{GitApiUrl}/repos/{GitRepoOwner}/{GitRepoName}";
private static readonly string LatestReleaseEndpoint = $"{GitApiRepoUrl}/releases/latest";
private static readonly string PreReleaseEndpoint = $"{GitApiRepoUrl}/releases?limit=1&pre-release=true";
private static string latestVersionCache = null;
private static DateTime lastChecked = DateTime.MinValue;
private static readonly int CacheDurationMinutes = 60;
private static bool cacheIncludesPrerelease = false;
private static readonly string debugVersion = null;//"1.2.0";
public static string GetCurrentVersion()
{
//DEBUG::
if(debugVersion != null)
{
return debugVersion;
}
var asm = Assembly.GetEntryAssembly()!;
Version v = asm.GetName().Version ?? new Version(0, 0, 0, 0);
return v.ToString();
}
private static bool IsCacheValid(bool includePreRelease = false)
{
return includePreRelease == cacheIncludesPrerelease && latestVersionCache != null && (DateTime.Now - lastChecked).TotalMinutes < CacheDurationMinutes;
}
private static void InvalidateCache()
{
latestVersionCache = null;
lastChecked = DateTime.MinValue;
}
private static void SetCache(string version, bool includePreRelease = false)
{
latestVersionCache = version;
cacheIncludesPrerelease = includePreRelease;
lastChecked = DateTime.Now;
}
public static string GetLatestVersion(bool includePreRelease = false)
{
if (IsCacheValid(includePreRelease))
{
System.Diagnostics.Debug.WriteLine("Using cached latest version: " + latestVersionCache);
return latestVersionCache;
}
string latestVersion = null;
// Get the latest stable version first
using (var client = new System.Net.Http.HttpClient())
{
var response = client.GetAsync(LatestReleaseEndpoint).Result;
if (response.IsSuccessStatusCode)
{
var content = response.Content.ReadAsStringAsync().Result;
dynamic release = Newtonsoft.Json.JsonConvert.DeserializeObject(content);
latestVersion = release.tag_name;
}
}
// If pre-release is requested, check for the latest pre-release version
if (includePreRelease)
{
using (var client = new System.Net.Http.HttpClient())
{
var response = client.GetAsync(PreReleaseEndpoint).Result;
if (response.IsSuccessStatusCode)
{
var content = response.Content.ReadAsStringAsync().Result;
dynamic releases = Newtonsoft.Json.JsonConvert.DeserializeObject(content);
if (releases.Count > 0)
{
var preReleaseVersion = releases[0].tag_name;
// Compare versions and return the newer one
if (IsNewerVersion(preReleaseVersion, latestVersion))
{
latestVersion = preReleaseVersion;
}
}
}
}
}
SetCache(latestVersion, includePreRelease);
return latestVersion;
}
public static bool IsNewerVersion(string versionA, string versionB)
{
if (versionA == null) return false;
if (versionB == null) return true;
Version vA = new Version(versionA.TrimStart('v'));
Version vB = new Version(versionB.TrimStart('v'));
return vA > vB;
}
public static void DownloadNewestInstaller(bool includePreRelease = false)
{
string latestVersion = GetLatestVersion(includePreRelease);
if (latestVersion == null)
{
throw new Exception("Could not fetch latest version from Git API.");
}
string releaseUrl = $"{GitApiRepoUrl}/releases/tags/{latestVersion}";
using (var client = new System.Net.Http.HttpClient())
{
var response = client.GetAsync(releaseUrl).Result;
if (response.IsSuccessStatusCode)
{
var content = response.Content.ReadAsStringAsync().Result;
dynamic release = Newtonsoft.Json.JsonConvert.DeserializeObject(content);
string downloadUrl = null;
foreach (var asset in release.assets)
{
// file that ends with .msi
if (asset.name.ToString().EndsWith(".msi"))
{
downloadUrl = asset.browser_download_url;
break;
}
}
if (downloadUrl != null)
{
// Download the installer to the users set Data dir, run it, and then exit the application.
string tempFilePath = System.IO.Path.Combine(System.IO.Path.GetTempPath(), $"CarManagerInstaller_{latestVersion}.msi");
using (var downloadClient = new System.Net.WebClient())
{
downloadClient.DownloadFile(downloadUrl, tempFilePath);
}
// Use ProcessStartInfo with UseShellExecute to launch the MSI file
var processStartInfo = new System.Diagnostics.ProcessStartInfo
{
FileName = tempFilePath,
UseShellExecute = true
};
System.Diagnostics.Process.Start(processStartInfo);
Application.Exit();
}
else
{
throw new Exception("Could not find installer asset in the latest release.");
}
}
else
{
throw new Exception("Could not fetch release information from Git API.");
}
}
}
public static bool IsUpdateAvailable(bool includePreRelease = false)
{
string currentVersion = GetCurrentVersion();
string latestVersion = GetLatestVersion(includePreRelease);
return IsNewerVersion(latestVersion, currentVersion);
}
public static void openReleasePage(string version = null)
{
if(version == null)
{
version = GetLatestVersion(true);
}
string releaseUrl = $"https://git.jaro.digital/{GitRepoOwner}/{GitRepoName}/releases/tag/{version}";
System.Diagnostics.Process.Start(new System.Diagnostics.ProcessStartInfo
{
FileName = releaseUrl,
UseShellExecute = true
});
}
}
}

View File

@@ -1,10 +1,8 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using System.Diagnostics;
using System.Windows.Forms;
namespace CarManagerV2
namespace CarManagerV3
{
internal static class Program
{
@@ -12,11 +10,13 @@ namespace CarManagerV2
/// The main entry point for the application.
/// </summary>
[STAThread]
static void Main()
static void Main(string[] args)
{
string pathToOpen = null;
if (args.Length > 0) pathToOpen = args[0];
Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);
Application.Run(new MainForm());
Application.Run(new MainForm(pathToOpen));
}
}
}

View File

@@ -8,10 +8,10 @@
// </auto-generated>
//------------------------------------------------------------------------------
namespace CarManagerV2.Properties
{
namespace CarManagerV3.Properties {
using System;
/// <summary>
/// A strongly-typed resource class, for looking up localized strings, etc.
/// </summary>
@@ -19,51 +19,43 @@ namespace CarManagerV2.Properties
// class via a tool like ResGen or Visual Studio.
// To add or remove a member, edit your .ResX file then rerun ResGen
// with the /str option, or rebuild your VS project.
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "18.0.0.0")]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
internal class Resources
{
internal class Resources {
private static global::System.Resources.ResourceManager resourceMan;
private static global::System.Globalization.CultureInfo resourceCulture;
[global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
internal Resources()
{
internal Resources() {
}
/// <summary>
/// Returns the cached ResourceManager instance used by this class.
/// </summary>
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
internal static global::System.Resources.ResourceManager ResourceManager
{
get
{
if ((resourceMan == null))
{
global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("CarManagerV2.Properties.Resources", typeof(Resources).Assembly);
internal static global::System.Resources.ResourceManager ResourceManager {
get {
if (object.ReferenceEquals(resourceMan, null)) {
global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("CarManagerV3.Properties.Resources", typeof(Resources).Assembly);
resourceMan = temp;
}
return resourceMan;
}
}
/// <summary>
/// Overrides the current thread's CurrentUICulture property for all
/// resource lookups using this strongly typed resource class.
/// </summary>
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
internal static global::System.Globalization.CultureInfo Culture
{
get
{
internal static global::System.Globalization.CultureInfo Culture {
get {
return resourceCulture;
}
set
{
set {
resourceCulture = value;
}
}

View File

@@ -46,7 +46,7 @@
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Serialization.Formatters.Binary.BinaryFormatter
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
@@ -60,6 +60,7 @@
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
@@ -68,9 +69,10 @@
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" />
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
@@ -85,9 +87,10 @@
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" msdata:Ordinal="1" />
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
@@ -109,9 +112,16 @@
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<assembly alias="System.Windows.Forms" name="System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<data name="Icon_Add" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\Icon_Add.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="Icon_Search" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\Icon_Search.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
</root>

View File

@@ -0,0 +1,50 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Runtime Version:4.0.30319.42000
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
namespace CarManagerV3.Properties {
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "17.14.0.0")]
internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase {
private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
public static Settings Default {
get {
return defaultInstance;
}
}
[global::System.Configuration.UserScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Configuration.DefaultSettingValueAttribute("")]
public string DataLocation {
get {
return ((string)(this["DataLocation"]));
}
set {
this["DataLocation"] = value;
}
}
[global::System.Configuration.UserScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Configuration.DefaultSettingValueAttribute("False")]
public bool AllowPrerelease {
get {
return ((bool)(this["AllowPrerelease"]));
}
set {
this["AllowPrerelease"] = value;
}
}
}
}

View File

@@ -0,0 +1,12 @@
<?xml version='1.0' encoding='utf-8'?>
<SettingsFile xmlns="http://schemas.microsoft.com/VisualStudio/2004/01/settings" CurrentProfile="(Default)" GeneratedClassNamespace="CarManagerV3.Properties" GeneratedClassName="Settings">
<Profiles />
<Settings>
<Setting Name="DataLocation" Type="System.String" Scope="User">
<Value Profile="(Default)" />
</Setting>
<Setting Name="AllowPrerelease" Type="System.Boolean" Scope="User">
<Value Profile="(Default)">False</Value>
</Setting>
</Settings>
</SettingsFile>

View File

@@ -0,0 +1,7 @@
{
"profiles": {
"CarManagerV3": {
"commandName": "Project"
}
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 149 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 473 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 149 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 473 B

118
CarManagerV3/Util/CUID.cs Normal file
View File

@@ -0,0 +1,118 @@
using System;
using System.Buffers.Binary;
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
using System.Security.Cryptography;
using System.Text;
using System.Threading;
using System.Threading.Tasks;
namespace CarManagerV3.Util
{
internal class CUID
{
public const int DefaultLength = 6;
private static int _counter = RandomNumberGenerator.GetInt32(int.MaxValue);
/// <summary>
/// Generate a random CUID (Collision-resistant Unique Identifier) of a specified length.
/// The CUID is designed to be unique across different machines and time, making it suitable for use as an identifier for cars in the application.
/// The length must be between 4 and 32 characters to ensure a good balance between uniqueness and readability.
/// The generated CUID consists of a combination of alphanumeric characters to ensure uniqueness and readability.
/// </summary>
/// <param name="length">The desired length of the generated CUID</param>
/// <param name="prefixWithC">Whether to prefix the CUID with 'c' for better readability and to avoid starting with a digit.</param>"
/// <returns></returns>
public static string NewCUID(int length = DefaultLength, bool prefixWithC = true)
{
// CUIDv2 specs allow between 4 and 32 chars.
if(length < 4 || length > 32) throw new ArgumentOutOfRangeException("length");
// We will produce enough encoded chars to satisfy 'length' after prefixing and truncation.
// Base64 encodes 3 bytes -> 4 chars. So bytesNeeded ≈ ceil(charsNeeded * 3/4).
int charsNeeded = prefixWithC ? (length - 1) : length;
int bytesNeeded = (int)Math.Ceiling(charsNeeded * 3.0 / 4.0);
Span<byte> material = stackalloc byte[32];
FillMaterial(material);
byte[] outputBytes = ExpandWithSha256(material, bytesNeeded);
string encoded = Base64UrlEncode(outputBytes);
if (encoded.Length < charsNeeded)
{
// Extremely unlikely unless length is huge; ensure we have enough by expanding more.
// (Kept as a guard; for typical lengths like 24-64, you're fine.)
outputBytes = ExpandWithSha256(material, bytesNeeded + 32);
encoded = Base64UrlEncode(outputBytes);
}
string body = encoded.Substring(0, charsNeeded);
return prefixWithC ? ("c" + body) : body;
}
private static void FillMaterial(Span<byte> dst32)
{
// Compose a payload with:
// - 16 bytes random
// - 8 bytes timestamp (UTC ticks)
// - 4 bytes counter
// - 4 bytes process/thread noise
Span<byte> payload = stackalloc byte[16 + 8 + 4 + 4];
RandomNumberGenerator.Fill(payload.Slice(0, 16));
long ticks = DateTime.UtcNow.Ticks;
BinaryPrimitives.WriteInt64LittleEndian(payload.Slice(16, 8), ticks);
int c = Interlocked.Increment(ref _counter);
BinaryPrimitives.WriteInt32LittleEndian(payload.Slice(24, 4), c);
// Some extra variability (not relied on for security)
int noise = Environment.ProcessId ^ Thread.CurrentThread.ManagedThreadId ^ (int)Stopwatch.GetTimestamp();
BinaryPrimitives.WriteInt32LittleEndian(payload.Slice(28, 4), noise);
// Hash to produce 32 bytes of uniformly distributed output
SHA256.HashData(payload, dst32);
}
private static byte[] ExpandWithSha256(ReadOnlySpan<byte> seed32, int bytesNeeded)
{
if (bytesNeeded <= 0) return Array.Empty<byte>();
// If <= 32 bytes, we can just take from seed32 by hashing once more for separation.
// We'll use SHA256(seed || blockIndex) to generate blocks.
int blocks = (int)Math.Ceiling(bytesNeeded / 32.0);
byte[] result = new byte[blocks * 32];
Span<byte> input = stackalloc byte[32 + 4];
seed32.CopyTo(input.Slice(0, 32));
for (int i = 0; i < blocks; i++)
{
BinaryPrimitives.WriteInt32LittleEndian(input.Slice(32, 4), i);
Span<byte> block = result.AsSpan(i * 32, 32);
SHA256.HashData(input, block);
}
if (result.Length == bytesNeeded) return result;
byte[] trimmed = new byte[bytesNeeded];
Buffer.BlockCopy(result, 0, trimmed, 0, bytesNeeded);
return trimmed;
}
private static string Base64UrlEncode(byte[] bytes)
{
// Standard base64url without padding per RFC 4648 §5
string b64 = Convert.ToBase64String(bytes);
return b64.Replace('+', '-').Replace('/', '_').TrimEnd('=');
}
}
}

11
README.md Normal file
View File

@@ -0,0 +1,11 @@
![Logo](https://static.clsw.app/brands/carmgm/Logo/CarMgm_Logo@0.5.png "Logo")
# Car Manager 3
This is a simple school project in C# - Honestly you shouldn't be looking at this if you don't know me.
Hosted on [my own git server](https://git.jaro.digital/frozd/carmanager-3)
Documentation is in the works.