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
4 changes: 2 additions & 2 deletions CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,10 @@ Since the solution targets both .NET Framework 4.8 and .NET Core, use MSBuild in
"P:\Program Files\Microsoft Visual Studio\18\Community\MSBuild\Current\Bin\msbuild.exe" InfoBox.sln

# Build with specific configuration
"P:\Program Files\Microsoft Visual Studio\18\Community\MSBuild\Current\Bin\msbuild.exe" InfoBox.sln /p:Configuration=Release
"P:\Program Files\Microsoft Visual Studio\18\Community\MSBuild\Current\Bin\msbuild.exe" InfoBox.sln -p:Configuration=Release

# Rebuild all (clean + build)
"P:\Program Files\Microsoft Visual Studio\18\Community\MSBuild\Current\Bin\msbuild.exe" InfoBox.sln /t:Rebuild
"P:\Program Files\Microsoft Visual Studio\18\Community\MSBuild\Current\Bin\msbuild.exe" InfoBox.sln -t:Rebuild

# Run tests
dotnet test
Expand Down
1 change: 1 addition & 0 deletions InfoBox.Designer/InfoBox.Designer.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@
<Reference Include="System" />
<Reference Include="System.Data" />
<Reference Include="System.Drawing" />
<Reference Include="System.Net.Http" />
<Reference Include="System.Windows.Forms" />
<Reference Include="System.Xml" />
</ItemGroup>
Expand Down
18 changes: 16 additions & 2 deletions InfoBox.Designer/InformationBoxDesigner.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

28 changes: 28 additions & 0 deletions InfoBox.Designer/InformationBoxDesigner.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ namespace InfoBox.Designer
using System;
using System.Drawing;
using System.Globalization;
using System.Net.Http;
using System.Threading;
using System.Windows.Forms;

Expand Down Expand Up @@ -896,6 +897,33 @@ private void BtnEditText_Click(object sender, EventArgs e)
this.textEditorForm.BringToFront();
}

/// <summary>
/// Handles the Click event of the btnLoremIpsum control.
/// </summary>
/// <param name="sender">The source of the event.</param>
/// <param name="e">The <see cref="EventArgs"/> instance containing the event data.</param>
private async void BtnLoremIpsum_Click(object sender, EventArgs e)
{
try
{
this.btnLoremIpsum.Enabled = false;
using (var client = new HttpClient())
{
string text = await client.GetStringAsync("https://lorem-api.com/api/lorem?paragraphs=10&seed=InfoBox");
this.txbText.Text = text;
this.txbTitle.Text = "Lorem Ipsum";
}
}
catch (Exception ex)
{
MessageBox.Show("Failed to fetch Lorem Ipsum text: " + ex.Message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
}
finally
{
this.btnLoremIpsum.Enabled = true;
}
}

#endregion Event handlers
}
}
5 changes: 4 additions & 1 deletion InfoBox.Designer/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ namespace InfoBox.Designer
{
using System;
using System.Windows.Forms;

/// <summary>
/// Entry point for the designer
/// </summary>
Expand All @@ -20,6 +20,9 @@ public static class Program
[STAThread]
public static void Main()
{
#if NET5_0_OR_GREATER
Application.SetHighDpiMode(HighDpiMode.PerMonitorV2);
#endif
Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);
Application.Run(new InformationBoxDesigner());
Expand Down
4 changes: 2 additions & 2 deletions InfoBox.Designer/TextEditorForm.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 7 additions & 0 deletions InfoBox.Designer/TextEditorForm.cs
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,13 @@ public partial class TextEditorForm : Form
private readonly InformationBoxDesigner parentDesigner;
private bool isUpdating = false;

/// <summary>
/// Initializes a new instance of the <see cref="TextEditorForm"/> class.
/// </summary>
private TextEditorForm()
{
}

/// <summary>
/// Initializes a new instance of the <see cref="TextEditorForm"/> class.
/// </summary>
Expand Down
5 changes: 2 additions & 3 deletions InfoBox/Form/InformationBoxForm.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading
Loading