Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Directory.Build.props
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project>
<PropertyGroup>
<!-- Version management - single source of truth -->
<VersionPrefix>3.0.20</VersionPrefix>
<VersionPrefix>3.0.24</VersionPrefix>

<!-- Package metadata -->
<Authors>Jonathan Horvath</Authors>
Expand Down
2 changes: 1 addition & 1 deletion OSDP-Bench.sln
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@ EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Docs", "Docs", "{ED2EC291-3353-442C-AD2C-3D3438798EF0}"
ProjectSection(SolutionItems) = preProject
README.md = README.md
docs\CLAUDE.md = docs\CLAUDE.md
docs\ConnectionButtonBehavior.md = docs\ConnectionButtonBehavior.md
CLAUDE.md = CLAUDE.md
EndProjectSection
EndProject
Global
Expand Down
1 change: 1 addition & 0 deletions OSDP-Bench.sln.DotSettings
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
<wpf:ResourceDictionary xml:space="preserve" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:s="clr-namespace:System;assembly=mscorlib" xmlns:ss="urn:shemas-jetbrains-com:settings-storage-xaml" xmlns:wpf="http://schemas.microsoft.com/winfx/2006/xaml/presentation">
<s:String x:Key="/Default/CodeStyle/Naming/CSharpNaming/Abbreviations/=CRC/@EntryIndexedValue">CRC</s:String>
<s:String x:Key="/Default/CodeStyle/Naming/CSharpNaming/Abbreviations/=PD/@EntryIndexedValue">PD</s:String>
<s:String x:Key="/Default/CodeStyle/Naming/XamlNaming/Abbreviations/=_002EXX/@EntryIndexedValue">.XX</s:String>
<s:Boolean x:Key="/Default/UserDictionary/Words/=Acks/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/UserDictionary/Words/=OSDP/@EntryIndexedValue">True</s:Boolean></wpf:ResourceDictionary>
49 changes: 14 additions & 35 deletions ci/package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,48 +6,27 @@ steps:
version: '10.x'

- task: DotNetCoreCLI@2
displayName: 'dotnet pack Core library'
displayName: 'dotnet restore'
inputs:
command: 'pack'
arguments: '--configuration $(buildConfiguration) --output $(Build.ArtifactStagingDirectory)/nuget'
packagesToPack: 'src/Core/Core.csproj'
command: 'restore'
projects: 'src/Core/Core.csproj'

- task: DotNetCoreCLI@2
displayName: 'dotnet publish for win-x64'
displayName: 'dotnet build Core library'
inputs:
command: 'publish'
publishWebProjects: false
projects: 'src/UI/Windows/Windows.csproj'
arguments: >-
-r win-x64
--configuration $(buildConfiguration)
--self-contained true
-p:PublishSingleFile=true
-p:IncludeNativeLibrariesForSelfExtract=true
-p:EnableCompressionInSingleFile=true
--output $(Build.ArtifactStagingDirectory)/OSDPBench/win-x64
zipAfterPublish: false
modifyOutputPath: false
command: 'build'
projects: 'src/Core/Core.csproj'
arguments: '--configuration $(buildConfiguration) --no-restore'

- task: DotNetCoreCLI@2
displayName: 'dotnet publish for win-arm64'
displayName: 'dotnet pack Core library'
inputs:
command: 'publish'
publishWebProjects: false
projects: 'src/UI/Windows/Windows.csproj'
arguments: >-
-r win-arm64
--configuration $(buildConfiguration)
--self-contained true
-p:PublishSingleFile=true
-p:IncludeNativeLibrariesForSelfExtract=true
-p:EnableCompressionInSingleFile=true
--output $(Build.ArtifactStagingDirectory)/OSDPBench/win-arm64
zipAfterPublish: false
modifyOutputPath: false
command: 'pack'
arguments: '--configuration $(buildConfiguration) --no-build --output $(Build.ArtifactStagingDirectory)/nuget'
packagesToPack: 'src/Core/Core.csproj'

- task: PublishPipelineArtifact@1
displayName: 'Publish artifacts'
displayName: 'Publish NuGet package'
inputs:
targetPath: '$(Build.ArtifactStagingDirectory)'
artifactName: Release
targetPath: '$(Build.ArtifactStagingDirectory)/nuget'
artifactName: NuGet
67 changes: 38 additions & 29 deletions docs/ConnectionButtonBehavior.md
Original file line number Diff line number Diff line change
@@ -1,51 +1,60 @@
## Implementation Status Summary

