Skip to content

Add example cs files#26

Open
dejarno wants to merge 1 commit into
mainfrom
test-openedge
Open

Add example cs files#26
dejarno wants to merge 1 commit into
mainfrom
test-openedge

Conversation

@dejarno

@dejarno dejarno commented Feb 13, 2026

Copy link
Copy Markdown
Owner

Summary by CodeRabbit

  • New Features
    • Added C# WinForms example application demonstrating signature generation with customizable input fields, live preview display, and copy-to-clipboard functionality.
    • Added template settings management form example showcasing template selection, configuration options, and toggleable features for signature customization.

@coderabbitai

coderabbitai Bot commented Feb 13, 2026

Copy link
Copy Markdown
📝 Walkthrough

Walkthrough

Four new C# WinForms example files are introduced: SignatureGeneratorForm for composing and copying email signatures from user inputs, and TemplateSettingsForm for managing signature templates with configuration options like phone and website inclusion.

Changes

Cohort / File(s) Summary
SignatureGeneratorForm
examples/csharp/SignatureGeneratorForm.Designer.cs, examples/csharp/SignatureGeneratorForm.cs
New WinForms form for building email signatures. Designer defines UI controls (labels, textboxes, preview area, buttons). Implementation provides btnGenerate_Click to assemble signature strings from name, title, company, and email fields, and btnCopy_Click to copy the preview to clipboard with validation.
TemplateSettingsForm
examples/csharp/TemplateSettingsForm.Designer.cs, examples/csharp/TemplateSettingsForm.cs
New WinForms form for template management. Designer defines ListBox for templates, TextBox for name, CheckBoxes for settings (phone/website), and Save/Close buttons. Implementation binds "Default", "Compact", "Sales" templates, updates UI on selection, enforces conditional checkbox logic (Compact disables phone), and validates on save.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Poem

🐰 Hops of joy for forms so bright,
Signatures and templates take flight,
With copy and paste, a designer's delight,
Windows Forms dancing in C# light!

🚥 Pre-merge checks | ✅ 3 | ❌ 1
❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'Add example cs files' accurately describes the main change: adding example C# (cs) files to the repository.
Merge Conflict Detection ✅ Passed ✅ No merge conflicts detected when merging into main

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch test-openedge

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@greptile-apps greptile-apps Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Your free trial has ended. If you'd like to continue receiving code reviews, you can add a payment method here.

@sonarqubecloud

Copy link
Copy Markdown

@codspeed-hq

codspeed-hq Bot commented Feb 13, 2026

Copy link
Copy Markdown

Merging this PR will create unknown performance changes

⚠️ No benchmarks were detected in both the base of the PR and the PR.
Please ensure that your benchmarks are correctly instrumented with CodSpeed.

Check out the benchmarks creation guide


Comparing test-openedge (b5cacae) with main (61e9d5e)

Open in CodSpeed

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Fix all issues with AI agents
In `@examples/csharp/TemplateSettingsForm.cs`:
- Around line 22-28: lstTemplates_SelectedIndexChanged currently forces
chkIncludeWebsite.Checked = true which overrides user changes; update this
handler (lstTemplates_SelectedIndexChanged) to either (a) remove or disable
chkIncludeWebsite if every template must include a website, or (b) drive
chkIncludeWebsite.Checked from template-specific defaults similar to
chkIncludePhone (use txtTemplateName/SelectedItem to look up a per-template
default and assign that boolean) so user intent is not silently reverted. Ensure
you reference chkIncludeWebsite and chkIncludePhone in the change and only set
chkIncludeWebsite when you have a template-specific default; otherwise leave it
enabled for user control.
🧹 Nitpick comments (1)
examples/csharp/SignatureGeneratorForm.cs (1)

13-20: Hardcoded company name reduces example reusability.

"Acme Systems" is hardcoded in the signature output while all other fields come from user input. Consider adding a txtCompany text box (consistent with the other fields) or at least extracting it to a constant, so the example better demonstrates the signature generator pattern.

Comment on lines +22 to +28
private void lstTemplates_SelectedIndexChanged(object sender, EventArgs e)
{
txtTemplateName.Text = lstTemplates.SelectedItem?.ToString() ?? string.Empty;

chkIncludePhone.Checked = txtTemplateName.Text != "Compact";
chkIncludeWebsite.Checked = true;
}

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor

chkIncludeWebsite is always forced to true, ignoring user intent.

Every time the selected template changes, chkIncludeWebsite.Checked is unconditionally set to true (Line 27). Unlike chkIncludePhone, which varies by template, the website checkbox can never reflect a per-template default of false, and any manual uncheck by the user is silently reverted on the next selection change.

If the intent is that all templates include a website, the checkbox should probably be removed or disabled. Otherwise, consider driving it from template-specific logic like you do for chkIncludePhone.

🤖 Prompt for AI Agents
In `@examples/csharp/TemplateSettingsForm.cs` around lines 22 - 28,
lstTemplates_SelectedIndexChanged currently forces chkIncludeWebsite.Checked =
true which overrides user changes; update this handler
(lstTemplates_SelectedIndexChanged) to either (a) remove or disable
chkIncludeWebsite if every template must include a website, or (b) drive
chkIncludeWebsite.Checked from template-specific defaults similar to
chkIncludePhone (use txtTemplateName/SelectedItem to look up a per-template
default and assign that boolean) so user intent is not silently reverted. Ensure
you reference chkIncludeWebsite and chkIncludePhone in the change and only set
chkIncludeWebsite when you have a template-specific default; otherwise leave it
enabled for user control.

@dejarno

dejarno commented Feb 18, 2026

Copy link
Copy Markdown
Owner Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant