11 Commits

23 changed files with 11368 additions and 941 deletions

View File

@@ -0,0 +1,946 @@
"DeployProject"
{
"VSVersion" = "3:800"
"ProjectType" = "8:{978C614F-708E-4E1A-B201-565925725DBA}"
"IsWebType" = "8:FALSE"
"ProjectName" = "8:CarManager3Setup"
"LanguageId" = "3:1033"
"CodePage" = "3:1252"
"UILanguageId" = "3:1033"
"SccProjectName" = "8:"
"SccLocalPath" = "8:"
"SccAuxPath" = "8:"
"SccProvider" = "8:"
"Hierarchy"
{
"Entry"
{
"MsmKey" = "8:_39292C9AEE694F0B982DDECDC0233E12"
"OwnerKey" = "8:_UNDEFINED"
"MsmSig" = "8:_UNDEFINED"
}
"Entry"
{
"MsmKey" = "8:_A6F761D38264485ABAB61B553E1CAE3C"
"OwnerKey" = "8:_UNDEFINED"
"MsmSig" = "8:_UNDEFINED"
}
}
"Configurations"
{
"Debug"
{
"DisplayName" = "8:Debug"
"IsDebugOnly" = "11:TRUE"
"IsReleaseOnly" = "11:FALSE"
"OutputFilename" = "8:Debug\\CarManager3Setup.msi"
"PackageFilesAs" = "3:2"
"PackageFileSize" = "3:-2147483648"
"CabType" = "3:1"
"Compression" = "3:2"
"SignOutput" = "11:FALSE"
"CertificateFile" = "8:"
"PrivateKeyFile" = "8:"
"TimeStampServer" = "8:"
"InstallerBootstrapper" = "3:2"
"BootstrapperCfg:{63ACBE69-63AA-4F98-B2B6-99F9E24495F2}"
{
"Enabled" = "11:TRUE"
"PromptEnabled" = "11:TRUE"
"PrerequisitesLocation" = "2:1"
"Url" = "8:"
"ComponentsUrl" = "8:"
"Items"
{
"{EDC2488A-8267-493A-A98E-7D9C3B36CDF3}:.NETFramework,Version=v4.7.2"
{
"Name" = "8:Microsoft .NET Framework 4.7.2 (x86 and x64)"
"ProductCode" = "8:.NETFramework,Version=v4.7.2"
}
}
}
}
"Release"
{
"DisplayName" = "8:Release"
"IsDebugOnly" = "11:FALSE"
"IsReleaseOnly" = "11:TRUE"
"OutputFilename" = "8:Release\\Install CarManager3.msi"
"PackageFilesAs" = "3:2"
"PackageFileSize" = "3:-2147483648"
"CabType" = "3:1"
"Compression" = "3:2"
"SignOutput" = "11:FALSE"
"CertificateFile" = "8:"
"PrivateKeyFile" = "8:"
"TimeStampServer" = "8:"
"InstallerBootstrapper" = "3:2"
"BootstrapperCfg:{63ACBE69-63AA-4F98-B2B6-99F9E24495F2}"
{
"Enabled" = "11:TRUE"
"PromptEnabled" = "11:TRUE"
"PrerequisitesLocation" = "2:1"
"Url" = "8:"
"ComponentsUrl" = "8:"
"Items"
{
"{EDC2488A-8267-493A-A98E-7D9C3B36CDF3}:.NETFramework,Version=v4.7.2"
{
"Name" = "8:Microsoft .NET Framework 4.7.2 (x86 and x64)"
"ProductCode" = "8:.NETFramework,Version=v4.7.2"
}
}
}
}
}
"Deployable"
{
"CustomAction"
{
}
"DefaultFeature"
{
"Name" = "8:DefaultFeature"
"Title" = "8:"
"Description" = "8:"
}
"ExternalPersistence"
{
"LaunchCondition"
{
"{A06ECF26-33A3-4562-8140-9B0E340D4F24}:_BE6C175FA5824CB4993AB2FF72132415"
{
"Name" = "8:.NET Core"
"Message" = "8:[VSDNETCOREMSG]"
"AllowLaterVersions" = "11:FALSE"
"InstallUrl" = "8:https://dotnet.microsoft.com/download/dotnet-core/[NetCoreVerMajorDotMinor]"
"IsNETCore" = "11:TRUE"
"Architecture" = "2:0"
"Runtime" = "2:0"
}
}
}
"File"
{
"{1FB2D0AE-D3B9-43D4-B9DD-F88EC61E35DE}:_39292C9AEE694F0B982DDECDC0233E12"
{
"SourcePath" = "8:D:\\Assets\\Car Manager\\Icon\\CarMgm_Icon.ico"
"TargetName" = "8:CarMgm_Icon.ico"
"Tag" = "8:"
"Folder" = "8:_B69138933B80450EA18D704C54E8913F"
"Condition" = "8:"
"Transitive" = "11:FALSE"
"Vital" = "11:TRUE"
"ReadOnly" = "11:FALSE"
"Hidden" = "11:FALSE"
"System" = "11:FALSE"
"Permanent" = "11:FALSE"
"SharedLegacy" = "11:FALSE"
"PackageAs" = "3:1"
"Register" = "3:1"
"Exclude" = "11:FALSE"
"IsDependency" = "11:FALSE"
"IsolateTo" = "8:"
}
}
"FileType"
{
"{5EB83D71-FA18-4901-BE56-DE22E13CC478}:_550DF8606C6E4FA099435CFCBE58D1D0"
{
"Name" = "8:Car Manager CSV"
"Description" = "8:Car Manager CSV"
"Extensions" = "8:cars"
"MIME" = "8:"
"Icon" = "8:"
"IconIndex" = "3:0"
"Command"
{
"Command" = "8:_A6F761D38264485ABAB61B553E1CAE3C"
}
"Verbs"
{
"{95C0C507-CBF0-42B8-B119-07219E384A4A}:_1117291E39294ABF930F5B1B3ACA15FF"
{
"Command" = "8:&Open"
"Verb" = "8:open"
"Arguments" = "8:\"%1\""
"Order" = "3:0"
}
}
}
}
"Folder"
{
"{1525181F-901A-416C-8A58-119130FE478E}:_ABAAF45BA6E04B63AF93CAD41EE68B92"
{
"Name" = "8:#1919"
"AlwaysCreate" = "11:FALSE"
"Condition" = "8:"
"Transitive" = "11:FALSE"
"Property" = "8:ProgramMenuFolder"
"Folders"
{
}
}
"{3C67513D-01DD-4637-8A68-80971EB9504F}:_B69138933B80450EA18D704C54E8913F"
{
"DefaultLocation" = "8:[ProgramFilesFolder][Manufacturer]\\[ProductName]"
"Name" = "8:#1925"
"AlwaysCreate" = "11:FALSE"
"Condition" = "8:"
"Transitive" = "11:FALSE"
"Property" = "8:TARGETDIR"
"Folders"
{
}
}
"{1525181F-901A-416C-8A58-119130FE478E}:_FA92AB5FBB9E4B2A8DFF0A59BAB53C34"
{
"Name" = "8:#1916"
"AlwaysCreate" = "11:FALSE"
"Condition" = "8:"
"Transitive" = "11:FALSE"
"Property" = "8:DesktopFolder"
"Folders"
{
}
}
}
"LaunchCondition"
{
}
"Locator"
{
}
"MsiBootstrapper"
{
"LangId" = "3:1033"
"RequiresElevation" = "11:FALSE"
}
"Product"
{
"Name" = "8:Microsoft Visual Studio"
"ProductName" = "8:Car Manager 3"
"ProductCode" = "8:{00455F93-7F99-4B1E-A7CE-0DFE372CB230}"
"PackageCode" = "8:{0359946B-F979-4152-867A-D7CF98402C4B}"
"UpgradeCode" = "8:{6FF57925-465E-4DB9-85DA-CE933191A3DD}"
"AspNetVersion" = "8:2.0.50727.0"
"RestartWWWService" = "11:FALSE"
"RemovePreviousVersions" = "11:TRUE"
"DetectNewerInstalledVersion" = "11:TRUE"
"InstallAllUsers" = "11:FALSE"
"ProductVersion" = "8:1.2.0"
"Manufacturer" = "8:Jaro Digital"
"ARPHELPTELEPHONE" = "8:"
"ARPHELPLINK" = "8:"
"Title" = "8:CarManager3"
"Subject" = "8:"
"ARPCONTACT" = "8:Jaro Kaulmann"
"Keywords" = "8:"
"ARPCOMMENTS" = "8:"
"ARPURLINFOABOUT" = "8:gital"
"ARPPRODUCTICON" = "8:"
"ARPIconIndex" = "3:0"
"SearchPath" = "8:"
"UseSystemSearchPath" = "11:TRUE"
"TargetPlatform" = "3:0"
"PreBuildEvent" = "8:"
"PostBuildEvent" = "8:"
"RunPostBuildEvent" = "3:0"
}
"Registry"
{
"HKLM"
{
"Keys"
{
"{60EA8692-D2D5-43EB-80DC-7906BF13D6EF}:_5695532D502444BE91A0C478F8D7F9CB"
{
"Name" = "8:Software"
"Condition" = "8:"
"AlwaysCreate" = "11:FALSE"
"DeleteAtUninstall" = "11:FALSE"
"Transitive" = "11:FALSE"
"Keys"
{
"{60EA8692-D2D5-43EB-80DC-7906BF13D6EF}:_E2E34878519F4259A7572964E934FA77"
{
"Name" = "8:[Manufacturer]"
"Condition" = "8:"
"AlwaysCreate" = "11:FALSE"
"DeleteAtUninstall" = "11:FALSE"
"Transitive" = "11:FALSE"
"Keys"
{
}
"Values"
{
}
}
}
"Values"
{
}
}
}
}
"HKCU"
{
"Keys"
{
"{60EA8692-D2D5-43EB-80DC-7906BF13D6EF}:_4A70D52CC9C2400F846505F27696713A"
{
"Name" = "8:Software"
"Condition" = "8:"
"AlwaysCreate" = "11:FALSE"
"DeleteAtUninstall" = "11:FALSE"
"Transitive" = "11:FALSE"
"Keys"
{
"{60EA8692-D2D5-43EB-80DC-7906BF13D6EF}:_B6CDBBD5DEF74074A0062C2F0E2197CE"
{
"Name" = "8:[Manufacturer]"
"Condition" = "8:"
"AlwaysCreate" = "11:FALSE"
"DeleteAtUninstall" = "11:FALSE"
"Transitive" = "11:FALSE"
"Keys"
{
}
"Values"
{
}
}
}
"Values"
{
}
}
}
}
"HKCR"
{
"Keys"
{
"{60EA8692-D2D5-43EB-80DC-7906BF13D6EF}:_37652386F4D345FFA3F0F617A76421F0"
{
"Name" = "8:Applications"
"Condition" = "8:"
"AlwaysCreate" = "11:FALSE"
"DeleteAtUninstall" = "11:FALSE"
"Transitive" = "11:FALSE"
"Keys"
{
"{60EA8692-D2D5-43EB-80DC-7906BF13D6EF}:_176B5B9C59A3449C9E564030DCD0C0BD"
{
"Name" = "8:CarManagerV3.exe"
"Condition" = "8:"
"AlwaysCreate" = "11:FALSE"
"DeleteAtUninstall" = "11:TRUE"
"Transitive" = "11:TRUE"
"Keys"
{
}
"Values"
{
"{ADCFDA98-8FDD-45E4-90BC-E3D20B029870}:_177A4E06B837439982E11085B44BD4BF"
{
"Name" = "8:FriendlyAppName"
"Condition" = "8:"
"Transitive" = "11:FALSE"
"ValueTypes" = "3:1"
"Value" = "8:Car Manager 3"
}
}
}
}
"Values"
{
}
}
"{60EA8692-D2D5-43EB-80DC-7906BF13D6EF}:_94EBE5D4DC27454C9156875337C2D080"
{
"Name" = "8:JaroDigital.CarManager3.Csv"
"Condition" = "8:"
"AlwaysCreate" = "11:FALSE"
"DeleteAtUninstall" = "11:TRUE"
"Transitive" = "11:TRUE"
"Keys"
{
"{60EA8692-D2D5-43EB-80DC-7906BF13D6EF}:_EBFFAF07B72047058605B5960F00527A"
{
"Name" = "8:shell"
"Condition" = "8:"
"AlwaysCreate" = "11:FALSE"
"DeleteAtUninstall" = "11:FALSE"
"Transitive" = "11:FALSE"
"Keys"
{
"{60EA8692-D2D5-43EB-80DC-7906BF13D6EF}:_C0A862A608C941919D3197DE074DC280"
{
"Name" = "8:open"
"Condition" = "8:"
"AlwaysCreate" = "11:FALSE"
"DeleteAtUninstall" = "11:FALSE"
"Transitive" = "11:FALSE"
"Keys"
{
"{60EA8692-D2D5-43EB-80DC-7906BF13D6EF}:_4E4DFB1A4EB04BB6837C9BAF1C376DBE"
{
"Name" = "8:command"
"Condition" = "8:"
"AlwaysCreate" = "11:FALSE"
"DeleteAtUninstall" = "11:FALSE"
"Transitive" = "11:FALSE"
"Keys"
{
}
"Values"
{
"{ADCFDA98-8FDD-45E4-90BC-E3D20B029870}:_C09631E4A79F4A178C010713641E6D9B"
{
"Name" = "8:"
"Condition" = "8:"
"Transitive" = "11:FALSE"
"ValueTypes" = "3:1"
"Value" = "8:\"[TARGETDIR]CarManagerV3.exe\" \"%1\""
}
}
}
}
"Values"
{
}
}
}
"Values"
{
}
}
}
"Values"
{
"{ADCFDA98-8FDD-45E4-90BC-E3D20B029870}:_48B74901C81A43DCA0DE8B5491387241"
{
"Name" = "8:"
"Condition" = "8:"
"Transitive" = "11:FALSE"
"ValueTypes" = "3:1"
"Value" = "8:Car Manager CSV Document"
}
}
}
"{60EA8692-D2D5-43EB-80DC-7906BF13D6EF}:_C83D25AA8A514BC693E02BB6282D86FB"
{
"Name" = "8:.csv"
"Condition" = "8:"
"AlwaysCreate" = "11:FALSE"
"DeleteAtUninstall" = "11:FALSE"
"Transitive" = "11:FALSE"
"Keys"
{
"{60EA8692-D2D5-43EB-80DC-7906BF13D6EF}:_2F3AB5CFB25043E8B0AD0F968CA64ED2"
{
"Name" = "8:OpenWithProgids"
"Condition" = "8:"
"AlwaysCreate" = "11:FALSE"
"DeleteAtUninstall" = "11:FALSE"
"Transitive" = "11:FALSE"
"Keys"
{
}
"Values"
{
"{ADCFDA98-8FDD-45E4-90BC-E3D20B029870}:_D33BF451D707400587D22B1EE1294F66"
{
"Name" = "8:JaroDigital.CarManager3.Csv"
"Condition" = "8:"
"Transitive" = "11:TRUE"
"ValueTypes" = "3:1"
"Value" = "8:"
}
}
}
}
"Values"
{
}
}
}
}
"HKU"
{
"Keys"
{
}
}
"HKPU"
{
"Keys"
{
}
}
}
"Sequences"
{
}
"Shortcut"
{
"{970C0BB2-C7D0-45D7-ABFA-7EC378858BC0}:_103EABB0656F414B9F4AC9C2ABBCAF07"
{
"Name" = "8:Car Manager 3"
"Arguments" = "8:"
"Description" = "8:"
"ShowCmd" = "3:1"
"IconIndex" = "3:0"
"Transitive" = "11:FALSE"
"Target" = "8:_A6F761D38264485ABAB61B553E1CAE3C"
"Folder" = "8:_ABAAF45BA6E04B63AF93CAD41EE68B92"
"WorkingFolder" = "8:"
"Icon" = "8:_39292C9AEE694F0B982DDECDC0233E12"
"Feature" = "8:"
}
"{970C0BB2-C7D0-45D7-ABFA-7EC378858BC0}:_67294752AD0A4B2BB84AE5D2F31910D8"
{
"Name" = "8:Car Manager 3"
"Arguments" = "8:"
"Description" = "8:"
"ShowCmd" = "3:1"
"IconIndex" = "3:0"
"Transitive" = "11:FALSE"
"Target" = "8:_A6F761D38264485ABAB61B553E1CAE3C"
"Folder" = "8:_FA92AB5FBB9E4B2A8DFF0A59BAB53C34"
"WorkingFolder" = "8:"
"Icon" = "8:_39292C9AEE694F0B982DDECDC0233E12"
"Feature" = "8:"
}
}
"UserInterface"
{
"{DF760B10-853B-4699-99F2-AFF7185B4A62}:_3C7A5424D3B44E15AF63D1938BEAA93C"
{
"Name" = "8:#1902"
"Sequence" = "3:1"
"Attributes" = "3:3"
"Dialogs"
{
"{688940B3-5CA9-4162-8DEE-2993FA9D8CBC}:_E63E2F3512D74A9D92622595C6C2EC08"
{
"Sequence" = "3:100"
"DisplayName" = "8:Finished"
"UseDynamicProperties" = "11:TRUE"
"IsDependency" = "11:FALSE"
"SourcePath" = "8:<VsdDialogDir>\\VsdFinishedDlg.wid"
"Properties"
{
"BannerBitmap"
{
"Name" = "8:BannerBitmap"
"DisplayName" = "8:#1001"
"Description" = "8:#1101"
"Type" = "3:8"
"ContextData" = "8:Bitmap"
"Attributes" = "3:4"
"Setting" = "3:1"
"UsePlugInResources" = "11:TRUE"
}
"UpdateText"
{
"Name" = "8:UpdateText"
"DisplayName" = "8:#1058"
"Description" = "8:#1158"
"Type" = "3:15"
"ContextData" = "8:"
"Attributes" = "3:0"
"Setting" = "3:1"
"Value" = "8:#1258"
"DefaultValue" = "8:#1258"
"UsePlugInResources" = "11:TRUE"
}
}
}
}
}
"{DF760B10-853B-4699-99F2-AFF7185B4A62}:_5709F385CD4F49F39AC9BCBDAA62F1A3"
{
"Name" = "8:#1900"
"Sequence" = "3:2"
"Attributes" = "3:1"
"Dialogs"
{
"{688940B3-5CA9-4162-8DEE-2993FA9D8CBC}:_24E6E20ECF7B4AC2849B40B24F5D90FC"
{
"Sequence" = "3:100"
"DisplayName" = "8:Welcome"
"UseDynamicProperties" = "11:TRUE"
"IsDependency" = "11:FALSE"
"SourcePath" = "8:<VsdDialogDir>\\VsdAdminWelcomeDlg.wid"
"Properties"
{
"BannerBitmap"
{
"Name" = "8:BannerBitmap"
"DisplayName" = "8:#1001"
"Description" = "8:#1101"
"Type" = "3:8"
"ContextData" = "8:Bitmap"
"Attributes" = "3:4"
"Setting" = "3:1"
"UsePlugInResources" = "11:TRUE"
}
"CopyrightWarning"
{
"Name" = "8:CopyrightWarning"
"DisplayName" = "8:#1002"
"Description" = "8:#1102"
"Type" = "3:3"
"ContextData" = "8:"
"Attributes" = "3:0"
"Setting" = "3:1"
"Value" = "8:#1202"
"DefaultValue" = "8:#1202"
"UsePlugInResources" = "11:TRUE"
}
"Welcome"
{
"Name" = "8:Welcome"
"DisplayName" = "8:#1003"
"Description" = "8:#1103"
"Type" = "3:3"
"ContextData" = "8:"
"Attributes" = "3:0"
"Setting" = "3:1"
"Value" = "8:#1203"
"DefaultValue" = "8:#1203"
"UsePlugInResources" = "11:TRUE"
}
}
}
"{688940B3-5CA9-4162-8DEE-2993FA9D8CBC}:_96C7F5AF62F64FB1A24EA7328513009C"
{
"Sequence" = "3:300"
"DisplayName" = "8:Confirm Installation"
"UseDynamicProperties" = "11:TRUE"
"IsDependency" = "11:FALSE"
"SourcePath" = "8:<VsdDialogDir>\\VsdAdminConfirmDlg.wid"
"Properties"
{
"BannerBitmap"
{
"Name" = "8:BannerBitmap"
"DisplayName" = "8:#1001"
"Description" = "8:#1101"
"Type" = "3:8"
"ContextData" = "8:Bitmap"
"Attributes" = "3:4"
"Setting" = "3:1"
"UsePlugInResources" = "11:TRUE"
}
}
}
"{688940B3-5CA9-4162-8DEE-2993FA9D8CBC}:_BF080B513BE14E0DAACC8F31D019E0C9"
{
"Sequence" = "3:200"
"DisplayName" = "8:Installation Folder"
"UseDynamicProperties" = "11:TRUE"
"IsDependency" = "11:FALSE"
"SourcePath" = "8:<VsdDialogDir>\\VsdAdminFolderDlg.wid"
"Properties"
{
"BannerBitmap"
{
"Name" = "8:BannerBitmap"
"DisplayName" = "8:#1001"
"Description" = "8:#1101"
"Type" = "3:8"
"ContextData" = "8:Bitmap"
"Attributes" = "3:4"
"Setting" = "3:1"
"UsePlugInResources" = "11:TRUE"
}
}
}
}
}
"{DF760B10-853B-4699-99F2-AFF7185B4A62}:_623DA07241DE4E80A0D3628A79006B46"
{
"Name" = "8:#1901"
"Sequence" = "3:1"
"Attributes" = "3:2"
"Dialogs"
{
"{688940B3-5CA9-4162-8DEE-2993FA9D8CBC}:_EA3564EDF1A048A89692C4997EA31102"
{
"Sequence" = "3:100"
"DisplayName" = "8:Progress"
"UseDynamicProperties" = "11:TRUE"
"IsDependency" = "11:FALSE"
"SourcePath" = "8:<VsdDialogDir>\\VsdProgressDlg.wid"
"Properties"
{
"BannerBitmap"
{
"Name" = "8:BannerBitmap"
"DisplayName" = "8:#1001"
"Description" = "8:#1101"
"Type" = "3:8"
"ContextData" = "8:Bitmap"
"Attributes" = "3:4"
"Setting" = "3:1"
"UsePlugInResources" = "11:TRUE"
}
"ShowProgress"
{
"Name" = "8:ShowProgress"
"DisplayName" = "8:#1009"
"Description" = "8:#1109"
"Type" = "3:5"
"ContextData" = "8:1;True=1;False=0"
"Attributes" = "3:0"
"Setting" = "3:0"
"Value" = "3:1"
"DefaultValue" = "3:1"
"UsePlugInResources" = "11:TRUE"
}
}
}
}
}
"{2479F3F5-0309-486D-8047-8187E2CE5BA0}:_62E672AF70DD4D8AB3EB2C5A9BFE8AA3"
{
"UseDynamicProperties" = "11:FALSE"
"IsDependency" = "11:FALSE"
"SourcePath" = "8:<VsdDialogDir>\\VsdUserInterface.wim"
}
"{2479F3F5-0309-486D-8047-8187E2CE5BA0}:_92E8C73A5DE7418C8D75318D26BE27B0"
{
"UseDynamicProperties" = "11:FALSE"
"IsDependency" = "11:FALSE"
"SourcePath" = "8:<VsdDialogDir>\\VsdBasicDialogs.wim"
}
"{DF760B10-853B-4699-99F2-AFF7185B4A62}:_9EA13BBDAC6840E39D2A41108839D601"
{
"Name" = "8:#1902"
"Sequence" = "3:2"
"Attributes" = "3:3"
"Dialogs"
{
"{688940B3-5CA9-4162-8DEE-2993FA9D8CBC}:_943ADBC0FCFE4F33920D3C661562FBB6"
{
"Sequence" = "3:100"
"DisplayName" = "8:Finished"
"UseDynamicProperties" = "11:TRUE"
"IsDependency" = "11:FALSE"
"SourcePath" = "8:<VsdDialogDir>\\VsdAdminFinishedDlg.wid"
"Properties"
{
"BannerBitmap"
{
"Name" = "8:BannerBitmap"
"DisplayName" = "8:#1001"
"Description" = "8:#1101"
"Type" = "3:8"
"ContextData" = "8:Bitmap"
"Attributes" = "3:4"
"Setting" = "3:1"
"UsePlugInResources" = "11:TRUE"
}
}
}
}
}
"{DF760B10-853B-4699-99F2-AFF7185B4A62}:_AD8D3F7D88F94349947675C0D5DB334B"
{
"Name" = "8:#1900"
"Sequence" = "3:1"
"Attributes" = "3:1"
"Dialogs"
{
"{688940B3-5CA9-4162-8DEE-2993FA9D8CBC}:_152B71A00E0C40219C498C8AC811C061"
{
"Sequence" = "3:100"
"DisplayName" = "8:Welcome"
"UseDynamicProperties" = "11:TRUE"
"IsDependency" = "11:FALSE"
"SourcePath" = "8:<VsdDialogDir>\\VsdWelcomeDlg.wid"
"Properties"
{
"BannerBitmap"
{
"Name" = "8:BannerBitmap"
"DisplayName" = "8:#1001"
"Description" = "8:#1101"
"Type" = "3:8"
"ContextData" = "8:Bitmap"
"Attributes" = "3:4"
"Setting" = "3:1"
"UsePlugInResources" = "11:TRUE"
}
"CopyrightWarning"
{
"Name" = "8:CopyrightWarning"
"DisplayName" = "8:#1002"
"Description" = "8:#1102"
"Type" = "3:3"
"ContextData" = "8:"
"Attributes" = "3:0"
"Setting" = "3:1"
"Value" = "8:#1202"
"DefaultValue" = "8:#1202"
"UsePlugInResources" = "11:TRUE"
}
"Welcome"
{
"Name" = "8:Welcome"
"DisplayName" = "8:#1003"
"Description" = "8:#1103"
"Type" = "3:3"
"ContextData" = "8:"
"Attributes" = "3:0"
"Setting" = "3:1"
"Value" = "8:#1203"
"DefaultValue" = "8:#1203"
"UsePlugInResources" = "11:TRUE"
}
}
}
"{688940B3-5CA9-4162-8DEE-2993FA9D8CBC}:_4540297DA9974AE7BC68437E0F9FA2A1"
{
"Sequence" = "3:200"
"DisplayName" = "8:Installation Folder"
"UseDynamicProperties" = "11:TRUE"
"IsDependency" = "11:FALSE"
"SourcePath" = "8:<VsdDialogDir>\\VsdFolderDlg.wid"
"Properties"
{
"BannerBitmap"
{
"Name" = "8:BannerBitmap"
"DisplayName" = "8:#1001"
"Description" = "8:#1101"
"Type" = "3:8"
"ContextData" = "8:Bitmap"
"Attributes" = "3:4"
"Setting" = "3:1"
"UsePlugInResources" = "11:TRUE"
}
"InstallAllUsersVisible"
{
"Name" = "8:InstallAllUsersVisible"
"DisplayName" = "8:#1059"
"Description" = "8:#1159"
"Type" = "3:5"
"ContextData" = "8:1;True=1;False=0"
"Attributes" = "3:0"
"Setting" = "3:0"
"Value" = "3:1"
"DefaultValue" = "3:1"
"UsePlugInResources" = "11:TRUE"
}
}
}
"{688940B3-5CA9-4162-8DEE-2993FA9D8CBC}:_AA7545C3AC204A5B8FC42DB7EC8FF060"
{
"Sequence" = "3:300"
"DisplayName" = "8:Confirm Installation"
"UseDynamicProperties" = "11:TRUE"
"IsDependency" = "11:FALSE"
"SourcePath" = "8:<VsdDialogDir>\\VsdConfirmDlg.wid"
"Properties"
{
"BannerBitmap"
{
"Name" = "8:BannerBitmap"
"DisplayName" = "8:#1001"
"Description" = "8:#1101"
"Type" = "3:8"
"ContextData" = "8:Bitmap"
"Attributes" = "3:4"
"Setting" = "3:1"
"UsePlugInResources" = "11:TRUE"
}
}
}
}
}
"{DF760B10-853B-4699-99F2-AFF7185B4A62}:_DB6535CD087C4DCE8CBDE1A54CFB960A"
{
"Name" = "8:#1901"
"Sequence" = "3:2"
"Attributes" = "3:2"
"Dialogs"
{
"{688940B3-5CA9-4162-8DEE-2993FA9D8CBC}:_9015A0B2D587408F830EDB20D76C7166"
{
"Sequence" = "3:100"
"DisplayName" = "8:Progress"
"UseDynamicProperties" = "11:TRUE"
"IsDependency" = "11:FALSE"
"SourcePath" = "8:<VsdDialogDir>\\VsdAdminProgressDlg.wid"
"Properties"
{
"BannerBitmap"
{
"Name" = "8:BannerBitmap"
"DisplayName" = "8:#1001"
"Description" = "8:#1101"
"Type" = "3:8"
"ContextData" = "8:Bitmap"
"Attributes" = "3:4"
"Setting" = "3:1"
"UsePlugInResources" = "11:TRUE"
}
"ShowProgress"
{
"Name" = "8:ShowProgress"
"DisplayName" = "8:#1009"
"Description" = "8:#1109"
"Type" = "3:5"
"ContextData" = "8:1;True=1;False=0"
"Attributes" = "3:0"
"Setting" = "3:0"
"Value" = "3:1"
"DefaultValue" = "3:1"
"UsePlugInResources" = "11:TRUE"
}
}
}
}
}
}
"MergeModule"
{
}
"ProjectOutput"
{
"{5259A561-127C-4D43-A0A1-72F10C7B3BF8}:_A6F761D38264485ABAB61B553E1CAE3C"
{
"SourcePath" = "8:..\\CarManagerV3\\bin\\Release\\net8.0-windows\\win-x64\\publish\\CarManagerV3.exe"
"TargetName" = "8:"
"Tag" = "8:"
"Folder" = "8:_B69138933B80450EA18D704C54E8913F"
"Condition" = "8:"
"Transitive" = "11:FALSE"
"Vital" = "11:TRUE"
"ReadOnly" = "11:FALSE"
"Hidden" = "11:FALSE"
"System" = "11:FALSE"
"Permanent" = "11:FALSE"
"SharedLegacy" = "11:FALSE"
"PackageAs" = "3:1"
"Register" = "3:1"
"Exclude" = "11:FALSE"
"IsDependency" = "11:FALSE"
"IsolateTo" = "8:"
"ProjectOutputGroupRegister" = "3:1"
"OutputConfiguration" = "8:"
"OutputGroupCanonicalName" = "8:PublishItems"
"OutputProjectGuid" = "8:{93CA258B-A645-41A8-A24F-59036ABC173F}"
"ShowKeyOutput" = "11:TRUE"
"ExcludeFilters"
{
}
}
}
}
}

