feat: file metadata
This commit is contained in:
105
CarManagerV3/Forms/MainForm.Designer.cs
generated
105
CarManagerV3/Forms/MainForm.Designer.cs
generated
@@ -30,7 +30,7 @@
|
||||
{
|
||||
components = new System.ComponentModel.Container();
|
||||
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(MainForm));
|
||||
tableLayoutPanel1 = new System.Windows.Forms.TableLayoutPanel();
|
||||
tlpWrapper = new System.Windows.Forms.TableLayoutPanel();
|
||||
flpCars = new System.Windows.Forms.FlowLayoutPanel();
|
||||
tlpControls = new System.Windows.Forms.TableLayoutPanel();
|
||||
btnNewCar = new System.Windows.Forms.Button();
|
||||
@@ -53,35 +53,40 @@
|
||||
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();
|
||||
tableLayoutPanel2 = new System.Windows.Forms.TableLayoutPanel();
|
||||
lblFileInfo = new System.Windows.Forms.Label();
|
||||
imageList1 = new System.Windows.Forms.ImageList(components);
|
||||
tlpWrapper.SuspendLayout();
|
||||
tlpControls.SuspendLayout();
|
||||
tlpSearch.SuspendLayout();
|
||||
((System.ComponentModel.ISupportInitialize)pbxSearch).BeginInit();
|
||||
menuStrip1.SuspendLayout();
|
||||
tableLayoutPanel2.SuspendLayout();
|
||||
SuspendLayout();
|
||||
//
|
||||
// tableLayoutPanel1
|
||||
// tlpWrapper
|
||||
//
|
||||
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;
|
||||
tlpWrapper.ColumnCount = 1;
|
||||
tlpWrapper.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 100F));
|
||||
tlpWrapper.Controls.Add(flpCars, 0, 2);
|
||||
tlpWrapper.Controls.Add(tlpControls, 0, 1);
|
||||
tlpWrapper.Controls.Add(menuStrip1, 0, 0);
|
||||
tlpWrapper.Controls.Add(tableLayoutPanel2, 0, 3);
|
||||
tlpWrapper.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
tlpWrapper.Location = new System.Drawing.Point(0, 0);
|
||||
tlpWrapper.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4);
|
||||
tlpWrapper.Name = "tlpWrapper";
|
||||
tlpWrapper.RowCount = 4;
|
||||
tlpWrapper.RowStyles.Add(new System.Windows.Forms.RowStyle());
|
||||
tlpWrapper.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 50F));
|
||||
tlpWrapper.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 100F));
|
||||
tlpWrapper.RowStyles.Add(new System.Windows.Forms.RowStyle());
|
||||
tlpWrapper.Size = new System.Drawing.Size(902, 653);
|
||||
tlpWrapper.TabIndex = 0;
|
||||
tlpWrapper.Paint += tableLayoutPanel1_Paint;
|
||||
//
|
||||
// flpCars
|
||||
//
|
||||
@@ -91,7 +96,7 @@
|
||||
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.Size = new System.Drawing.Size(896, 541);
|
||||
flpCars.TabIndex = 1;
|
||||
//
|
||||
// tlpControls
|
||||
@@ -292,14 +297,6 @@
|
||||
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 });
|
||||
@@ -310,23 +307,57 @@
|
||||
// checkForUpdatesToolStripMenuItem
|
||||
//
|
||||
checkForUpdatesToolStripMenuItem.Name = "checkForUpdatesToolStripMenuItem";
|
||||
checkForUpdatesToolStripMenuItem.Size = new System.Drawing.Size(224, 26);
|
||||
checkForUpdatesToolStripMenuItem.Size = new System.Drawing.Size(213, 26);
|
||||
checkForUpdatesToolStripMenuItem.Text = "Check for Updates";
|
||||
checkForUpdatesToolStripMenuItem.Click += checkForUpdatesToolStripMenuItem_Click;
|
||||
//
|
||||
// gitRepositoryToolStripMenuItem
|
||||
//
|
||||
gitRepositoryToolStripMenuItem.Name = "gitRepositoryToolStripMenuItem";
|
||||
gitRepositoryToolStripMenuItem.Size = new System.Drawing.Size(224, 26);
|
||||
gitRepositoryToolStripMenuItem.Size = new System.Drawing.Size(213, 26);
|
||||
gitRepositoryToolStripMenuItem.Text = "Git Repository";
|
||||
gitRepositoryToolStripMenuItem.Click += gitRepositoryToolStripMenuItem_Click;
|
||||
//
|
||||
// tableLayoutPanel2
|
||||
//
|
||||
tableLayoutPanel2.AutoSize = true;
|
||||
tableLayoutPanel2.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink;
|
||||
tableLayoutPanel2.ColumnCount = 2;
|
||||
tableLayoutPanel2.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle());
|
||||
tableLayoutPanel2.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 20F));
|
||||
tableLayoutPanel2.Controls.Add(lblFileInfo, 0, 0);
|
||||
tableLayoutPanel2.Dock = System.Windows.Forms.DockStyle.Bottom;
|
||||
tableLayoutPanel2.Location = new System.Drawing.Point(3, 630);
|
||||
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(896, 20);
|
||||
tableLayoutPanel2.TabIndex = 4;
|
||||
//
|
||||
// lblFileInfo
|
||||
//
|
||||
lblFileInfo.AutoSize = true;
|
||||
lblFileInfo.ForeColor = System.Drawing.SystemColors.ActiveBorder;
|
||||
lblFileInfo.Location = new System.Drawing.Point(3, 0);
|
||||
lblFileInfo.Name = "lblFileInfo";
|
||||
lblFileInfo.Size = new System.Drawing.Size(150, 20);
|
||||
lblFileInfo.TabIndex = 0;
|
||||
lblFileInfo.Text = "No File info available";
|
||||
//
|
||||
// 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");
|
||||
//
|
||||
// MainForm
|
||||
//
|
||||
AutoScaleDimensions = new System.Drawing.SizeF(8F, 20F);
|
||||
AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
ClientSize = new System.Drawing.Size(902, 653);
|
||||
Controls.Add(tableLayoutPanel1);
|
||||
Controls.Add(tlpWrapper);
|
||||
Icon = (System.Drawing.Icon)resources.GetObject("$this.Icon");
|
||||
MainMenuStrip = menuStrip1;
|
||||
Margin = new System.Windows.Forms.Padding(3, 4, 3, 4);
|
||||
@@ -334,21 +365,23 @@
|
||||
Name = "MainForm";
|
||||
StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
|
||||
Text = "Carmanager 3";
|
||||
tableLayoutPanel1.ResumeLayout(false);
|
||||
tableLayoutPanel1.PerformLayout();
|
||||
tlpWrapper.ResumeLayout(false);
|
||||
tlpWrapper.PerformLayout();
|
||||
tlpControls.ResumeLayout(false);
|
||||
tlpSearch.ResumeLayout(false);
|
||||
tlpSearch.PerformLayout();
|
||||
((System.ComponentModel.ISupportInitialize)pbxSearch).EndInit();
|
||||
menuStrip1.ResumeLayout(false);
|
||||
menuStrip1.PerformLayout();
|
||||
tableLayoutPanel2.ResumeLayout(false);
|
||||
tableLayoutPanel2.PerformLayout();
|
||||
ResumeLayout(false);
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
private System.Windows.Forms.TableLayoutPanel tableLayoutPanel1;
|
||||
private System.Windows.Forms.TableLayoutPanel tlpWrapper;
|
||||
private System.Windows.Forms.FlowLayoutPanel flpCars;
|
||||
private System.Windows.Forms.TableLayoutPanel tlpControls;
|
||||
private System.Windows.Forms.TextBox tbxSearch;
|
||||
@@ -375,5 +408,7 @@
|
||||
private System.Windows.Forms.ToolStripMenuItem aboutToolStripMenuItem;
|
||||
private System.Windows.Forms.ToolStripMenuItem checkForUpdatesToolStripMenuItem;
|
||||
private System.Windows.Forms.ToolStripMenuItem gitRepositoryToolStripMenuItem;
|
||||
private System.Windows.Forms.TableLayoutPanel tableLayoutPanel2;
|
||||
private System.Windows.Forms.Label lblFileInfo;
|
||||
}
|
||||
}
|
||||
@@ -4,6 +4,7 @@ using System.Data;
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows.Forms;
|
||||
using CarManagerV3.Classes;
|
||||
using CarManagerV3.Forms;
|
||||
using CarManagerV3.Manager;
|
||||
using CarManagerV3.Util;
|
||||
@@ -265,6 +266,16 @@ namespace CarManagerV3
|
||||
flpCars.Refresh();
|
||||
flpCars.Invalidate();
|
||||
flpCars.Update();
|
||||
refreshMeta();
|
||||
|
||||
|
||||
}
|
||||
|
||||
private void refreshMeta()
|
||||
{
|
||||
FileMeta meta = SafeManager.GetFileMeta(filepath);
|
||||
string version = Updater.GetCurrentVersion(true);
|
||||
lblFileInfo.Text = $"Car Manager 3 v.{version}, " + meta.ToString();
|
||||
}
|
||||
|
||||
|
||||
@@ -377,6 +388,7 @@ namespace CarManagerV3
|
||||
refreshCars(cars);
|
||||
SafeManager.SaveCars(filepath, cars);
|
||||
MessageBox.Show("File saved successfully.", "Save File", MessageBoxButtons.OK, MessageBoxIcon.Information);
|
||||
refreshMeta();
|
||||
}
|
||||
|
||||
private void saveAsToolStripMenuItem_Click(object sender, EventArgs e)
|
||||
|
||||
@@ -117,9 +117,6 @@
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<metadata name="menuStrip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>17, 17</value>
|
||||
</metadata>
|
||||
<assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
|
||||
<data name="btnNewCar.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>
|
||||
@@ -142,6 +139,9 @@
|
||||
VXs21p8MAVc2KdQAvwAAAABJRU5ErkJggg==
|
||||
</value>
|
||||
</data>
|
||||
<metadata name="menuStrip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>17, 17</value>
|
||||
</metadata>
|
||||
<metadata name="imageList1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>153, 17</value>
|
||||
</metadata>
|
||||
@@ -150,15 +150,15 @@
|
||||
AAEAAAD/////AQAAAAAAAAAMAgAAAEZTeXN0ZW0uV2luZG93cy5Gb3JtcywgQ3VsdHVyZT1uZXV0cmFs
|
||||
LCBQdWJsaWNLZXlUb2tlbj1iNzdhNWM1NjE5MzRlMDg5BQEAAAAmU3lzdGVtLldpbmRvd3MuRm9ybXMu
|
||||
SW1hZ2VMaXN0U3RyZWFtZXIBAAAABERhdGEHAgIAAAAJAwAAAA8DAAAAYAQAAAJNU0Z0AUkBTAIBAQIB
|
||||
AAG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