Skip to content

Commit

Permalink
Merge pull request #347 from open-ephys/issue-345
Browse files Browse the repository at this point in the history
Rhs2116 - Search through possible step sizes to find global step size
  • Loading branch information
bparks13 authored Nov 19, 2024
2 parents d9a0c87 + 3ce88b2 commit 66e4af3
Show file tree
Hide file tree
Showing 8 changed files with 2,393 additions and 216 deletions.
127 changes: 127 additions & 0 deletions OpenEphys.Onix1.Design/CustomMessageBox.Designer.cs

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

31 changes: 31 additions & 0 deletions OpenEphys.Onix1.Design/CustomMessageBox.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
using System.Windows.Forms;

namespace OpenEphys.Onix1.Design
{
/// <summary>
/// Create a custom message box form that allows for custom button names
/// </summary>
public partial class CustomMessageBox : Form
{
/// <summary>
/// Initialize a new custom message box form
/// </summary>
public CustomMessageBox(string message, string title = "Message", string confirmText = "Confirm", string cancelText = "Cancel")
{
InitializeComponent();

label1.Text = message;

var size = TextRenderer.MeasureText(label1.Text, label1.Font, label1.Size, TextFormatFlags.WordBreak);

if (size.Height > label1.Height)
{
Height += size.Height - label1.Height;
}

Text = title;
buttonConfirm.Text = confirmText;
buttonCancel.Text = cancelText;
}
}
}
Loading

0 comments on commit 66e4af3

Please sign in to comment.