### Discover Mode (ConnectionTypeComboBox Index = 0)

| State | Discovery Button | Connect Button | Disconnect Button | Cancel Button | ConnectionTypeComboBox | Status |
|-------------------------|------------------|----------------|-------------------|---------------|------------------------|---------------|
| **Disconnected** | Visible | Hidden | Hidden | Hidden | Enabled | ✓ Correct |
| **Discovering** | Hidden | Hidden | Hidden | Visible | Disabled | ✓ Correct |
| **Discovery Cancelled** | Visible | Hidden | Hidden | Hidden | Enabled | ✓ Correct |
| **Discovered** | Hidden | Hidden | Visible | Hidden | Disabled | ✓ Correct |
| **Connecting** | Hidden | Hidden | Visible | Hidden | Disabled | ✓ Correct |
| **Connected** | Hidden | Hidden | Visible | Hidden | Disabled | ✓ Correct |
| **Error** | Hidden | Hidden | Visible | Hidden | Enabled | ✓ Correct |

### Manual Mode (ConnectionTypeComboBox Index = 1)

| State | Discovery Button | Connect Button | Disconnect Button | Cancel Button | ConnectionTypeComboBox | Status |
|------------------|------------------|----------------|-------------------|---------------|------------------------|-----------|
| **Disconnected** | Hidden | Visible | Hidden | Hidden | Enabled | ✓ Correct |
| **Connecting** | Hidden | Hidden | Visible | Hidden | Disabled | ✓ Correct |
| **Connected** | Hidden | Hidden | Visible | Hidden | Disabled | ✓ Correct |
| **Error** | Hidden | Hidden | Visible | Hidden | Enabled | ✓ Correct |
### Connection Mode Selection

The Configuration page uses radio buttons for connection mode selection:

- **Connect to PD** (IsConnectToPDSelected = true)
- **Discover** (IsDiscoverModeSelected = true)
- **Manual** (IsDiscoverModeSelected = false)
- **Passive Monitoring** (IsConnectToPDSelected = false)

### Discover Mode (Connect to PD > Discover)

| State | Discovery Button | Connect Button | Disconnect Button | Cancel Button | Mode Selection | Status |
|-------------------------|------------------|----------------|-------------------|---------------|----------------|---------------|
| **Disconnected** | Visible | Hidden | Hidden | Hidden | Enabled | ✓ Correct |
| **Discovering** | Hidden | Hidden | Hidden | Visible | Disabled | ✓ Correct |
| **Discovery Cancelled** | Visible | Hidden | Hidden | Hidden | Enabled | ✓ Correct |
| **Discovered** | Hidden | Hidden | Visible | Hidden | Disabled | ✓ Correct |
| **Connecting** | Hidden | Hidden | Visible | Hidden | Disabled | ✓ Correct |
| **Connected** | Hidden | Hidden | Visible | Hidden | Disabled | ✓ Correct |
| **Error** | Hidden | Hidden | Visible | Hidden | Enabled | ✓ Correct |

### Manual Mode (Connect to PD > Manual)

| State | Discovery Button | Connect Button | Disconnect Button | Cancel Button | Mode Selection | Status |
|------------------|------------------|----------------|-------------------|---------------|----------------|-----------|
| **Disconnected** | Hidden | Visible | Hidden | Hidden | Enabled | ✓ Correct |
| **Connecting** | Hidden | Hidden | Visible | Hidden | Disabled | ✓ Correct |
| **Connected** | Hidden | Hidden | Visible | Hidden | Disabled | ✓ Correct |
| **Error** | Hidden | Hidden | Visible | Hidden | Enabled | ✓ Correct |

### Fixed Bugs

**Bug #1: ConnectionTypeComboBox Enable/Disable** ✓ FIXED
- Added `IsConnectionTypeEnabled` property to ConnectViewModel
- ComboBox is now properly disabled during: Discovering, Discovered, Connecting, ConnectingManually, Connected states
- Location: `ConnectViewModel.cs:523-531`
**Bug #1: Mode Selection Enable/Disable** ✓ FIXED
- Added `IsConnectionTypeEnabled` property to ConfigurationViewModel
- Radio buttons are now properly disabled during: Discovering, Discovered, Connecting, ConnectingManually, Connected states
- Location: `ConfigurationViewModel.cs`

**Bug #2: Discovery Cancelled State** ✓ FIXED
- Changed cancelled/failed discovery to use `StatusLevel.Disconnected` instead of `StatusLevel.Error`
- Start Discovery button now correctly appears after cancelling discovery
- Location: `ConnectViewModel.cs:335-348`
- Location: `ConfigurationViewModel.cs`

