Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
73 commits
Select commit Hold shift + click to select a range
51cf37d
Added README.md
solah1701 Nov 29, 2023
f8b8c19
TreeNodeAccessibleObject can't be created when the parent TreeView is…
Tanya-Solyanik Feb 14, 2024
2751807
Replaced null-forgiving operator from TreeViewEventArgs.Node, and Nod…
Tanya-Solyanik Feb 14, 2024
02d37a0
cover accessibility path in the unittests
Tanya-Solyanik Feb 14, 2024
bcde5ea
Update branding to 8.0.4 (#11000)
vseanreesermsft Mar 6, 2024
4342e86
[release/8.0] Bump Nugetpackaging version (#10900)
lonitra Mar 6, 2024
f221faa
[release/8.0] Set ProducesDotNetReleaseShippingAssets property in Pub…
github-actions[bot] Mar 6, 2024
b6487e2
[release/8.0] Fix empty `OpenFileDialog.FileNames` when `AutoUpgradeE…
lonitra Mar 6, 2024
6e23c56
[release/8.0] Duplicate azure-pipelines.yml (#11010)
github-actions[bot] Mar 7, 2024
707f594
[release/8.0] Duplicate All Build YAML Files (#11029)
lonitra Mar 12, 2024
76d1368
[release/8.0] Update dependencies from dotnet/arcade (#11067)
dotnet-maestro[bot] Mar 18, 2024
e6a3913
Added datagrid definitions
Manntoshh Mar 25, 2024
5924bc4
Added missing references
Manntoshh Mar 25, 2024
7647cc3
resolved most compiler issues
Manntoshh Mar 25, 2024
bca2a10
resolved all pending compiler issues
Manntoshh Mar 25, 2024
bdc1d40
removed vb and test projects
Manntoshh Mar 25, 2024
ed71d93
removed all tests projects
Manntoshh Mar 25, 2024
2922f59
Added demo project
Manntoshh Mar 26, 2024
4098f5c
WI000637959 - Renamed the winforms project to avoid name conflict and…
Manntoshh Mar 26, 2024
846d37c
WI00677434 - Added MenuItem definitions and its dependency files to m…
Manntoshh Mar 28, 2024
62e56fa
WI00677434 - Updated README and suppressed analyzer warnings
Manntoshh Mar 29, 2024
c084b72
WI00677434 - Extended the demo project to include the MenuItem contro…
Manntoshh Apr 2, 2024
3f4f3d5
WI00677434 - Made use of more options available for the menu item con…
Manntoshh Apr 3, 2024
81c4f03
WI00677434 - Added test project, included tests for DataGrid control
Manntoshh Apr 8, 2024
6a5fcad
Expanded the demo form
Manntoshh Apr 11, 2024
8d2f821
WI00677434 - ported unit tests for ContextMenu and resolved failures
Manntoshh Apr 11, 2024
9412a1e
Added unit tests MainMenuTestsTests.cs
Manntoshh Apr 19, 2024
e2ab6d5
Removed unwanted projects from the solution
Manntoshh Apr 22, 2024
44a2f19
Created COM reference to Accessibility.dll for the necessary projects…
Manntoshh Apr 22, 2024
5c6b783
Removed the pkg contents to resolve QGL build issues
Manntoshh Apr 22, 2024
2375704
WI00677434 - Changes to address QGL build warnings for references of …
Manntoshh Apr 23, 2024
94346e4
WI00677434 - updated the markdown file
Manntoshh Apr 23, 2024
1f9f7d9
Apply suggestions from code review
Manntoshh Apr 24, 2024
7822189
WI00677434 - Make DAT process the builds successfully
Manntoshh Apr 24, 2024
f1618e8
WI00677434 - Resolving errors in build evaludation for DAT
Manntoshh Apr 25, 2024
576c292
WI00677434 - Removed "docs" directory
Manntoshh Apr 30, 2024
b3172e7
WI00677434 - Using Accessibility package from proget source instead o…
Manntoshh May 2, 2024
74bfcf0
WI00677434 - PR for dat test run to check whether XUnit tests execute…
Manntoshh May 9, 2024
8a85a16
WI00677434 - Include missed rendering calls (#4)
Manntoshh May 10, 2024
77a39e9
WI00743643 - Winforms StatusBar and dependent controls in Net8 (#2)
Manntoshh May 13, 2024
c3cb6f7
WI00743644 - WinForms ToolBar control in Net8 (#3)
wtg-mg8 May 15, 2024
63fb836
WTG.System.Windows.Forms now outputs to Bin folder, for visibilty in …
wtg-mg8 May 15, 2024
fb10559
add status bar related tests (#6)
wangyang2024 May 20, 2024
9ac4a5a
WI00745513 - Port remaining Menu tests to .net 8 (#8)
wangyang2024 May 20, 2024
f05ab6a
WI00745297 - Port_WinForms_ToolBar_tests to .net8 (#10)
leont2024 May 23, 2024
8275a69
solve UI scaling issues (#12)
wangyang2024 May 24, 2024
08a64c4
enable nuget package generation for WTG.System.Windows.Forms. must in…
wtg-mg8 May 28, 2024
3357df6
WI00756869 - Change CargoWise.Controls.WinForms.Legacy to output Syst…
wtg-mg8 Jun 24, 2024
d254c46
0.0.8-dev.final: change version of System.Drawing.Common.dll (4.0.0.0…
Adil-WTG Jul 15, 2024
8fd6b5e
WI00775636 - Set version to 8 for all libraries. (#15)
Adil-WTG Jul 31, 2024
517e20b
WI00798235: remove obsoletion warning message (#16)
srijan-dev8 Sep 19, 2024
8653d79
WI00808201 - publish new version 0.0.11 (#17)
Adil-WTG Sep 25, 2024
ea2d334
WI00826420 | avoid type issue when instanciated from ZBindingContext …
VorteX-on Nov 11, 2024
a3eb8b0
M98/wi00831363/restore context menu to tree node tree view (#21)
Awe7ome Dec 9, 2024
e07ef09
WI00756959 - Use a pre-defined .nuspec to package WTG.System.Windows.…
AudreyHarradine Dec 19, 2024
ff0141f
WI00857973 - Comment out Debug.Fail in PaintEventArgs in forked WinFo…
wtg-mg8 Jan 21, 2025
c9c1a6f
WI00876922 - Create nuget package release of forked System.Windows.Fo…
wtg-mg8 Mar 23, 2025
4193013
WI00892988 - Remove need for forked System.Drawing.Common (#26)
wtg-mg8 Apr 8, 2025
a7f7501
WI00895180 - Keyboard Shortcuts not working (#27)
solah1701 May 8, 2025
1ca4f6d
WI00938771 Temporary fix for WebBrowser leak (#29)
ZGN-WTG Aug 4, 2025
1ea85e9
WI00951087 AI-generated automation of nuget packaging steps from WI00…
dj-wtg Aug 15, 2025
9eb53e6
WI00949199 - Fix Menu popup event not firing in .NET 8.0 (#30)
dj-wtg Aug 15, 2025
06d6647
WI00951087 - Changing path to try to get deployment working (#32)
dj-wtg Aug 15, 2025
b1d0409
WI00949199 Add HasMenu logic from .NET Core 3.0 Winforms (#33)
dj-wtg Aug 18, 2025
af84587
WI00949199 - Bump version to 0.0.19 (#35)
dj-wtg Aug 18, 2025
eb40b59
WI00949199 - form size should be recalculated when menu changes (#36)
wangyang2024 Aug 21, 2025
9a21e93
WI00958158 - WinForms.Legacy references Deployment using NuGet instea…
Copilot Sep 4, 2025
77304a1
WI00951596 - NET8 - ZRichTextBoxToolBar disappears when button toolti…
wtg-mg8 Sep 5, 2025
c72c88c
WI00960762 - Update CargoWiseCloudDeployment package in CargoWise.Con…
wtg-mg8 Sep 8, 2025
8febb79
WI00955507 - Control's position is wrong in .NET 8 (#43)
nathanlgtm Sep 9, 2025
31f1c48
WI00948012 - .NET 8: Universal Copy menu item has no text (#42)
DerekDong666 Sep 9, 2025
4f78d8d
WI01010818 - WI01005730 - IT - NET8 NRE Exception on Customs Declarat…
srijan-dev8 Dec 31, 2025
d3fb1d8
WI01012522 - Updated DeploymentSetup.ps1 (#48)
MichaelAllen1 Jan 20, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
3 changes: 3 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -184,6 +184,9 @@ csharp_style_allow_blank_line_after_token_in_arrow_expression_clause_experimenta
dotnet_diagnostic.IDE0090.severity = error
csharp_style_deconstructed_variable_declaration = true:suggestion

# RS0016: Add public types and members to the declared API
dotnet_diagnostic.RS0016.severity = silent

# Visual Basic files

[*.vb]
Expand Down
6 changes: 6 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@
*.userosscache
*.sln.docstates

#Visual Studio creates .bak files when editing resource files. Ignore these
*.bak

# User-specific files (MonoDevelop/Xamarin Studio)
*.userprefs

Expand All @@ -29,6 +32,9 @@ bld/
[Oo]bj/
[Ll]og/

# VSCode directory
.vscode/

# Visual Studio 2015/2017 cache/options directory
.vs/
# Uncomment if you have tasks that create the project's static files in wwwroot
Expand Down
17 changes: 17 additions & 0 deletions Build.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
<Build xmlns="http://wisetechglobal.com/DevTools/Build.xsd" MSBuild="17">
<Solutions>
<Solution Filename="Winforms.sln" />
</Solutions>

<PreBuild>
<Command cacheable="false">powershell.exe -ExecutionPolicy Bypass .\DeploymentSetup.ps1</Command>
</PreBuild>

<DatSettings BuildDeployerType="CargoWiseCloud.Deployment.DotNetNuGetDeployer, CargoWiseCloud.Deployment" BuildDeployerRuntime="DotNet64">
<TestAdapter Type="Dat.Implementation.VSTest.VSTestAdapter, Dat.Implementation.VSTest" />
<DeploymentTargets>
<DeploymentTarget Type="DeployOnDemand" BuildConfiguration="RELEASE" />
<DeploymentTarget Type="DeployOnDemand" BuildConfiguration="RELEASE" DeploymentConfiguration="SAND" IsProduction="false" />
</DeploymentTargets>
</DatSettings>
</Build>
33 changes: 33 additions & 0 deletions BuildAndPackage.cmd
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
@echo off
echo Custom NuGet Package Build Script for System.Windows.Forms
echo =========================================================
echo.

REM Clean the workspace
echo Cleaning workspace...
git clean -dfx
if errorlevel 1 (
echo Error: Failed to clean workspace
exit /b 1
)

REM Build the solution in Release configuration
echo Building solution in Release configuration...
dotnet build Winforms.sln -c Release
if errorlevel 1 (
echo Error: Failed to build solution
exit /b 1
)

REM Run the custom packaging script
echo Running custom packaging...
powershell.exe -NoProfile -ExecutionPolicy Bypass -File "%~dp0CreateCustomPackageStandalone.ps1"
if errorlevel 1 (
echo Error: Failed to create custom package
exit /b 1
)

echo.
echo Build and packaging completed successfully!
echo Check the artifacts\packages\Release\Shipping folder for the System.Windows.Forms.*.nupkg file.
pause
213 changes: 213 additions & 0 deletions CreateCustomPackage.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,213 @@
# Custom NuGet Package Creation Script for System.Windows.Forms
# This script automates the manual process described in the requirements

param(
[Parameter(Mandatory = $true)]
[string]$OriginalPackagePath,

[Parameter(Mandatory = $true)]
[string]$CustomPackagePath,

[Parameter(Mandatory = $true)]
[string]$DesignBinDir,

[switch]$WhatIf = $false
)

$ErrorActionPreference = "Stop"

Write-Host "Starting custom NuGet package creation for System.Windows.Forms..." -ForegroundColor Green
Write-Host "Original package: $OriginalPackagePath" -ForegroundColor Yellow
Write-Host "Target package: $CustomPackagePath" -ForegroundColor Yellow
Write-Host "Design bin directory: $DesignBinDir" -ForegroundColor Yellow

if ($WhatIf) {
Write-Host "WhatIf mode: Would process package but not make changes" -ForegroundColor Cyan
return
}

# Validate inputs
if (-not (Test-Path $OriginalPackagePath)) {
Write-Error "Original package not found: $OriginalPackagePath"
exit 1
}

# Ensure the Design bin directory exists
if (-not (Test-Path $DesignBinDir)) {
Write-Error "System.Windows.Forms.Design output directory not found at: $DesignBinDir"
exit 1
}

Write-Host "Source directory: $DesignBinDir" -ForegroundColor Cyan

# Validate that the required files exist in the source directory
$requiredFiles = @(
"System.Windows.Forms.Primitives.dll",
"System.Windows.Forms.Primitives.xml",
"System.Windows.Forms.Design.dll",
"System.Windows.Forms.Design.xml"
)

$missingFiles = @()
foreach ($file in $requiredFiles) {
if (-not (Test-Path (Join-Path $DesignBinDir $file))) {
$missingFiles += $file
}
}

if ($missingFiles.Count -gt 0) {
Write-Warning "Some required files are missing from the source directory:"
foreach ($file in $missingFiles) {
Write-Warning " - $file"
}
Write-Warning "The package will be created but may be incomplete. Ensure System.Windows.Forms.Design project is built correctly."
}

# Create working directory
$WorkingDir = Join-Path ([System.IO.Path]::GetDirectoryName($CustomPackagePath)) "temp_package_work"
$ExtractedPackageDir = Join-Path $WorkingDir "extracted"

if (Test-Path $WorkingDir) {
Remove-Item $WorkingDir -Recurse -Force
}
New-Item -ItemType Directory -Path $ExtractedPackageDir -Force | Out-Null

try {
Write-Host "Extracting original package..." -ForegroundColor Yellow

# Extract the nupkg (it's a zip file)
Add-Type -AssemblyName System.IO.Compression.FileSystem
[System.IO.Compression.ZipFile]::ExtractToDirectory($OriginalPackagePath, $ExtractedPackageDir)

Write-Host "Renaming nuspec file..." -ForegroundColor Yellow

# Rename the nuspec file
$originalNuspec = Join-Path $ExtractedPackageDir "WTG.System.Windows.Forms.nuspec"
$newNuspec = Join-Path $ExtractedPackageDir "System.Windows.Forms.nuspec"

if (Test-Path $originalNuspec) {
Move-Item $originalNuspec $newNuspec -Force
} else {
Write-Error "Original nuspec file not found: $originalNuspec"
exit 1
}

Write-Host "Modifying nuspec content..." -ForegroundColor Yellow

# Modify the nuspec file content
$content = Get-Content $newNuspec -Raw -Encoding UTF8

# Replace the package ID
$content = $content -replace '<id>WTG\.System\.Windows\.Forms</id>', '<id>System.Windows.Forms</id>'

# Remove the System.Windows.Forms.Primitives dependency line
$content = $content -replace '\s*<dependency\s+id="System\.Windows\.Forms\.Primitives"[^>]*version="[^"]*"[^/]*/>\s*', ''

# Clean up any extra whitespace
$content = $content -replace '\r?\n\s*\r?\n', "`r`n"

Set-Content $newNuspec -Value $content -Encoding UTF8

Write-Host "Copying additional files from System.Windows.Forms.Design..." -ForegroundColor Yellow

$libNetDir = Join-Path $ExtractedPackageDir "lib\net8.0"
Write-Host " Target directory: $libNetDir" -ForegroundColor Cyan

# Copy the main files (these should replace any existing files)
$filesToCopy = @(
"System.Windows.Forms.Primitives.dll",
"System.Windows.Forms.Primitives.xml",
"System.Windows.Forms.Design.dll",
"System.Windows.Forms.Design.xml"
)

Write-Host " Copying main files..." -ForegroundColor Cyan
foreach ($file in $filesToCopy) {
$sourcePath = Join-Path $DesignBinDir $file
$destPath = Join-Path $libNetDir $file

if (Test-Path $sourcePath) {
$existsAlready = Test-Path $destPath
Copy-Item $sourcePath $destPath -Force
if ($existsAlready) {
Write-Host " Replaced: $file" -ForegroundColor Green
} else {
Write-Host " Copied: $file" -ForegroundColor Green
}
} else {
Write-Warning " File not found: $sourcePath"
}
}

# Copy resource folders (two-character country codes)
$resourceFolders = Get-ChildItem $DesignBinDir -Directory

if ($resourceFolders.Count -gt 0) {
Write-Host " Found $($resourceFolders.Count) resource folders to copy" -ForegroundColor Cyan
}

foreach ($folder in $resourceFolders) {
$destFolder = Join-Path $libNetDir $folder.Name

# Create the destination folder
New-Item -ItemType Directory -Path $destFolder -Force | Out-Null

# Copy all files from source folder to destination
$sourceFiles = Get-ChildItem $folder.FullName -File
if ($sourceFiles.Count -gt 0) {
Copy-Item $sourceFiles.FullName $destFolder -Force
Write-Host " Copied resource folder: $($folder.Name) ($($sourceFiles.Count) files)" -ForegroundColor Green
} else {
Write-Host " Resource folder $($folder.Name) is empty, skipping" -ForegroundColor DarkYellow
}
}

Write-Host "Creating new package..." -ForegroundColor Yellow

# Create the new package
if (Test-Path $CustomPackagePath) {
Remove-Item $CustomPackagePath -Force
}

[System.IO.Compression.ZipFile]::CreateFromDirectory($ExtractedPackageDir, $CustomPackagePath)

Write-Host "Package created successfully: $CustomPackagePath" -ForegroundColor Green

# Display package info
$packageInfo = Get-ChildItem $CustomPackagePath
Write-Host "Package size: $([math]::Round($packageInfo.Length / 1MB, 2)) MB" -ForegroundColor Cyan

# Show summary of what was included
Write-Host ""
Write-Host "Package contents summary:" -ForegroundColor Yellow
Write-Host " - Original System.Windows.Forms files from WTG package" -ForegroundColor White
Write-Host " - Additional files from System.Windows.Forms.Design:" -ForegroundColor White
$filesToCopy = @(
"System.Windows.Forms.Primitives.dll",
"System.Windows.Forms.Primitives.xml",
"System.Windows.Forms.Design.dll",
"System.Windows.Forms.Design.xml"
)
foreach ($file in $filesToCopy) {
$sourcePath = Join-Path $DesignBinDir $file
if (Test-Path $sourcePath) {
Write-Host " [OK] $file" -ForegroundColor Green
} else {
Write-Host " [MISSING] $file (not found)" -ForegroundColor Red
}
}

if ($resourceFolders.Count -gt 0) {
Write-Host " - Resource folders: $($resourceFolders.Name -join ', ')" -ForegroundColor White
} else {
Write-Host " - No resource folders found" -ForegroundColor DarkYellow
}

} finally {
# Clean up working directory
if (Test-Path $WorkingDir) {
Remove-Item $WorkingDir -Recurse -Force
}
}

Write-Host "Custom NuGet package creation completed!" -ForegroundColor Green
57 changes: 57 additions & 0 deletions CreateCustomPackageStandalone.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
# Standalone Custom NuGet Package Creation Script for System.Windows.Forms
# This script can be used independently for testing or manual package creation

param(
[string]$Configuration = "Release",
[string]$ArtifactsDir = "$PSScriptRoot\artifacts",
[switch]$WhatIf = $false
)

$ErrorActionPreference = "Stop"

Write-Host "Standalone custom NuGet package creation for System.Windows.Forms..." -ForegroundColor Green

# Define paths
$PackagesOutputDir = Join-Path $ArtifactsDir "packages\$Configuration\Shipping"
$DesignBinDir = Join-Path $ArtifactsDir "bin\System.Windows.Forms.Design\$Configuration\net8.0"

# Find the original package
$OriginalPackages = Get-ChildItem $PackagesOutputDir -Filter "WTG.System.Windows.Forms.*.nupkg" -ErrorAction SilentlyContinue | Sort-Object LastWriteTime -Descending
if ($OriginalPackages.Count -eq 0) {
Write-Error "No WTG.System.Windows.Forms package found in $PackagesOutputDir. Make sure the solution is built in $Configuration configuration."
exit 1
}

$OriginalPackage = $OriginalPackages[0]
$OriginalPackagePath = $OriginalPackage.FullName
$PackageVersion = $OriginalPackage.Name -replace "WTG\.System\.Windows\.Forms\.(.*?)\.nupkg", '$1'
$CustomPackageName = "System.Windows.Forms.$PackageVersion.nupkg"
$CustomPackagePath = Join-Path $PackagesOutputDir $CustomPackageName

Write-Host "Using the main PowerShell script..." -ForegroundColor Yellow

# Call the main PowerShell script
$mainScriptPath = Join-Path $PSScriptRoot "CreateCustomPackage.ps1"
if (-not (Test-Path $mainScriptPath)) {
Write-Error "Main PowerShell script not found at: $mainScriptPath"
exit 1
}

$params = @{
OriginalPackagePath = $OriginalPackagePath
CustomPackagePath = $CustomPackagePath
DesignBinDir = $DesignBinDir
}

if ($WhatIf) {
$params.WhatIf = $true
}

& $mainScriptPath @params

if (-not $WhatIf) {
Write-Host ""
Write-Host "Next steps:" -ForegroundColor Cyan
Write-Host "1. To push to proget: dotnet nuget push `"$CustomPackagePath`" --api-key `"your-api-key`" --source `"https://proget.wtg.zone/nuget/WTG-Internal/v3/index.json`"" -ForegroundColor White
Write-Host "2. Verify at: https://proget.wtg.zone/feeds/WTG-Internal/System.Windows.Forms/versions" -ForegroundColor White
}
Loading