View File

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

View File

@@ -1,6 +1,8 @@
<Project Sdk="Microsoft.NET.Sdk"> <Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup> <PropertyGroup>
<TargetFramework>net8.0-windows</TargetFramework> <TargetFramework>net8.0-windows</TargetFramework>
<PublishSingleFile>true</PublishSingleFile>
<SelfContained>true</SelfContained>
<OutputType>WinExe</OutputType> <OutputType>WinExe</OutputType>
<PublishUrl>publish\</PublishUrl> <PublishUrl>publish\</PublishUrl>
<Install>true</Install> <Install>true</Install>
@@ -20,11 +22,22 @@
<GenerateAssemblyInfo>false</GenerateAssemblyInfo> <GenerateAssemblyInfo>false</GenerateAssemblyInfo>
<UseWindowsForms>true</UseWindowsForms> <UseWindowsForms>true</UseWindowsForms>
<ImportWindowsDesktopTargets>true</ImportWindowsDesktopTargets> <ImportWindowsDesktopTargets>true</ImportWindowsDesktopTargets>
<ApplicationIcon>CarMgm_Icon.ico</ApplicationIcon>
<AssemblyTitle>Car Manager 3</AssemblyTitle>
<Version>1.2</Version>
<AssemblyVersion>1.2.0</AssemblyVersion>
<FileVersion>1.2.0</FileVersion>
<Product>Car Manager 3</Product>
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>
<Compile Update="Forms\Components\CarCard.cs"> <Compile Update="Forms\Components\CarCard.cs">
<SubType>UserControl</SubType> <SubType>UserControl</SubType>
</Compile> </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="Microsoft.CSharp" Version="4.7.0" />
<PackageReference Include="System.Data.DataSetExtensions" Version="4.5.0" /> <PackageReference Include="System.Data.DataSetExtensions" Version="4.5.0" />
<PackageReference Include="System.Net.Http" Version="4.3.4" /> <PackageReference Include="System.Net.Http" Version="4.3.4" />
@@ -41,4 +54,13 @@
<Install>false</Install> <Install>false</Install>
</BootstrapperPackage> </BootstrapperPackage>
</ItemGroup> </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> </Project>

