feature/cuid #1

Merged
frozd merged 5 commits from feature/cuid into master 2026-03-03 11:33:29 +01:00
4 changed files with 16 additions and 151 deletions
Showing only changes of commit 9b261dbf78 - Show all commits

View File

@@ -1,17 +1,7 @@
<?xml version="1.0" encoding="utf-8"?> <Project Sdk="Microsoft.NET.Sdk">
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<PropertyGroup> <PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> <TargetFramework>net8.0-windows</TargetFramework>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProjectGuid>{93CA258B-A645-41A8-A24F-59036ABC173F}</ProjectGuid>
<OutputType>WinExe</OutputType> <OutputType>WinExe</OutputType>
<RootNamespace>CarManagerV3</RootNamespace>
<AssemblyName>CarManagerV3</AssemblyName>
<TargetFrameworkVersion>v4.7.2</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
<Deterministic>true</Deterministic>
<PublishUrl>publish\</PublishUrl> <PublishUrl>publish\</PublishUrl>
<Install>true</Install> <Install>true</Install>
<InstallFrom>Disk</InstallFrom> <InstallFrom>Disk</InstallFrom>
@@ -27,106 +17,17 @@
<IsWebBootstrapper>false</IsWebBootstrapper> <IsWebBootstrapper>false</IsWebBootstrapper>
<UseApplicationTrust>false</UseApplicationTrust> <UseApplicationTrust>false</UseApplicationTrust>
<BootstrapperEnabled>true</BootstrapperEnabled> <BootstrapperEnabled>true</BootstrapperEnabled>
</PropertyGroup> <GenerateAssemblyInfo>false</GenerateAssemblyInfo>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> <UseWindowsForms>true</UseWindowsForms>
<PlatformTarget>AnyCPU</PlatformTarget> <ImportWindowsDesktopTargets>true</ImportWindowsDesktopTargets>
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget>
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>
<Reference Include="System" /> <Compile Update="Forms\Components\CarCard.cs">
<Reference Include="System.Core" />
<Reference Include="System.Xml.Linq" />
<Reference Include="System.Data.DataSetExtensions" />
<Reference Include="Microsoft.CSharp" />
<Reference Include="System.Data" />
<Reference Include="System.Deployment" />
<Reference Include="System.Drawing" />
<Reference Include="System.Net.Http" />
<Reference Include="System.Windows.Forms" />
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
<Compile Include="Classes\Car.cs" />
<Compile Include="Forms\Components\CarCard.cs">
<SubType>UserControl</SubType> <SubType>UserControl</SubType>
</Compile> </Compile>
<Compile Include="Forms\Components\CarCard.Designer.cs"> <PackageReference Include="Microsoft.CSharp" Version="4.7.0" />
<DependentUpon>CarCard.cs</DependentUpon> <PackageReference Include="System.Data.DataSetExtensions" Version="4.5.0" />
</Compile> <PackageReference Include="System.Net.Http" Version="4.3.4" />
<Compile Include="Exceptions\LegacyException.cs" />
<Compile Include="Forms\MainForm.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="Forms\MainForm.Designer.cs">
<DependentUpon>MainForm.cs</DependentUpon>
</Compile>
<Compile Include="Forms\CarDetailsForm.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="Forms\CarDetailsForm.Designer.cs">
<DependentUpon>CarDetailsForm.cs</DependentUpon>
</Compile>
<Compile Include="Manager\ImageManager.cs" />
<Compile Include="Forms\Util\PleaseWait.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="Forms\Util\PleaseWait.Designer.cs">
<DependentUpon>PleaseWait.cs</DependentUpon>
</Compile>
<Compile Include="Program.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="Manager\SafeManager.cs" />
<Compile Include="Manager\StateManager.cs" />
<Compile Include="Util\CUID.cs" />
<EmbeddedResource Include="Forms\Components\CarCard.resx">
<DependentUpon>CarCard.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Forms\MainForm.resx">
<DependentUpon>MainForm.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Forms\CarDetailsForm.resx">
<DependentUpon>CarDetailsForm.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Forms\Util\PleaseWait.resx">
<DependentUpon>PleaseWait.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Properties\Resources.resx">
<Generator>ResXFileCodeGenerator</Generator>
<LastGenOutput>Resources.Designer.cs</LastGenOutput>
<SubType>Designer</SubType>
</EmbeddedResource>
<Compile Include="Properties\Resources.Designer.cs">
<AutoGen>True</AutoGen>
<DependentUpon>Resources.resx</DependentUpon>
<DesignTime>True</DesignTime>
</Compile>
<None Include="Properties\Settings.settings">
<Generator>SettingsSingleFileGenerator</Generator>
<LastGenOutput>Settings.Designer.cs</LastGenOutput>
</None>
<Compile Include="Properties\Settings.Designer.cs">
<AutoGen>True</AutoGen>
<DependentUpon>Settings.settings</DependentUpon>
<DesignTimeSharedInput>True</DesignTimeSharedInput>
</Compile>
</ItemGroup>
<ItemGroup>
<None Include="App.config" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<BootstrapperPackage Include=".NETFramework,Version=v4.7.2"> <BootstrapperPackage Include=".NETFramework,Version=v4.7.2">
@@ -140,6 +41,4 @@
<Install>false</Install> <Install>false</Install>
</BootstrapperPackage> </BootstrapperPackage>
</ItemGroup> </ItemGroup>
<ItemGroup />
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
</Project> </Project>

View File

@@ -127,8 +127,8 @@ namespace CarManagerV3
detailsForm.ShowDialog(); detailsForm.ShowDialog();
}; };
ContextMenu cm = new ContextMenu(); ContextMenuStrip cms = new ContextMenuStrip();
cm.MenuItems.Add(new MenuItem("Move Up", (s, e) => cms.Items.Add("Move up", null, (s, e) =>
{ {
int order = car.Order; int order = car.Order;
// find car with order just less than this one // find car with order just less than this one
@@ -142,11 +142,10 @@ namespace CarManagerV3
SafeManager.SaveCars(filepath, cars); SafeManager.SaveCars(filepath, cars);
refreshCars(cars); refreshCars(cars);
} }
})); });
cm.MenuItems.Add(new MenuItem("Move Down", (s, e) => cms.Items.Add("Move down", null, (s, e) =>
{ {
int order = car.Order; int order = car.Order;
// find car with order just greater than this one // find car with order just greater than this one
Car other = cars.Where(c => c.Order > order).OrderBy(c => c.Order).FirstOrDefault(); Car other = cars.Where(c => c.Order > order).OrderBy(c => c.Order).FirstOrDefault();
@@ -159,9 +158,9 @@ namespace CarManagerV3
SafeManager.SaveCars(filepath, cars); SafeManager.SaveCars(filepath, cars);
refreshCars(cars); refreshCars(cars);
} }
})); });
card.ContextMenu = cm; card.ContextMenuStrip = cms;
if (isNew) if (isNew)
{ {

View File

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

View File

@@ -19,7 +19,7 @@ namespace CarManagerV3.Properties {
// class via a tool like ResGen or Visual Studio. // class via a tool like ResGen or Visual Studio.
// To add or remove a member, edit your .ResX file then rerun ResGen // To add or remove a member, edit your .ResX file then rerun ResGen
// with the /str option, or rebuild your VS project. // with the /str option, or rebuild your VS project.
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "17.0.0.0")] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "18.0.0.0")]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
internal class Resources { internal class Resources {