Skip to content

Commit afd3f3f

Browse files
authored
Merge pull request #229 from Krypton-Suite/gold
Gold
2 parents 40e0e03 + b9d6d9b commit afd3f3f

8 files changed

Lines changed: 283 additions & 75 deletions

File tree

.github/workflows/New System/release.yml

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -162,20 +162,20 @@ jobs:
162162
shell: pwsh
163163
run: |
164164
$ErrorActionPreference = 'Stop'
165-
$buildArgs = 'Scripts/Build/build.proj /t:Build /p:Configuration=Release /p:Platform="Any CPU"'
165+
$projectPath = "Scripts/Build/build.proj"
166166
167167
if (${{ steps.prepare_cert.outputs.cert_available }} -eq 'true') {
168-
$buildArgs += ' /p:EnableAuthenticodeSigning=true'
169-
$buildArgs += " /p:AuthenticodeCertificatePath=`"${{ steps.prepare_cert.outputs.cert_path }}`""
168+
Write-Host "Building with Authenticode signing enabled"
169+
$certPath = "${{ steps.prepare_cert.outputs.cert_path }}"
170170
if ($env:AUTHENTICODE_CERT_PASSWORD) {
171-
$buildArgs += " /p:AuthenticodeCertificatePassword=`"$env:AUTHENTICODE_CERT_PASSWORD`""
171+
& msbuild $projectPath /t:Build /p:Configuration=Release /p:Platform="Any CPU" /p:EnableAuthenticodeSigning=true /p:AuthenticodeCertificatePath="$certPath" /p:AuthenticodeCertificatePassword="$env:AUTHENTICODE_CERT_PASSWORD"
172+
} else {
173+
& msbuild $projectPath /t:Build /p:Configuration=Release /p:Platform="Any CPU" /p:EnableAuthenticodeSigning=true /p:AuthenticodeCertificatePath="$certPath"
172174
}
173-
Write-Host "Building with Authenticode signing enabled"
174175
} else {
175176
Write-Host "Building without Authenticode signing"
177+
& msbuild $projectPath /t:Build /p:Configuration=Release /p:Platform="Any CPU"
176178
}
177-
178-
msbuild $buildArgs
179179
env:
180180
AUTHENTICODE_CERT_PASSWORD: ${{ secrets.AUTHENTICODE_CERT_PASSWORD }}
181181

@@ -484,20 +484,20 @@ jobs:
484484
shell: pwsh
485485
run: |
486486
$ErrorActionPreference = 'Stop'
487-
$buildArgs = 'Scripts/Build/build.proj /t:Build /p:Configuration=Release /p:Platform="Any CPU"'
487+
$projectPath = "Scripts/Build/build.proj"
488488
489489
if (${{ steps.prepare_cert.outputs.cert_available }} -eq 'true') {
490-
$buildArgs += ' /p:EnableAuthenticodeSigning=true'
491-
$buildArgs += " /p:AuthenticodeCertificatePath=`"${{ steps.prepare_cert.outputs.cert_path }}`""
490+
Write-Host "Building with Authenticode signing enabled"
491+
$certPath = "${{ steps.prepare_cert.outputs.cert_path }}"
492492
if ($env:AUTHENTICODE_CERT_PASSWORD) {
493-
$buildArgs += " /p:AuthenticodeCertificatePassword=`"$env:AUTHENTICODE_CERT_PASSWORD`""
493+
& msbuild $projectPath /t:Build /p:Configuration=Release /p:Platform="Any CPU" /p:EnableAuthenticodeSigning=true /p:AuthenticodeCertificatePath="$certPath" /p:AuthenticodeCertificatePassword="$env:AUTHENTICODE_CERT_PASSWORD"
494+
} else {
495+
& msbuild $projectPath /t:Build /p:Configuration=Release /p:Platform="Any CPU" /p:EnableAuthenticodeSigning=true /p:AuthenticodeCertificatePath="$certPath"
494496
}
495-
Write-Host "Building with Authenticode signing enabled"
496497
} else {
497498
Write-Host "Building without Authenticode signing"
499+
& msbuild $projectPath /t:Build /p:Configuration=Release /p:Platform="Any CPU"
498500
}
499-
500-
msbuild $buildArgs
501501
env:
502502
AUTHENTICODE_CERT_PASSWORD: ${{ secrets.AUTHENTICODE_CERT_PASSWORD }}
503503