Binary file not shown.

After

Width:  |  Height:  |  Size: 264 KiB

View File

@@ -29,327 +29,315 @@
private void InitializeComponent() private void InitializeComponent()
{ {
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(CarDetailsForm)); System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(CarDetailsForm));
this.tableLayoutPanel1 = new System.Windows.Forms.TableLayoutPanel(); tableLayoutPanel1 = new System.Windows.Forms.TableLayoutPanel();
this.pbxCarImage = new System.Windows.Forms.PictureBox(); pbxCarImage = new System.Windows.Forms.PictureBox();
this.label1 = new System.Windows.Forms.Label(); label1 = new System.Windows.Forms.Label();
this.tbxMake = new System.Windows.Forms.TextBox(); tbxMake = new System.Windows.Forms.TextBox();
this.label2 = new System.Windows.Forms.Label(); label2 = new System.Windows.Forms.Label();
this.tbxModel = new System.Windows.Forms.TextBox(); tbxModel = new System.Windows.Forms.TextBox();
this.label3 = new System.Windows.Forms.Label(); label3 = new System.Windows.Forms.Label();
this.label4 = new System.Windows.Forms.Label(); label4 = new System.Windows.Forms.Label();
this.label5 = new System.Windows.Forms.Label(); label5 = new System.Windows.Forms.Label();
this.label6 = new System.Windows.Forms.Label(); label6 = new System.Windows.Forms.Label();
this.flowLayoutPanel1 = new System.Windows.Forms.FlowLayoutPanel(); flowLayoutPanel1 = new System.Windows.Forms.FlowLayoutPanel();
this.btnSave = new System.Windows.Forms.Button(); btnSave = new System.Windows.Forms.Button();
this.btnDelete = new System.Windows.Forms.Button(); btnDelete = new System.Windows.Forms.Button();
this.lblID = new System.Windows.Forms.Label(); lblID = new System.Windows.Forms.Label();
this.tbxColor = new System.Windows.Forms.TextBox(); tbxColor = new System.Windows.Forms.TextBox();
this.nudMileage = new System.Windows.Forms.NumericUpDown(); nudMileage = new System.Windows.Forms.NumericUpDown();
this.nudPrice = new System.Windows.Forms.NumericUpDown(); nudPrice = new System.Windows.Forms.NumericUpDown();
this.tableLayoutPanel2 = new System.Windows.Forms.TableLayoutPanel(); tableLayoutPanel2 = new System.Windows.Forms.TableLayoutPanel();
this.nudYear = new System.Windows.Forms.NumericUpDown(); nudYear = new System.Windows.Forms.NumericUpDown();
this.lblAge = new System.Windows.Forms.Label(); lblAge = new System.Windows.Forms.Label();
this.tbxAge = new System.Windows.Forms.TextBox(); tbxAge = new System.Windows.Forms.TextBox();
this.tableLayoutPanel1.SuspendLayout(); tableLayoutPanel1.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.pbxCarImage)).BeginInit(); ((System.ComponentModel.ISupportInitialize)pbxCarImage).BeginInit();
this.flowLayoutPanel1.SuspendLayout(); flowLayoutPanel1.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.nudMileage)).BeginInit(); ((System.ComponentModel.ISupportInitialize)nudMileage).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.nudPrice)).BeginInit(); ((System.ComponentModel.ISupportInitialize)nudPrice).BeginInit();
this.tableLayoutPanel2.SuspendLayout(); tableLayoutPanel2.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.nudYear)).BeginInit(); ((System.ComponentModel.ISupportInitialize)nudYear).BeginInit();
this.SuspendLayout(); SuspendLayout();
// //
// tableLayoutPanel1 // tableLayoutPanel1
// //
this.tableLayoutPanel1.AutoSize = true; tableLayoutPanel1.AutoSize = true;
this.tableLayoutPanel1.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink; tableLayoutPanel1.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink;
this.tableLayoutPanel1.ColumnCount = 2; tableLayoutPanel1.ColumnCount = 2;
this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle()); tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 70F));
this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle()); tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 100F));
this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 50F)); tableLayoutPanel1.Controls.Add(pbxCarImage, 0, 0);
this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 50F)); tableLayoutPanel1.Controls.Add(label1, 0, 1);
this.tableLayoutPanel1.Controls.Add(this.pbxCarImage, 0, 0); tableLayoutPanel1.Controls.Add(tbxMake, 1, 1);
this.tableLayoutPanel1.Controls.Add(this.label1, 0, 1); tableLayoutPanel1.Controls.Add(label2, 0, 2);
this.tableLayoutPanel1.Controls.Add(this.tbxMake, 1, 1); tableLayoutPanel1.Controls.Add(tbxModel, 1, 2);
this.tableLayoutPanel1.Controls.Add(this.label2, 0, 2); tableLayoutPanel1.Controls.Add(label3, 0, 3);
this.tableLayoutPanel1.Controls.Add(this.tbxModel, 1, 2); tableLayoutPanel1.Controls.Add(label4, 0, 4);
this.tableLayoutPanel1.Controls.Add(this.label3, 0, 3); tableLayoutPanel1.Controls.Add(label5, 0, 5);
this.tableLayoutPanel1.Controls.Add(this.label4, 0, 4); tableLayoutPanel1.Controls.Add(label6, 0, 6);
this.tableLayoutPanel1.Controls.Add(this.label5, 0, 5); tableLayoutPanel1.Controls.Add(flowLayoutPanel1, 0, 7);
this.tableLayoutPanel1.Controls.Add(this.label6, 0, 6); tableLayoutPanel1.Controls.Add(tbxColor, 1, 4);
this.tableLayoutPanel1.Controls.Add(this.flowLayoutPanel1, 0, 7); tableLayoutPanel1.Controls.Add(nudMileage, 1, 5);
this.tableLayoutPanel1.Controls.Add(this.tbxColor, 1, 4); tableLayoutPanel1.Controls.Add(nudPrice, 1, 6);
this.tableLayoutPanel1.Controls.Add(this.nudMileage, 1, 5); tableLayoutPanel1.Controls.Add(tableLayoutPanel2, 1, 3);
this.tableLayoutPanel1.Controls.Add(this.nudPrice, 1, 6); tableLayoutPanel1.Dock = System.Windows.Forms.DockStyle.Fill;
this.tableLayoutPanel1.Controls.Add(this.tableLayoutPanel2, 1, 3); tableLayoutPanel1.Location = new System.Drawing.Point(0, 0);
this.tableLayoutPanel1.Dock = System.Windows.Forms.DockStyle.Fill; tableLayoutPanel1.Margin = new System.Windows.Forms.Padding(3, 3, 26, 3);
this.tableLayoutPanel1.Location = new System.Drawing.Point(0, 0); tableLayoutPanel1.Name = "tableLayoutPanel1";
this.tableLayoutPanel1.Name = "tableLayoutPanel1"; tableLayoutPanel1.RowCount = 8;
this.tableLayoutPanel1.RowCount = 8; tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 188F));
this.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.Absolute, 28F));
this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 30F)); tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 28F));
this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 30F)); tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 28F));
this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 30F)); tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 28F));
this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 30F)); tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 28F));
this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 30F)); tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 28F));
this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 30F)); tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 38F));
this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 40F)); tableLayoutPanel1.Size = new System.Drawing.Size(469, 422);
this.tableLayoutPanel1.Size = new System.Drawing.Size(536, 450); tableLayoutPanel1.TabIndex = 0;
this.tableLayoutPanel1.TabIndex = 0;
// //
// pbxCarImage // pbxCarImage
// //
this.tableLayoutPanel1.SetColumnSpan(this.pbxCarImage, 2); tableLayoutPanel1.SetColumnSpan(pbxCarImage, 2);
this.pbxCarImage.Dock = System.Windows.Forms.DockStyle.Fill; pbxCarImage.Dock = System.Windows.Forms.DockStyle.Fill;
this.pbxCarImage.Image = ((System.Drawing.Image)(resources.GetObject("pbxCarImage.Image"))); pbxCarImage.Image = (System.Drawing.Image)resources.GetObject("pbxCarImage.Image");
this.pbxCarImage.Location = new System.Drawing.Point(3, 3); pbxCarImage.Location = new System.Drawing.Point(3, 3);
this.pbxCarImage.Name = "pbxCarImage"; pbxCarImage.Name = "pbxCarImage";
this.pbxCarImage.Size = new System.Drawing.Size(538, 194); pbxCarImage.Size = new System.Drawing.Size(463, 182);
this.pbxCarImage.SizeMode = System.Windows.Forms.PictureBoxSizeMode.Zoom; pbxCarImage.SizeMode = System.Windows.Forms.PictureBoxSizeMode.Zoom;
this.pbxCarImage.TabIndex = 0; pbxCarImage.TabIndex = 0;
this.pbxCarImage.TabStop = false; pbxCarImage.TabStop = false;
// //
// label1 // label1
// //
this.label1.AutoSize = true; label1.AutoSize = true;
this.label1.Dock = System.Windows.Forms.DockStyle.Fill; label1.Dock = System.Windows.Forms.DockStyle.Fill;
this.label1.Location = new System.Drawing.Point(3, 200); label1.Location = new System.Drawing.Point(3, 188);
this.label1.Name = "label1"; label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(59, 30); label1.Size = new System.Drawing.Size(64, 28);
this.label1.TabIndex = 1; label1.TabIndex = 1;
this.label1.Text = "Make:"; label1.Text = "Make:";
this.label1.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; label1.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
// //
// tbxMake // tbxMake
// //
this.tbxMake.Dock = System.Windows.Forms.DockStyle.Fill; tbxMake.Dock = System.Windows.Forms.DockStyle.Fill;
this.tbxMake.Location = new System.Drawing.Point(68, 203); tbxMake.Location = new System.Drawing.Point(73, 191);
this.tbxMake.Name = "tbxMake"; tbxMake.Name = "tbxMake";
this.tbxMake.Size = new System.Drawing.Size(473, 22); tbxMake.Size = new System.Drawing.Size(393, 23);
this.tbxMake.TabIndex = 1; tbxMake.TabIndex = 1;
this.tbxMake.TextChanged += new System.EventHandler(this.tbxMake_TextChanged); tbxMake.TextChanged += tbxMake_TextChanged;
this.tbxMake.Leave += new System.EventHandler(this.tbxMake_Leave); tbxMake.Leave += tbxMake_Leave;
// //
// label2 // label2
// //
this.label2.AutoSize = true; label2.AutoSize = true;
this.label2.Dock = System.Windows.Forms.DockStyle.Fill; label2.Dock = System.Windows.Forms.DockStyle.Fill;
this.label2.Location = new System.Drawing.Point(3, 230); label2.Location = new System.Drawing.Point(3, 216);
this.label2.Name = "label2"; label2.Name = "label2";
this.label2.Size = new System.Drawing.Size(59, 30); label2.Size = new System.Drawing.Size(64, 28);
this.label2.TabIndex = 3; label2.TabIndex = 3;
this.label2.Text = "Model:"; label2.Text = "Model:";
this.label2.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; label2.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
// //
// tbxModel // tbxModel
// //
this.tbxModel.Dock = System.Windows.Forms.DockStyle.Fill; tbxModel.Dock = System.Windows.Forms.DockStyle.Fill;
this.tbxModel.Location = new System.Drawing.Point(68, 233); tbxModel.Location = new System.Drawing.Point(73, 219);
this.tbxModel.Name = "tbxModel"; tbxModel.Name = "tbxModel";
this.tbxModel.Size = new System.Drawing.Size(473, 22); tbxModel.Size = new System.Drawing.Size(393, 23);
this.tbxModel.TabIndex = 2; tbxModel.TabIndex = 2;
this.tbxModel.TextChanged += new System.EventHandler(this.tbxModel_TextChanged); tbxModel.TextChanged += tbxModel_TextChanged;
this.tbxModel.Leave += new System.EventHandler(this.tbxModel_Leave); tbxModel.Leave += tbxModel_Leave;
// //
// label3 // label3
// //
this.label3.AutoSize = true; label3.AutoSize = true;
this.label3.Dock = System.Windows.Forms.DockStyle.Fill; label3.Dock = System.Windows.Forms.DockStyle.Fill;
this.label3.Location = new System.Drawing.Point(3, 260); label3.Location = new System.Drawing.Point(3, 244);
this.label3.Name = "label3"; label3.Name = "label3";
this.label3.Size = new System.Drawing.Size(59, 30); label3.Size = new System.Drawing.Size(64, 28);
this.label3.TabIndex = 5; label3.TabIndex = 5;
this.label3.Text = "Year:"; label3.Text = "Year:";
this.label3.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; label3.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
// //
// label4 // label4
// //
this.label4.AutoSize = true; label4.AutoSize = true;
this.label4.Dock = System.Windows.Forms.DockStyle.Fill; label4.Dock = System.Windows.Forms.DockStyle.Fill;
this.label4.Location = new System.Drawing.Point(3, 290); label4.Location = new System.Drawing.Point(3, 272);
this.label4.Name = "label4"; label4.Name = "label4";
this.label4.Size = new System.Drawing.Size(59, 30); label4.Size = new System.Drawing.Size(64, 28);
this.label4.TabIndex = 6; label4.TabIndex = 6;
this.label4.Text = "Color:"; label4.Text = "Color:";
this.label4.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; label4.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
// //
// label5 // label5
// //
this.label5.AutoSize = true; label5.AutoSize = true;
this.label5.Dock = System.Windows.Forms.DockStyle.Fill; label5.Dock = System.Windows.Forms.DockStyle.Fill;
this.label5.Location = new System.Drawing.Point(3, 320); label5.Location = new System.Drawing.Point(3, 300);
this.label5.Name = "label5"; label5.Name = "label5";
this.label5.Size = new System.Drawing.Size(59, 30); label5.Size = new System.Drawing.Size(64, 28);
this.label5.TabIndex = 7; label5.TabIndex = 7;
this.label5.Text = "Mileage:"; label5.Text = "Mileage:";
this.label5.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; label5.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
// //
// label6 // label6
// //
this.label6.AutoSize = true; label6.AutoSize = true;
this.label6.Dock = System.Windows.Forms.DockStyle.Fill; label6.Dock = System.Windows.Forms.DockStyle.Fill;
this.label6.Location = new System.Drawing.Point(3, 350); label6.Location = new System.Drawing.Point(3, 328);
this.label6.Name = "label6"; label6.Name = "label6";
this.label6.Size = new System.Drawing.Size(59, 30); label6.Size = new System.Drawing.Size(64, 28);
this.label6.TabIndex = 8; label6.TabIndex = 8;
this.label6.Text = "Price:"; label6.Text = "Price:";
this.label6.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; label6.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
// //
// flowLayoutPanel1 // flowLayoutPanel1
// //
this.tableLayoutPanel1.SetColumnSpan(this.flowLayoutPanel1, 2); tableLayoutPanel1.SetColumnSpan(flowLayoutPanel1, 2);
this.flowLayoutPanel1.Controls.Add(this.btnSave); flowLayoutPanel1.Controls.Add(btnSave);
this.flowLayoutPanel1.Controls.Add(this.btnDelete); flowLayoutPanel1.Controls.Add(btnDelete);
this.flowLayoutPanel1.Controls.Add(this.lblID); flowLayoutPanel1.Controls.Add(lblID);
this.flowLayoutPanel1.Dock = System.Windows.Forms.DockStyle.Fill; flowLayoutPanel1.Dock = System.Windows.Forms.DockStyle.Fill;
this.flowLayoutPanel1.FlowDirection = System.Windows.Forms.FlowDirection.RightToLeft; flowLayoutPanel1.FlowDirection = System.Windows.Forms.FlowDirection.RightToLeft;
this.flowLayoutPanel1.Location = new System.Drawing.Point(3, 383); flowLayoutPanel1.Location = new System.Drawing.Point(3, 359);
this.flowLayoutPanel1.Name = "flowLayoutPanel1"; flowLayoutPanel1.Name = "flowLayoutPanel1";
this.flowLayoutPanel1.Padding = new System.Windows.Forms.Padding(5); flowLayoutPanel1.Padding = new System.Windows.Forms.Padding(4);
this.flowLayoutPanel1.Size = new System.Drawing.Size(538, 64); flowLayoutPanel1.Size = new System.Drawing.Size(463, 60);
this.flowLayoutPanel1.TabIndex = 9; flowLayoutPanel1.TabIndex = 9;
// //
// btnSave // btnSave
// //
this.btnSave.Location = new System.Drawing.Point(450, 8); btnSave.Location = new System.Drawing.Point(386, 7);
this.btnSave.Name = "btnSave"; btnSave.Name = "btnSave";
this.btnSave.Size = new System.Drawing.Size(75, 23); btnSave.Size = new System.Drawing.Size(66, 22);
this.btnSave.TabIndex = 7; btnSave.TabIndex = 7;
this.btnSave.Text = "Save"; btnSave.Text = "Save";
this.btnSave.UseVisualStyleBackColor = true; btnSave.UseVisualStyleBackColor = true;
this.btnSave.Click += new System.EventHandler(this.btnSave_Click); btnSave.Click += btnSave_Click;
// //
// btnDelete // btnDelete
// //
this.btnDelete.Location = new System.Drawing.Point(369, 8); btnDelete.Location = new System.Drawing.Point(314, 7);
this.btnDelete.Name = "btnDelete"; btnDelete.Name = "btnDelete";
this.btnDelete.Size = new System.Drawing.Size(75, 23); btnDelete.Size = new System.Drawing.Size(66, 22);
this.btnDelete.TabIndex = 8; btnDelete.TabIndex = 8;
this.btnDelete.Text = "Delete"; btnDelete.Text = "Delete";
this.btnDelete.UseVisualStyleBackColor = true; btnDelete.UseVisualStyleBackColor = true;
this.btnDelete.Click += new System.EventHandler(this.btnDelete_Click); btnDelete.Click += btnDelete_Click;
// //
// lblID // lblID
// //
this.lblID.AutoSize = true; lblID.AutoSize = true;
this.lblID.Location = new System.Drawing.Point(343, 5); lblID.Location = new System.Drawing.Point(290, 4);
this.lblID.Name = "lblID"; lblID.Name = "lblID";
this.lblID.Size = new System.Drawing.Size(20, 16); lblID.Size = new System.Drawing.Size(18, 15);
this.lblID.TabIndex = 2; lblID.TabIndex = 2;
this.lblID.Text = "ID"; lblID.Text = "ID";
// //
// tbxColor // tbxColor
// //
this.tbxColor.Dock = System.Windows.Forms.DockStyle.Fill; tbxColor.Dock = System.Windows.Forms.DockStyle.Fill;
this.tbxColor.Location = new System.Drawing.Point(68, 293); tbxColor.Location = new System.Drawing.Point(73, 275);
this.tbxColor.Name = "tbxColor"; tbxColor.Name = "tbxColor";
this.tbxColor.Size = new System.Drawing.Size(473, 22); tbxColor.Size = new System.Drawing.Size(393, 23);
this.tbxColor.TabIndex = 4; tbxColor.TabIndex = 4;
this.tbxColor.TextChanged += new System.EventHandler(this.tbxColor_TextChanged); tbxColor.TextChanged += tbxColor_TextChanged;
this.tbxColor.Leave += new System.EventHandler(this.tbxColor_Leave); tbxColor.Leave += tbxColor_Leave;
// //
// nudMileage // nudMileage
// //
this.nudMileage.Location = new System.Drawing.Point(68, 323); nudMileage.Location = new System.Drawing.Point(73, 303);
this.nudMileage.Maximum = new decimal(new int[] { nudMileage.Maximum = new decimal(new int[] { 999999, 0, 0, 0 });
999999, nudMileage.Name = "nudMileage";
0, nudMileage.Size = new System.Drawing.Size(105, 23);
0, nudMileage.TabIndex = 5;
0}); nudMileage.ThousandsSeparator = true;
this.nudMileage.Name = "nudMileage"; nudMileage.ValueChanged += nudMileage_ValueChanged;
this.nudMileage.Size = new System.Drawing.Size(120, 22);
this.nudMileage.TabIndex = 5;
this.nudMileage.ThousandsSeparator = true;
this.nudMileage.ValueChanged += new System.EventHandler(this.nudMileage_ValueChanged);
// //
// nudPrice // nudPrice
// //
this.nudPrice.DecimalPlaces = 2; nudPrice.DecimalPlaces = 2;
this.nudPrice.Location = new System.Drawing.Point(68, 353); nudPrice.Location = new System.Drawing.Point(73, 331);
this.nudPrice.Maximum = new decimal(new int[] { nudPrice.Maximum = new decimal(new int[] { 999999, 0, 0, 0 });
999999, nudPrice.Name = "nudPrice";
0, nudPrice.Size = new System.Drawing.Size(105, 23);
0, nudPrice.TabIndex = 6;
0}); nudPrice.ThousandsSeparator = true;
this.nudPrice.Name = "nudPrice"; nudPrice.ValueChanged += nudPrice_ValueChanged;
this.nudPrice.Size = new System.Drawing.Size(120, 22);
this.nudPrice.TabIndex = 6;
this.nudPrice.ThousandsSeparator = true;
this.nudPrice.ValueChanged += new System.EventHandler(this.nudPrice_ValueChanged);
// //
// tableLayoutPanel2 // tableLayoutPanel2
// //
this.tableLayoutPanel2.ColumnCount = 3; tableLayoutPanel2.ColumnCount = 3;
this.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));
this.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));
this.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));
this.tableLayoutPanel2.Controls.Add(this.nudYear, 0, 0); tableLayoutPanel2.Controls.Add(nudYear, 0, 0);
this.tableLayoutPanel2.Controls.Add(this.lblAge, 1, 0); tableLayoutPanel2.Controls.Add(lblAge, 1, 0);
this.tableLayoutPanel2.Controls.Add(this.tbxAge, 2, 0); tableLayoutPanel2.Controls.Add(tbxAge, 2, 0);
this.tableLayoutPanel2.Dock = System.Windows.Forms.DockStyle.Fill; tableLayoutPanel2.Dock = System.Windows.Forms.DockStyle.Fill;
this.tableLayoutPanel2.Location = new System.Drawing.Point(68, 263); tableLayoutPanel2.Location = new System.Drawing.Point(73, 247);
this.tableLayoutPanel2.Name = "tableLayoutPanel2"; tableLayoutPanel2.Name = "tableLayoutPanel2";
this.tableLayoutPanel2.RowCount = 1; tableLayoutPanel2.RowCount = 1;
this.tableLayoutPanel2.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 100F)); tableLayoutPanel2.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 100F));
this.tableLayoutPanel2.Size = new System.Drawing.Size(473, 24); tableLayoutPanel2.Size = new System.Drawing.Size(393, 22);
this.tableLayoutPanel2.TabIndex = 10; tableLayoutPanel2.TabIndex = 10;
// //
// nudYear // nudYear
// //
this.nudYear.Location = new System.Drawing.Point(3, 3); nudYear.Location = new System.Drawing.Point(3, 3);
this.nudYear.Maximum = new decimal(new int[] { nudYear.Maximum = new decimal(new int[] { 3000, 0, 0, 0 });
3000, nudYear.Name = "nudYear";
0, nudYear.Size = new System.Drawing.Size(105, 23);
0, nudYear.TabIndex = 3;
0}); nudYear.ValueChanged += nudYear_ValueChanged;
this.nudYear.Name = "nudYear";
this.nudYear.Size = new System.Drawing.Size(120, 22);
this.nudYear.TabIndex = 3;
this.nudYear.ValueChanged += new System.EventHandler(this.nudYear_ValueChanged);
// //
// lblAge // lblAge
// //
this.lblAge.AutoSize = true; lblAge.AutoSize = true;
this.lblAge.Dock = System.Windows.Forms.DockStyle.Fill; lblAge.Dock = System.Windows.Forms.DockStyle.Fill;
this.lblAge.Location = new System.Drawing.Point(160, 0); lblAge.Location = new System.Drawing.Point(134, 0);
this.lblAge.Name = "lblAge"; lblAge.Name = "lblAge";
this.lblAge.RightToLeft = System.Windows.Forms.RightToLeft.No; lblAge.RightToLeft = System.Windows.Forms.RightToLeft.No;
this.lblAge.Size = new System.Drawing.Size(151, 24); lblAge.Size = new System.Drawing.Size(125, 22);
this.lblAge.TabIndex = 4; lblAge.TabIndex = 4;
this.lblAge.Text = "Age"; lblAge.Text = "Age";
this.lblAge.TextAlign = System.Drawing.ContentAlignment.MiddleRight; lblAge.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
// //
// tbxAge // tbxAge
// //
this.tbxAge.Enabled = false; tbxAge.Dock = System.Windows.Forms.DockStyle.Fill;
this.tbxAge.Location = new System.Drawing.Point(317, 3); tbxAge.Enabled = false;
this.tbxAge.Name = "tbxAge"; tbxAge.Location = new System.Drawing.Point(265, 3);
this.tbxAge.ReadOnly = true; tbxAge.Name = "tbxAge";
this.tbxAge.Size = new System.Drawing.Size(100, 22); tbxAge.ReadOnly = true;
this.tbxAge.TabIndex = 5; tbxAge.Size = new System.Drawing.Size(125, 23);
tbxAge.TabIndex = 5;
// //
// CarDetailsForm // CarDetailsForm
// //
this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 16F); AutoScaleDimensions = new System.Drawing.SizeF(7F, 15F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(536, 450); ClientSize = new System.Drawing.Size(469, 422);
this.Controls.Add(this.tableLayoutPanel1); Controls.Add(tableLayoutPanel1);
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog; FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog;
this.MaximizeBox = false; MaximizeBox = false;
this.Name = "CarDetailsForm"; Name = "CarDetailsForm";
this.Text = "Details"; Text = "Details";
this.tableLayoutPanel1.ResumeLayout(false); tableLayoutPanel1.ResumeLayout(false);
this.tableLayoutPanel1.PerformLayout(); tableLayoutPanel1.PerformLayout();
((System.ComponentModel.ISupportInitialize)(this.pbxCarImage)).EndInit(); ((System.ComponentModel.ISupportInitialize)pbxCarImage).EndInit();
this.flowLayoutPanel1.ResumeLayout(false); flowLayoutPanel1.ResumeLayout(false);
this.flowLayoutPanel1.PerformLayout(); flowLayoutPanel1.PerformLayout();
((System.ComponentModel.ISupportInitialize)(this.nudMileage)).EndInit(); ((System.ComponentModel.ISupportInitialize)nudMileage).EndInit();
((System.ComponentModel.ISupportInitialize)(this.nudPrice)).EndInit(); ((System.ComponentModel.ISupportInitialize)nudPrice).EndInit();
this.tableLayoutPanel2.ResumeLayout(false); tableLayoutPanel2.ResumeLayout(false);
this.tableLayoutPanel2.PerformLayout(); tableLayoutPanel2.PerformLayout();
((System.ComponentModel.ISupportInitialize)(this.nudYear)).EndInit(); ((System.ComponentModel.ISupportInitialize)nudYear).EndInit();
this.ResumeLayout(false); ResumeLayout(false);
this.PerformLayout(); PerformLayout();
} }