**Bug #3: Connecting States Missing from isConnected Check** ✓ FIXED
- Added `StatusLevel.Connecting` and `StatusLevel.ConnectingManually` to button visibility checks
- Buttons now show correct visibility during connection attempts
- Location: `ConnectViewModel.cs:479-545`
- Location: `ConfigurationViewModel.cs`

**Bug #4: Discovery Button May Appear During Connection** ✓ FIXED
- Updated StartDiscovery visibility check to account for all connecting states
- Discovery button no longer appears during connection attempts
- Location: `ConnectViewModel.cs:503-515`
- Location: `ConfigurationViewModel.cs`

**Bug #5: Disconnect Button Not Visible for Invalid Security Key Error** ✓ FIXED
- Added `StatusLevel.Error` to disconnect button visibility check
- When an invalid security key error occurs, the disconnect button is now shown
- This allows users to properly disconnect and clean up the connection state
- Location: `ConnectViewModel.cs:520-534`
- Test: `ConnectViewModelTests.cs:292-304`
- Location: `ConfigurationViewModel.cs`
- Test: `ConfigurationViewModelTests.cs`
34 changes: 17 additions & 17 deletions src/Core/Resources/Resources.resx
Original file line number Diff line number Diff line change
Expand Up @@ -154,8 +154,8 @@

<!-- Page Titles -->
<data name="Page_Connect" xml:space="preserve">
<value>Connect</value>
<comment>Title for the Connect page</comment>
<value>Configuration</value>
<comment>Title for the Configuration page</comment>
</data>
<data name="Page_Manage" xml:space="preserve">
<value>Manage</value>
Expand Down Expand Up @@ -262,8 +262,8 @@
<comment>Message when device is not identified</comment>
</data>
<data name="Manage_ConnectionPageDetails" xml:space="preserve">
<value>The Connection page will provide more details</value>
<comment>Message directing user to connection page</comment>
<value>The Configuration page will provide more details</value>
<comment>Message directing user to configuration page</comment>
</data>
<data name="Manage_DeviceInformation" xml:space="preserve">
<value>Device Information</value>
Expand Down Expand Up @@ -338,13 +338,9 @@
<value>Unable to decrypt</value>
<comment>Message shown in packet details when decryption fails</comment>
</data>
<data name="Monitor_DefaultKey" xml:space="preserve">
<value>Default Key</value>
<comment>Badge shown when passive monitoring with default key decryption</comment>
</data>
<data name="Monitor_CustomKey" xml:space="preserve">
<value>Custom Key</value>
<comment>Badge shown when passive monitoring with custom key decryption</comment>
<data name="Monitor_PassiveMonitoring" xml:space="preserve">
<value>Monitor</value>
<comment>Badge shown when in passive monitoring mode</comment>
</data>
<data name="Monitor_Security" xml:space="preserve">
<value>Security</value>
Expand Down Expand Up @@ -375,8 +371,8 @@
<comment>Button text to expand row details</comment>
</data>
<data name="Monitor_ConnectionPageDetails" xml:space="preserve">
<value>The Connection page will provide more details</value>
<comment>Message directing users to connection page for details</comment>
<value>The Configuration page will provide more details</value>
<comment>Message directing users to configuration page for details</comment>
</data>
<data name="Monitor_LastCardRead" xml:space="preserve">
<value>Last Card Read</value>
Expand Down Expand Up @@ -441,8 +437,8 @@

<!-- Navigation Menu Items -->
<data name="Navigation_ConnectToPD" xml:space="preserve">
<value>Connect To PD</value>
<comment>Navigation menu item for Connect page</comment>
<value>Config</value>
<comment>Navigation menu item for Configuration page</comment>
</data>
<data name="Navigation_ManagePD" xml:space="preserve">
<value>Manage PD</value>
Expand Down Expand Up @@ -627,10 +623,14 @@
<comment>Connection type option for manual connection</comment>
</data>
<data name="ConnectionType_PassiveMonitor" xml:space="preserve">
<value>Passive Monitor</value>
<value>Passive Monitoring</value>
<comment>Connection type option for passive bus monitoring</comment>
</data>

<data name="ConnectionMode_ConnectToPD" xml:space="preserve">
<value>Connect to PD</value>
<comment>Radio button label for Connect to PD mode</comment>
</data>

<!-- Language Selection UI -->
<data name="Language_Selection" xml:space="preserve">
<value>Language</value>
Expand Down
Loading
Loading