AskYesNoForm, AskYesNoOp, MessageBoxForm and MessageBoxOp fixed, bug was introduced when measuring the string length.
This commit is contained in:
@@ -10,19 +10,17 @@ namespace TBF.BenchControl.Operations
|
||||
{
|
||||
public partial class MessageBoxForm : Form, GenericDevices.IHasCompleted
|
||||
{
|
||||
public string Message;
|
||||
|
||||
/// Set to 'true' when the form closes
|
||||
public bool Completed { get { return completed; } }
|
||||
bool completed;
|
||||
|
||||
|
||||
public MessageBoxForm()
|
||||
public MessageBoxForm(string message)
|
||||
{
|
||||
InitializeComponent();
|
||||
|
||||
Localize();
|
||||
messageLabel.Text = Message;
|
||||
messageLabel.Text = message;
|
||||
|
||||
float textWidth = Graphics.FromImage(new Bitmap(1, 1)).MeasureString(messageLabel.Text, messageLabel.Font).Width;
|
||||
int rqrdFormWidth = (int)textWidth + 80; /// Form width calculated from the text width
|
||||
|
||||
Reference in New Issue
Block a user