View File

@@ -28,22 +28,35 @@
/// </summary> /// </summary>
private void InitializeComponent() private void InitializeComponent()
{ {
components = new System.ComponentModel.Container();
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(MainForm)); System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(MainForm));
tableLayoutPanel1 = new System.Windows.Forms.TableLayoutPanel(); tableLayoutPanel1 = new System.Windows.Forms.TableLayoutPanel();
flpCars = new System.Windows.Forms.FlowLayoutPanel(); flpCars = new System.Windows.Forms.FlowLayoutPanel();
tableLayoutPanel2 = new System.Windows.Forms.TableLayoutPanel(); tlpControls = new System.Windows.Forms.TableLayoutPanel();
tbxSearch = new System.Windows.Forms.TextBox();
btnNewCar = new System.Windows.Forms.Button(); 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(); menuStrip1 = new System.Windows.Forms.MenuStrip();
fileToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); fileToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
openToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); openToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
saveToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); saveToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
saveAsToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); saveAsToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
importToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
recentFilesToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); recentFilesToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
revealInFileExplorerToolStripMenuItem = 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();
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);
tableLayoutPanel1.SuspendLayout(); tableLayoutPanel1.SuspendLayout();
tableLayoutPanel2.SuspendLayout(); tlpControls.SuspendLayout();
tlpSearch.SuspendLayout();
((System.ComponentModel.ISupportInitialize)pbxSearch).BeginInit();
menuStrip1.SuspendLayout(); menuStrip1.SuspendLayout();
SuspendLayout(); SuspendLayout();
// //
@@ -52,7 +65,7 @@
tableLayoutPanel1.ColumnCount = 1; tableLayoutPanel1.ColumnCount = 1;
tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 100F)); tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 100F));
tableLayoutPanel1.Controls.Add(flpCars, 0, 2); tableLayoutPanel1.Controls.Add(flpCars, 0, 2);
tableLayoutPanel1.Controls.Add(tableLayoutPanel2, 0, 1); tableLayoutPanel1.Controls.Add(tlpControls, 0, 1);
tableLayoutPanel1.Controls.Add(menuStrip1, 0, 0); tableLayoutPanel1.Controls.Add(menuStrip1, 0, 0);
tableLayoutPanel1.Dock = System.Windows.Forms.DockStyle.Fill; tableLayoutPanel1.Dock = System.Windows.Forms.DockStyle.Fill;
tableLayoutPanel1.Location = new System.Drawing.Point(0, 0); tableLayoutPanel1.Location = new System.Drawing.Point(0, 0);
@@ -62,7 +75,7 @@
tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle()); 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(System.Windows.Forms.SizeType.Absolute, 50F));
tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle()); tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle());
tableLayoutPanel1.Size = new System.Drawing.Size(802, 572); tableLayoutPanel1.Size = new System.Drawing.Size(902, 653);
tableLayoutPanel1.TabIndex = 0; tableLayoutPanel1.TabIndex = 0;
tableLayoutPanel1.Paint += tableLayoutPanel1_Paint; tableLayoutPanel1.Paint += tableLayoutPanel1_Paint;
// //
@@ -74,66 +87,107 @@
flpCars.Location = new System.Drawing.Point(3, 82); flpCars.Location = new System.Drawing.Point(3, 82);
flpCars.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4); flpCars.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4);
flpCars.Name = "flpCars"; flpCars.Name = "flpCars";
flpCars.Size = new System.Drawing.Size(796, 515); flpCars.Size = new System.Drawing.Size(896, 567);
flpCars.TabIndex = 1; flpCars.TabIndex = 1;
// //
// tableLayoutPanel2 // tlpControls
// //
tableLayoutPanel2.ColumnCount = 2; tlpControls.ColumnCount = 2;
tableLayoutPanel2.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 50F)); tlpControls.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 100F));
tableLayoutPanel2.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 50F)); tlpControls.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 80F));
tableLayoutPanel2.Controls.Add(tbxSearch, 0, 0); tlpControls.Controls.Add(btnNewCar, 1, 0);
tableLayoutPanel2.Controls.Add(btnNewCar, 1, 0); tlpControls.Controls.Add(tlpSearch, 0, 0);
tableLayoutPanel2.Dock = System.Windows.Forms.DockStyle.Fill; tlpControls.Dock = System.Windows.Forms.DockStyle.Fill;
tableLayoutPanel2.Location = new System.Drawing.Point(3, 32); tlpControls.Location = new System.Drawing.Point(0, 28);
tableLayoutPanel2.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4); tlpControls.Margin = new System.Windows.Forms.Padding(0);
tableLayoutPanel2.Name = "tableLayoutPanel2"; tlpControls.Name = "tlpControls";
tableLayoutPanel2.RowCount = 1; tlpControls.RowCount = 1;
tableLayoutPanel2.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 100F)); tlpControls.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 100F));
tableLayoutPanel2.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 42F)); tlpControls.Size = new System.Drawing.Size(902, 50);
tableLayoutPanel2.Size = new System.Drawing.Size(796, 42); tlpControls.TabIndex = 2;
tableLayoutPanel2.TabIndex = 2;
//
// tbxSearch
//
tbxSearch.Dock = System.Windows.Forms.DockStyle.Fill;
tbxSearch.Location = new System.Drawing.Point(3, 4);
tbxSearch.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4);
tbxSearch.Name = "tbxSearch";
tbxSearch.Size = new System.Drawing.Size(392, 27);
tbxSearch.TabIndex = 3;
tbxSearch.TextChanged += tbxSearch_TextChanged;
// //
// btnNewCar // btnNewCar
// //
btnNewCar.Location = new System.Drawing.Point(401, 4); btnNewCar.BackColor = System.Drawing.SystemColors.MenuHighlight;
btnNewCar.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4); 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.Name = "btnNewCar";
btnNewCar.Size = new System.Drawing.Size(75, 29); btnNewCar.Size = new System.Drawing.Size(80, 50);
btnNewCar.TabIndex = 4; btnNewCar.TabIndex = 4;
btnNewCar.Text = "Add Car"; btnNewCar.UseVisualStyleBackColor = false;
btnNewCar.UseVisualStyleBackColor = true;
btnNewCar.Click += btnNewCar_Click; 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
// //
menuStrip1.BackColor = System.Drawing.SystemColors.ButtonFace;
menuStrip1.ImageScalingSize = new System.Drawing.Size(20, 20); menuStrip1.ImageScalingSize = new System.Drawing.Size(20, 20);
menuStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { fileToolStripMenuItem }); menuStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { fileToolStripMenuItem, editToolStripMenuItem, toolsToolStripMenuItem });
menuStrip1.Location = new System.Drawing.Point(0, 0); menuStrip1.Location = new System.Drawing.Point(0, 0);
menuStrip1.Name = "menuStrip1"; menuStrip1.Name = "menuStrip1";
menuStrip1.Size = new System.Drawing.Size(802, 28); menuStrip1.Size = new System.Drawing.Size(902, 28);
menuStrip1.TabIndex = 3; menuStrip1.TabIndex = 3;
menuStrip1.Text = "menuStrip1"; menuStrip1.Text = "menuStrip1";
// //
// fileToolStripMenuItem // fileToolStripMenuItem
// //
fileToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { openToolStripMenuItem, saveToolStripMenuItem, saveAsToolStripMenuItem, importToolStripMenuItem, recentFilesToolStripMenuItem, revealInFileExplorerToolStripMenuItem }); 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.Name = "fileToolStripMenuItem";
fileToolStripMenuItem.Size = new System.Drawing.Size(46, 24); fileToolStripMenuItem.Size = new System.Drawing.Size(46, 24);
fileToolStripMenuItem.Text = "File"; fileToolStripMenuItem.Text = "File";
// //
// openToolStripMenuItem // openToolStripMenuItem
// //
openToolStripMenuItem.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Text;
openToolStripMenuItem.Name = "openToolStripMenuItem"; openToolStripMenuItem.Name = "openToolStripMenuItem";
openToolStripMenuItem.Size = new System.Drawing.Size(238, 26); openToolStripMenuItem.Size = new System.Drawing.Size(238, 26);
openToolStripMenuItem.Text = "Open"; openToolStripMenuItem.Text = "Open";
@@ -141,6 +195,7 @@
// //
// saveToolStripMenuItem // saveToolStripMenuItem
// //
saveToolStripMenuItem.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Text;
saveToolStripMenuItem.Name = "saveToolStripMenuItem"; saveToolStripMenuItem.Name = "saveToolStripMenuItem";
saveToolStripMenuItem.Size = new System.Drawing.Size(238, 26); saveToolStripMenuItem.Size = new System.Drawing.Size(238, 26);
saveToolStripMenuItem.Text = "Save"; saveToolStripMenuItem.Text = "Save";
@@ -153,13 +208,6 @@
saveAsToolStripMenuItem.Text = "Save as"; saveAsToolStripMenuItem.Text = "Save as";
saveAsToolStripMenuItem.Click += saveAsToolStripMenuItem_Click; saveAsToolStripMenuItem.Click += saveAsToolStripMenuItem_Click;
// //
// importToolStripMenuItem
//
importToolStripMenuItem.Name = "importToolStripMenuItem";
importToolStripMenuItem.Size = new System.Drawing.Size(238, 26);
importToolStripMenuItem.Text = "Import";
importToolStripMenuItem.Click += importToolStripMenuItem_Click;
//
// recentFilesToolStripMenuItem // recentFilesToolStripMenuItem
// //
recentFilesToolStripMenuItem.Name = "recentFilesToolStripMenuItem"; recentFilesToolStripMenuItem.Name = "recentFilesToolStripMenuItem";
@@ -174,22 +222,92 @@
revealInFileExplorerToolStripMenuItem.Text = "Reveal in File Explorer"; revealInFileExplorerToolStripMenuItem.Text = "Reveal in File Explorer";
revealInFileExplorerToolStripMenuItem.Click += revealInFileExplorerToolStripMenuItem_Click; 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 });
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;
//
// 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");
//
// MainForm // MainForm
// //
AutoScaleDimensions = new System.Drawing.SizeF(8F, 20F); AutoScaleDimensions = new System.Drawing.SizeF(8F, 20F);
AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
ClientSize = new System.Drawing.Size(802, 572); ClientSize = new System.Drawing.Size(902, 653);
Controls.Add(tableLayoutPanel1); Controls.Add(tableLayoutPanel1);
Icon = (System.Drawing.Icon)resources.GetObject("$this.Icon"); Icon = (System.Drawing.Icon)resources.GetObject("$this.Icon");
MainMenuStrip = menuStrip1; MainMenuStrip = menuStrip1;
Margin = new System.Windows.Forms.Padding(3, 4, 3, 4); Margin = new System.Windows.Forms.Padding(3, 4, 3, 4);
MinimumSize = new System.Drawing.Size(818, 609); MinimumSize = new System.Drawing.Size(920, 700);
Name = "MainForm"; Name = "MainForm";
StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
Text = "Carmanager 3"; Text = "Carmanager 3";
tableLayoutPanel1.ResumeLayout(false); tableLayoutPanel1.ResumeLayout(false);
tableLayoutPanel1.PerformLayout(); tableLayoutPanel1.PerformLayout();
tableLayoutPanel2.ResumeLayout(false); tlpControls.ResumeLayout(false);
tableLayoutPanel2.PerformLayout(); tlpSearch.ResumeLayout(false);
tlpSearch.PerformLayout();
((System.ComponentModel.ISupportInitialize)pbxSearch).EndInit();
menuStrip1.ResumeLayout(false); menuStrip1.ResumeLayout(false);
menuStrip1.PerformLayout(); menuStrip1.PerformLayout();
ResumeLayout(false); ResumeLayout(false);
@@ -200,7 +318,7 @@
private System.Windows.Forms.TableLayoutPanel tableLayoutPanel1; private System.Windows.Forms.TableLayoutPanel tableLayoutPanel1;
private System.Windows.Forms.FlowLayoutPanel flpCars; private System.Windows.Forms.FlowLayoutPanel flpCars;
private System.Windows.Forms.TableLayoutPanel tableLayoutPanel2; private System.Windows.Forms.TableLayoutPanel tlpControls;
private System.Windows.Forms.TextBox tbxSearch; private System.Windows.Forms.TextBox tbxSearch;
private System.Windows.Forms.Button btnNewCar; private System.Windows.Forms.Button btnNewCar;
private System.Windows.Forms.MenuStrip menuStrip1; private System.Windows.Forms.MenuStrip menuStrip1;
@@ -208,8 +326,18 @@
private System.Windows.Forms.ToolStripMenuItem openToolStripMenuItem; private System.Windows.Forms.ToolStripMenuItem openToolStripMenuItem;
private System.Windows.Forms.ToolStripMenuItem saveToolStripMenuItem; private System.Windows.Forms.ToolStripMenuItem saveToolStripMenuItem;
private System.Windows.Forms.ToolStripMenuItem saveAsToolStripMenuItem; private System.Windows.Forms.ToolStripMenuItem saveAsToolStripMenuItem;
private System.Windows.Forms.ToolStripMenuItem importToolStripMenuItem;
private System.Windows.Forms.ToolStripMenuItem recentFilesToolStripMenuItem; private System.Windows.Forms.ToolStripMenuItem recentFilesToolStripMenuItem;
private System.Windows.Forms.ToolStripMenuItem revealInFileExplorerToolStripMenuItem; 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;
} }
} }