.github/workflows/release.yml

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -161,20 +161,20 @@ jobs:
161161
shell: pwsh
162162
run: |
163163
$ErrorActionPreference = 'Stop'
164-
$buildArgs = 'Scripts/Build/build.proj /t:Build /p:Configuration=Release /p:Platform="Any CPU"'
164+
$projectPath = "Scripts/Build/build.proj"
165165
166166
if (${{ steps.prepare_cert.outputs.cert_available }} -eq 'true') {
167-
$buildArgs += ' /p:EnableAuthenticodeSigning=true'
168-
$buildArgs += " /p:AuthenticodeCertificatePath=`"${{ steps.prepare_cert.outputs.cert_path }}`""
167+
Write-Host "Building with Authenticode signing enabled"
168+
$certPath = "${{ steps.prepare_cert.outputs.cert_path }}"
169169
if ($env:AUTHENTICODE_CERT_PASSWORD) {
170-
$buildArgs += " /p:AuthenticodeCertificatePassword=`"$env:AUTHENTICODE_CERT_PASSWORD`""
170+
& msbuild $projectPath /t:Build /p:Configuration=Release /p:Platform="Any CPU" /p:EnableAuthenticodeSigning=true /p:AuthenticodeCertificatePath="$certPath" /p:AuthenticodeCertificatePassword="$env:AUTHENTICODE_CERT_PASSWORD"
171+
} else {
172+
& msbuild $projectPath /t:Build /p:Configuration=Release /p:Platform="Any CPU" /p:EnableAuthenticodeSigning=true /p:AuthenticodeCertificatePath="$certPath"
171173
}
172-
Write-Host "Building with Authenticode signing enabled"
173174
} else {
174175
Write-Host "Building without Authenticode signing"
176+
& msbuild $projectPath /t:Build /p:Configuration=Release /p:Platform="Any CPU"
175177
}
176-
177-
msbuild $buildArgs
178178
env:
179179
AUTHENTICODE_CERT_PASSWORD: ${{ secrets.AUTHENTICODE_CERT_PASSWORD }}
180180

@@ -426,20 +426,20 @@ jobs:
426426
shell: pwsh
427427
run: |
428428
$ErrorActionPreference = 'Stop'
429-
$buildArgs = 'Scripts/Build/build.proj /t:Build /p:Configuration=Release /p:Platform="Any CPU"'
429+
$projectPath = "Scripts/Build/build.proj"
430430
431431
if (${{ steps.prepare_cert.outputs.cert_available }} -eq 'true') {
432-
$buildArgs += ' /p:EnableAuthenticodeSigning=true'
433-
$buildArgs += " /p:AuthenticodeCertificatePath=`"${{ steps.prepare_cert.outputs.cert_path }}`""
432+
Write-Host "Building with Authenticode signing enabled"
433+
$certPath = "${{ steps.prepare_cert.outputs.cert_path }}"
434434
if ($env:AUTHENTICODE_CERT_PASSWORD) {
435-
$buildArgs += " /p:AuthenticodeCertificatePassword=`"$env:AUTHENTICODE_CERT_PASSWORD`""
435+
& msbuild $projectPath /t:Build /p:Configuration=Release /p:Platform="Any CPU" /p:EnableAuthenticodeSigning=true /p:AuthenticodeCertificatePath="$certPath" /p:AuthenticodeCertificatePassword="$env:AUTHENTICODE_CERT_PASSWORD"
436+
} else {
437+
& msbuild $projectPath /t:Build /p:Configuration=Release /p:Platform="Any CPU" /p:EnableAuthenticodeSigning=true /p:AuthenticodeCertificatePath="$certPath"
436438
}
437-
Write-Host "Building with Authenticode signing enabled"
438439
} else {
439440
Write-Host "Building without Authenticode signing"
441+
& msbuild $projectPath /t:Build /p:Configuration=Release /p:Platform="Any CPU"
440442
}
441-
442-
msbuild $buildArgs
443443
env:
444444
AUTHENTICODE_CERT_PASSWORD: ${{ secrets.AUTHENTICODE_CERT_PASSWORD }}
445445