View File

@@ -4,24 +4,34 @@ using System.Data;
using System.Linq; using System.Linq;
using System.Threading.Tasks; using System.Threading.Tasks;
using System.Windows.Forms; using System.Windows.Forms;
using CarManagerV3.Forms;
namespace CarManagerV3 namespace CarManagerV3
{ {
public partial class MainForm : Form public partial class MainForm : Form
{ {
List<Car> cars = new List<Car>(); List<Car> cars = new List<Car>();
string filepath = "cars.csv"; string filepath = "";
public MainForm() public MainForm(string pathToOpen = "")
{ {
InitializeComponent(); InitializeComponent();
// Open the most recent file if it exists. Otherwise, use default filepath. // Open the most recent file if it exists. Otherwise, use default filepath.
List<string> recentFiles = SafeManager.GetRecentPaths(); List<string> recentFiles = SafeManager.GetRecentPaths();
if(recentFiles.Count > 0) if (!String.IsNullOrEmpty(pathToOpen))
{
filepath = pathToOpen;
SafeManager.AddRecentPath(filepath);
}
else if (recentFiles.Count > 0)
{ {
filepath = recentFiles[0]; filepath = recentFiles[0];
} }
else
{
openWelcomeScreen();
}
SafeManager.InitializeFile(filepath); SafeManager.InitializeFile(filepath);
StateManager.setFilePath(filepath); StateManager.setFilePath(filepath);
@@ -41,11 +51,44 @@ namespace CarManagerV3
} }
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() public void showOpenFileDialog()
{ {
openToolStripMenuItem.PerformClick(); openToolStripMenuItem.PerformClick();
} }
public void showSaveAsDialog()
{
saveAsToolStripMenuItem.PerformClick();
}
/// <summary> /// <summary>
/// Refreshes the cars displayed in the flow layout panel. /// Refreshes the cars displayed in the flow layout panel.
@@ -253,7 +296,7 @@ namespace CarManagerV3
private void openToolStripMenuItem_Click(object sender, EventArgs e) private void openToolStripMenuItem_Click(object sender, EventArgs e)
{ {
OpenFileDialog dlgOpen = new OpenFileDialog(); OpenFileDialog dlgOpen = new OpenFileDialog();
dlgOpen.Filter = "CSV Files (*.csv)|*.csv|All Files (*.*)|*.*"; 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"; dlgOpen.Title = "Open Car Data File";
// Default to users documents // Default to users documents
dlgOpen.InitialDirectory = SafeManager.getRecentFolder(); dlgOpen.InitialDirectory = SafeManager.getRecentFolder();
@@ -264,7 +307,7 @@ namespace CarManagerV3
try try
{ {
List<Car> importedCars = SafeManager.ReadCars(dlgOpen.FileName); List<Car> importedCars = SafeManager.ReadCars(dlgOpen.FileName);
if(importedCars.Count == 0) if (importedCars.Count == 0)
{ {
throw new Exception("File doesn't contain valid Cars."); throw new Exception("File doesn't contain valid Cars.");
} }
@@ -299,7 +342,7 @@ namespace CarManagerV3
private void saveAsToolStripMenuItem_Click(object sender, EventArgs e) private void saveAsToolStripMenuItem_Click(object sender, EventArgs e)
{ {
SaveFileDialog dlgSave = new SaveFileDialog(); SaveFileDialog dlgSave = new SaveFileDialog();
dlgSave.Filter = "CSV Files (*.csv)|*.csv|All Files (*.*)|*.*"; 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"; dlgSave.Title = "Save Car Data File As";
// Default to users documents // Default to users documents
dlgSave.InitialDirectory = SafeManager.getRecentFolder(); dlgSave.InitialDirectory = SafeManager.getRecentFolder();
@@ -332,7 +375,7 @@ namespace CarManagerV3
if (result == DialogResult.Yes) if (result == DialogResult.Yes)
{ {
OpenFileDialog dlgOpen = new OpenFileDialog(); OpenFileDialog dlgOpen = new OpenFileDialog();
dlgOpen.Filter = "CSV Files (*.csv)|*.csv|All Files (*.*)|*.*"; 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"; dlgOpen.Title = "Import Car Data File";
// Default to users documents // Default to users documents
dlgOpen.InitialDirectory = SafeManager.getRecentFolder(); dlgOpen.InitialDirectory = SafeManager.getRecentFolder();
@@ -343,7 +386,7 @@ namespace CarManagerV3
{ {
Console.WriteLine("Starting merge..."); Console.WriteLine("Starting merge...");
List<Car> importedCars = SafeManager.ReadCars(dlgOpen.FileName); List<Car> importedCars = SafeManager.ReadCars(dlgOpen.FileName);
if(importedCars.Count == 0) if (importedCars.Count == 0)
{ {
throw new Exception("File doesn't contain valid Cars."); throw new Exception("File doesn't contain valid Cars.");
} }
@@ -356,7 +399,7 @@ namespace CarManagerV3
if (mergeAsNewFileResult == DialogResult.Yes) if (mergeAsNewFileResult == DialogResult.Yes)
{ {
SaveFileDialog dlgSave = new SaveFileDialog(); SaveFileDialog dlgSave = new SaveFileDialog();
dlgSave.Filter = "CSV Files (*.csv)|*.csv|All Files (*.*)|*.*"; 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"; dlgSave.Title = "Save Merged Car Data File As";
// Default to users documents // Default to users documents
dlgSave.InitialDirectory = SafeManager.getRecentFolder(); dlgSave.InitialDirectory = SafeManager.getRecentFolder();
@@ -418,7 +461,7 @@ namespace CarManagerV3
try try
{ {
List<Car> importedCars = SafeManager.ReadCars(path); List<Car> importedCars = SafeManager.ReadCars(path);
if(importedCars.Count == 0) if (importedCars.Count == 0)
{ {
throw new Exception("File doesn't contain valid Cars."); throw new Exception("File doesn't contain valid Cars.");
} }
@@ -429,6 +472,10 @@ namespace CarManagerV3
refreshCars(cars); refreshCars(cars);
MessageBox.Show("File loaded successfully.", "Load File", MessageBoxButtons.OK, MessageBoxIcon.Information); 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) catch (Exception ex)
{ {
MessageBox.Show("Error loading file: " + ex.Message); MessageBox.Show("Error loading file: " + ex.Message);
@@ -451,5 +498,31 @@ namespace CarManagerV3
MessageBox.Show("File does not exist.", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error); 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();
}
} }
} }

File diff suppressed because it is too large Load Diff

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

@@ -8,12 +8,15 @@ namespace CarManagerV3
/// </summary> /// </summary>
internal class ImageManager internal class ImageManager
{ {
private static string _imagePath = Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData) + "\\CarManagerV3\\images";
/// <summary> /// <summary>
/// Initializes the image folder by creating it if it does not exist. /// Initializes the image folder by creating it if it does not exist.
/// </summary> /// </summary>
public static void InitializeImageFolder() public static void InitializeImageFolder()
{ {
string path = "images"; string path = _imagePath;
if (!System.IO.Directory.Exists(path)) if (!System.IO.Directory.Exists(path))
{ {
@@ -31,7 +34,7 @@ namespace CarManagerV3
/// <returns>The image path for this Car.</returns> /// <returns>The image path for this Car.</returns>
public static string GetImagePath(Car car) public static string GetImagePath(Car car)
{ {
string basePath = "images/"; string basePath = $"{_imagePath}/";
string fileName = $"{car.Make}_{car.Model}_{car.Year}_{car.Color}.png"; string fileName = $"{car.Make}_{car.Model}_{car.Year}_{car.Color}.png";
return basePath + fileName; return basePath + fileName;
} }
@@ -60,7 +63,7 @@ namespace CarManagerV3
} }
try try
{ {
return Image.FromFile("images/no_image_available.png"); return Image.FromFile($"{_imagePath}/no_image_available.png");
} }
catch (Exception ex) catch (Exception ex)
{ {
@@ -97,7 +100,7 @@ namespace CarManagerV3
catch catch
{ {
// if error, use fallback image no_image_available.png // if error, use fallback image no_image_available.png
System.IO.File.Copy("images/no_image_available.png", path); //System.IO.File.Copy($"{_imagePath}/no_image_available.png", path);
} }
} }

View File

@@ -15,13 +15,13 @@ namespace CarManagerV3
/// <summary> /// <summary>
/// The path of the txt file that contains recently opened file paths. /// The path of the txt file that contains recently opened file paths.
/// </summary> /// </summary>
private static readonly string recentPathsFile = "recent_paths.txt"; private static readonly string recentPathsFile = Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData) + "\\CarManagerV3\\recent_paths.txt";
/// <summary> /// <summary>
/// Initializes a file at a specified path if it does not already exist. /// Initializes a file at a specified path if it does not already exist.
/// </summary> /// </summary>
/// <param name="path">The path.</param> /// <param name="path">The path of the file.</param>
public static void InitializeFile(string path) public static void InitializeFile(string path)
{ {
try try
@@ -31,7 +31,7 @@ namespace CarManagerV3
using (StreamWriter writer = new StreamWriter(@path)) using (StreamWriter writer = new StreamWriter(@path))
{ {
// Create the file, empty // Create the file, empty
writer.WriteLine(); //writer.WriteLine();
writer.Close(); writer.Close();
} }
} }
@@ -42,6 +42,27 @@ namespace CarManagerV3
} }
} }
/// <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)
{
try
{
string directory = Path.GetDirectoryName(path);
if (!Directory.Exists(directory))
{
Directory.CreateDirectory(directory);
}
InitializeFile(path);
}
catch (Exception ex)
{
Console.Error.WriteLine($"Error initializing file and folders: {ex.Message}");
}
}
/// <summary> /// <summary>
/// Reads cars from a specified file path. /// Reads cars from a specified file path.
/// </summary> /// </summary>
@@ -150,18 +171,7 @@ namespace CarManagerV3
List<string> paths = new List<string>(); List<string> paths = new List<string>();
try try
{ {
if (File.Exists(recentPathsFile)) paths = GetRecentPaths();
{
using (StreamReader reader = new StreamReader(recentPathsFile))
{
string line;
while ((line = reader.ReadLine()) != null)
{
paths.Add(line);
}
reader.Close();
}
}
paths.Remove(path); paths.Remove(path);
paths.Insert(0, path); paths.Insert(0, path);
if (paths.Count > 5) if (paths.Count > 5)
@@ -194,7 +204,8 @@ namespace CarManagerV3
List<string> paths = new List<string>(); List<string> paths = new List<string>();
try try
{ {
if (File.Exists(recentPathsFile)) initializeFileAndFolders(recentPathsFile);
if (File.Exists(recentPathsFile)) //TODO: Remove
{ {
using (StreamReader reader = new StreamReader(recentPathsFile)) using (StreamReader reader = new StreamReader(recentPathsFile))
{ {
@@ -215,9 +226,11 @@ namespace CarManagerV3
} }
/// <summary> /// <summary>
/// Gets the folder of the most recently opened file, or the users documents folder if no recent files. /// Gets the folder of the most recently opened file.
/// </summary> /// </summary>
/// <returns></returns> /// <returns>
/// The folder path of the most recently opened file, or the users documents folder if no recent files.
/// </returns>
public static string getRecentFolder() public static string getRecentFolder()
{ {
List<string> recentPaths = GetRecentPaths(); List<string> recentPaths = GetRecentPaths();
@@ -232,7 +245,23 @@ namespace CarManagerV3
return Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments); 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

@@ -15,8 +15,7 @@ namespace CarManagerV3
// Initialize global static list of cars // Initialize global static list of cars
static List<Car> cars = new List<Car>(); static List<Car> cars = new List<Car>();
// Initialize default file path for car data. // Initialize default file path for car data.
// TODO: If no recent file paths are found, prompt user to select a file path instead of using a hardcoded default in the program folder. static string filePath = "";
static string filePath = "cars.csv";
static bool hasConfirmedMigration = false; static bool hasConfirmedMigration = false;
@@ -46,7 +45,7 @@ namespace CarManagerV3
/// <summary> /// <summary>
/// Adds a car to the collection. /// Adds a car to the collection.
/// </summary> /// </summary>
/// <param name="car">The car to add.</param> /// <param name="car">The <see cref="Car"/> to add.</param>
public static void AddCar(Car car) public static void AddCar(Car car)
{ {
cars = SafeManager.ReadCars(filePath); cars = SafeManager.ReadCars(filePath);
@@ -57,7 +56,7 @@ namespace CarManagerV3
/// <summary> /// <summary>
/// Removes a car from the collection. /// Removes a car from the collection.
/// </summary> /// </summary>
/// <param name="car">The car to remove.</param> /// <param name="car">The <see cref="Car"/> to remove.</param>
public static void RemoveCar(Car car) public static void RemoveCar(Car car)
{ {
cars = SafeManager.ReadCars(filePath); cars = SafeManager.ReadCars(filePath);
@@ -73,7 +72,7 @@ namespace CarManagerV3
/// <remarks> /// <remarks>
/// If the car's Id has changed during editing, this will not work correctly. Keep Id immutable! /// If the car's Id has changed during editing, this will not work correctly. Keep Id immutable!
/// </remarks> /// </remarks>
/// <param name="car">The car to update.</param> /// <param name="car">The <see cref="Car"/> to update.</param>
public static void UpdateCar(Car car) public static void UpdateCar(Car car)
{ {
Car existingCar = GetCarById(car.Id); Car existingCar = GetCarById(car.Id);
@@ -119,6 +118,11 @@ namespace CarManagerV3
filePath = path; 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) 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. // Normalize the Order field of all cars to be sequential starting from 1, while keeping the relative order the same.
@@ -130,6 +134,11 @@ namespace CarManagerV3
return orderedCars; 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() public static bool askForMigration()
{ {
if (hasConfirmedMigration) if (hasConfirmedMigration)

View File

@@ -1,4 +1,5 @@
using System; using System;
using System.Diagnostics;
using System.Windows.Forms; using System.Windows.Forms;
namespace CarManagerV3 namespace CarManagerV3
@@ -9,11 +10,13 @@ namespace CarManagerV3
/// The main entry point for the application. /// The main entry point for the application.
/// </summary> /// </summary>
[STAThread] [STAThread]
static void Main() static void Main(string[] args)
{ {
string pathToOpen = null;
if (args.Length > 0) pathToOpen = args[0];
Application.EnableVisualStyles(); Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false); Application.SetCompatibleTextRenderingDefault(false);
Application.Run(new MainForm()); Application.Run(new MainForm(pathToOpen));
} }
} }
} }

View File

@@ -46,7 +46,7 @@
mimetype: application/x-microsoft.net.object.binary.base64 mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with value : The object must be serialized with
: System.Serialization.Formatters.Binary.BinaryFormatter : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding. : and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64 mimetype: application/x-microsoft.net.object.soap.base64
@@ -60,6 +60,7 @@
: and then encoded with base64 encoding. : 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: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:element name="root" msdata:IsDataSet="true">
<xsd:complexType> <xsd:complexType>
<xsd:choice maxOccurs="unbounded"> <xsd:choice maxOccurs="unbounded">
@@ -68,9 +69,10 @@
<xsd:sequence> <xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" /> <xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence> </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="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" /> <xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType> </xsd:complexType>
</xsd:element> </xsd:element>
<xsd:element name="assembly"> <xsd:element name="assembly">
@@ -85,9 +87,10 @@
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" /> <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:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence> </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="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" /> <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType> </xsd:complexType>
</xsd:element> </xsd:element>
<xsd:element name="resheader"> <xsd:element name="resheader">
@@ -109,9 +112,16 @@
<value>2.0</value> <value>2.0</value>
</resheader> </resheader>
<resheader name="reader"> <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>
<resheader name="writer"> <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> </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> </root>

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

View File

@@ -1,3 +1,7 @@
![Logo](https://static.clsw.app/brands/carmgm/Logo/CarMgm_Logo@0.5.png "Logo")
# Car Manager 3 # 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. This is a simple school project in C# - Honestly you shouldn't be looking at this if you don't know me.