Lines changed: 249 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,249 @@
1+
# KryptonScrollbarManager - Complete Integration Status
2+
3+
## Overview
4+
5+
The `KryptonScrollbarManager` has been successfully integrated into **10 Krypton controls**, providing a unified way to replace native Windows scrollbars with Krypton-themed scrollbars across the toolkit.
6+
7+
## ✅ Fully Integrated Controls
8+
9+
### Container Controls (Container Mode) - 4 Controls
10+
11+
#### 1. **KryptonPanel**
12+
- **File**: `Source/Krypton Components/Krypton.Toolkit/Controls Toolkit/KryptonPanel.cs`
13+
- **Property**: `UseKryptonScrollbars` (bool, default: false)
14+
- **Manager Access**: `ScrollbarManager` property
15+
- **Mode**: Container
16+
- **Status**: ✅ Fully Integrated
17+
- **Integration Date**: Initial implementation
18+
19+
**Usage:**
20+
```csharp
21+
var panel = new KryptonPanel
22+
{
23+
UseKryptonScrollbars = true
24+
};
25+
```
26+
27+
#### 2. **KryptonGroupBox**
28+
- **File**: `Source/Krypton Components/Krypton.Toolkit/Controls Toolkit/KryptonGroupBox.cs`
29+
- **Property**: `UseKryptonScrollbars` (bool, default: false)
30+
- **Manager Access**: `ScrollbarManager` property
31+
- **Mode**: Container (applied to internal `Panel` property)
32+
- **Status**: ✅ Fully Integrated
33+
- **Integration Date**: Initial implementation
34+
35+
**Usage:**
36+
```csharp
37+
var groupBox = new KryptonGroupBox
38+
{
39+
UseKryptonScrollbars = true // Applied to internal Panel
40+
};
41+
```
42+
43+
#### 3. **KryptonHeaderGroup**
44+
- **File**: `Source/Krypton Components/Krypton.Toolkit/Controls Toolkit/KryptonHeaderGroup.cs`
45+
- **Property**: `UseKryptonScrollbars` (bool, default: false)
46+
- **Manager Access**: `ScrollbarManager` property
47+
- **Mode**: Container (applied to internal `Panel` property)
48+
- **Status**: ✅ Fully Integrated
49+
- **Integration Date**: Latest batch
50+
51+
**Usage:**
52+
```csharp
53+
var headerGroup = new KryptonHeaderGroup
54+
{
55+
UseKryptonScrollbars = true // Applied to internal Panel
56+
};
57+
```
58+
59+
#### 4. **KryptonGroup**
60+
- **File**: `Source/Krypton Components/Krypton.Toolkit/Controls Toolkit/KryptonGroup.cs`
61+
- **Property**: `UseKryptonScrollbars` (bool, default: false)
62+
- **Manager Access**: `ScrollbarManager` property
63+
- **Mode**: Container (applied to internal `Panel` property)
64+
- **Status**: ✅ Fully Integrated
65+
- **Integration Date**: Latest batch
66+
67+
**Usage:**
68+
```csharp
69+
var group = new KryptonGroup
70+
{
71+
UseKryptonScrollbars = true // Applied to internal Panel
72+
};
73+
```
74+
75+
### Native Wrapper Controls (Native Wrapper Mode) - 6 Controls
76+
77+
#### 5. **KryptonTextBox**
78+
- **File**: `Source/Krypton Components/Krypton.Toolkit/Controls Toolkit/KryptonTextBox.cs`
79+
- **Property**: `UseKryptonScrollbars` (bool, default: false)
80+
- **Manager Access**: `ScrollbarManager` property
81+
- **Mode**: NativeWrapper (applied to internal `_textBox` control)
82+
- **Status**: ✅ Fully Integrated
83+
- **Integration Date**: Initial implementation
84+
85+
**Usage:**
86+
```csharp
87+
var textBox = new KryptonTextBox
88+
{
89+
Multiline = true,
90+
WordWrap = false,
91+
UseKryptonScrollbars = true
92+
};
93+
```
94+
95+
#### 6. **KryptonRichTextBox**
96+
- **File**: `Source/Krypton Components/Krypton.Toolkit/Controls Toolkit/KryptonRichTextBox.cs`
97+
- **Property**: `UseKryptonScrollbars` (bool, default: false)
98+
- **Manager Access**: `ScrollbarManager` property
99+
- **Mode**: NativeWrapper (applied to internal `_richTextBox` control)
100+
- **Status**: ✅ Fully Integrated
101+
- **Integration Date**: Initial implementation
102+
103+
**Usage:**
104+
```csharp
105+
var richTextBox = new KryptonRichTextBox
106+
{
107+
Multiline = true,
108+
UseKryptonScrollbars = true
109+
};
110+
```
111+
112+
#### 7. **KryptonListBox**
113+
- **File**: `Source/Krypton Components/Krypton.Toolkit/Controls Toolkit/KryptonListBox.cs`
114+
- **Property**: `UseKryptonScrollbars` (bool, default: false)
115+
- **Manager Access**: `ScrollbarManager` property
116+
- **Mode**: NativeWrapper (applied to internal `_listBox` control)
117+
- **Status**: ✅ Fully Integrated
118+
- **Integration Date**: Latest batch
119+
120+
**Usage:**
121+
```csharp
122+
var listBox = new KryptonListBox
123+
{
124+
UseKryptonScrollbars = true
125+
};
126+
```
127+
128+
#### 8. **KryptonCheckedListBox**
129+
- **File**: `Source/Krypton Components/Krypton.Toolkit/Controls Toolkit/KryptonCheckedListBox.cs`
130+
- **Property**: `UseKryptonScrollbars` (bool, default: false)
131+
- **Manager Access**: `ScrollbarManager` property
132+
- **Mode**: NativeWrapper (applied to internal `_listBox` control)
133+
- **Status**: ✅ Fully Integrated
134+
- **Integration Date**: Latest batch
135+
136+
**Usage:**
137+
```csharp
138+
var checkedListBox = new KryptonCheckedListBox
139+
{
140+
UseKryptonScrollbars = true
141+
};
142+
```
143+
144+
#### 9. **KryptonListView**
145+
- **File**: `Source/Krypton Components/Krypton.Toolkit/Controls Toolkit/KryptonListView.cs`
146+
- **Property**: `UseKryptonScrollbars` (bool, default: false)
147+
- **Manager Access**: `ScrollbarManager` property
148+
- **Mode**: NativeWrapper (applied to internal `_listView` control)
149+
- **Status**: ✅ Fully Integrated
150+
- **Integration Date**: Latest batch
151+
152+
**Usage:**
153+
```csharp
154+
var listView = new KryptonListView
155+
{
156+
UseKryptonScrollbars = true
157+
};
158+
```
159+
160+
#### 10. **KryptonTreeView**
161+
- **File**: `Source/Krypton Components/Krypton.Toolkit/Controls Toolkit/KryptonTreeView.cs`
162+
- **Property**: `UseKryptonScrollbars` (bool, default: false)
163+
- **Manager Access**: `ScrollbarManager` property
164+
- **Mode**: NativeWrapper (applied to internal `_treeView` control)
165+
- **Status**: ✅ Fully Integrated
166+
- **Integration Date**: Latest batch
167+
168+
**Usage:**
169+
```csharp
170+
var treeView = new KryptonTreeView
171+
{
172+
UseKryptonScrollbars = true
173+
};
174+
```
175+
176+
## 🔍 Potential Future Integrations
177+
178+
### KryptonDataGridView
179+
- **File**: `Source/Krypton Components/Krypton.Toolkit/Controls Toolkit/KryptonDataGridView.cs`
180+
- **Status**: ⏳ Under Consideration
181+
- **Complexity**: High
182+
- **Notes**:
183+
- Inherits directly from `DataGridView` (not wrapping an internal control)
184+
- DataGridView has complex scrolling mechanisms (virtual scrolling, column/row headers)
185+
- Would require NativeWrapper mode attached to `this`
186+
- May need special handling for column/row header synchronization
187+
- Requires investigation into DataGridView's internal scrolling architecture
188+
189+
## Integration Statistics
190+
191+
- **Total Controls Integrated**: 10
192+
- **Container Mode**: 4 controls
193+
- **Native Wrapper Mode**: 6 controls
194+
- **Integration Pattern**: Consistent across all controls
195+
- **Code Quality**: All integrations follow the same pattern, compile without errors
196+
- **Design-Time Support**: All properties appear in property grid
197+
- **Lifecycle Management**: Proper disposal and handle creation handling
198+
199+
## Common Integration Pattern
200+
201+
All integrated controls follow this consistent pattern:
202+
203+
1. **Instance Fields**: Add `_scrollbarManager` and `_useKryptonScrollbars` fields
204+
2. **Public Property**: Add `UseKryptonScrollbars` property with getter/setter
205+
3. **Manager Access**: Add read-only `ScrollbarManager` property
206+
4. **Dispose**: Dispose manager in `Dispose(bool disposing)`
207+
5. **Handle Created**: Initialize manager in `OnHandleCreated`
208+
6. **Update Method**: Add `UpdateScrollbarManager()` method in Implementation section
209+
210+
## Benefits
211+
212+
1. **Consistent Theming**: All scrollbars match the Krypton theme
213+
2. **Easy to Use**: Simple boolean property enables it
214+
3. **Non-Intrusive**: Defaults to false, doesn't affect existing code
215+
4. **Design-Time Support**: Property appears in property grid
216+
5. **Full Control**: Access to manager for advanced scenarios
217+
6. **Proper Lifecycle**: Automatic cleanup and initialization
218+
219+
## Testing
220+
221+
All integrated controls have been tested:
222+
- ✅ Compilation successful
223+
- ✅ No linter errors
224+
- ✅ Consistent pattern across all controls
225+
- ✅ Proper disposal handling
226+
- ✅ Handle creation handling
227+
228+
## Documentation
229+
230+
- **Integration Summary**: `Documents/KryptonScrollbarManager-Integration-Summary.md`
231+
- **Design Document**: `Documents/KryptonScrollbarManager-Design.md`
232+
- **Usage Examples**: `Documents/KryptonScrollbarManager-Usage-Example.md`
233+
- **Implementation Summary**: `Documents/KryptonScrollbarManager-Implementation-Summary.md`
234+
- **Complete Status**: This document
235+
236+
## Next Steps
237+
238+
1. **Testing**: Comprehensive testing of all integrated controls in real-world scenarios
239+
2. **Demo Form**: Update `ScrollbarManagerTest` demo form to showcase all integrated controls
240+
3. **DataGridView**: Investigate feasibility of DataGridView integration
241+
4. **Documentation**: Add usage examples for each control type
242+
5. **Performance**: Monitor performance impact of scrollbar manager
243+
244+
## Notes
245+
246+
- All integrations are backward compatible (default `false`)
247+
- Manager is lazy-initialized (only created when enabled)
248+
- Native wrapper mode uses periodic sync (50ms) for real-time updates
249+
- Container mode handles child control positioning automatically

Source/Krypton Components/Krypton.Toolkit/Controls Toolkit/KryptonCheckedListBox.cs

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2239,16 +2239,6 @@ protected override void OnHandleCreated(EventArgs e)
22392239
UpdateScrollbarManager();
22402240
}
22412241
}
2242-
{
2243-
// Let base class do standard stuff
2244-
base.OnHandleCreated(e);
2245-
2246-
// Force the font to be set into the text box child control
2247-
PerformNeedPaint(false);
2248-
2249-
// We need a layout to occur before any painting
2250-
InvokeLayout();
2251-
}
22522242

22532243
/// <summary>
22542244
/// Processes a notification from palette storage of a paint and optional layout required.

Source/Krypton Components/Krypton.Toolkit/Controls Toolkit/KryptonGroup.cs

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -393,13 +393,6 @@ protected override void Dispose(bool disposing)
393393
}
394394
base.Dispose(disposing);
395395
}
396-
{
397-
// Let base class do standard stuff
398-
base.OnHandleCreated(e);
399-
400-
// We need a layout to occur before any painting
401-
InvokeLayout();
402-
}
403396

404397
/// <summary>
405398
/// Raises the Initialized event.

0 commit comments

Comments
 (0)