|
@@ -51,7 +51,7 @@ public class DialogTests
|
|
// Now add a second button
|
|
// Now add a second button
|
|
buttonRow = $"{CM.Glyphs.VLine} {btn1} {btn2} {CM.Glyphs.VLine}";
|
|
buttonRow = $"{CM.Glyphs.VLine} {btn1} {btn2} {CM.Glyphs.VLine}";
|
|
dlg.AddButton (new () { Text = btn2Text });
|
|
dlg.AddButton (new () { Text = btn2Text });
|
|
-
|
|
|
|
|
|
+
|
|
RunIteration (ref runstate);
|
|
RunIteration (ref runstate);
|
|
TestHelpers.AssertDriverContentsWithFrameAre ($"{buttonRow}", _output);
|
|
TestHelpers.AssertDriverContentsWithFrameAre ($"{buttonRow}", _output);
|
|
End (runstate);
|
|
End (runstate);
|
|
@@ -160,7 +160,7 @@ public class DialogTests
|
|
|
|
|
|
|
|
|
|
// Default - Center
|
|
// Default - Center
|
|
- (runstate, Dialog dlg) = RunButtonTestDialog (
|
|
|
|
|
|
+ (runstate, Dialog dlg) = BeginButtonTestDialog (
|
|
title,
|
|
title,
|
|
width,
|
|
width,
|
|
Alignment.Center,
|
|
Alignment.Center,
|
|
@@ -177,7 +177,7 @@ public class DialogTests
|
|
buttonRow = $"{CM.Glyphs.VLine}{btn1} {btn2} {btn3} {btn4}{CM.Glyphs.VLine}";
|
|
buttonRow = $"{CM.Glyphs.VLine}{btn1} {btn2} {btn3} {btn4}{CM.Glyphs.VLine}";
|
|
Assert.Equal (width, buttonRow.Length);
|
|
Assert.Equal (width, buttonRow.Length);
|
|
|
|
|
|
- (runstate, dlg) = RunButtonTestDialog (
|
|
|
|
|
|
+ (runstate, dlg) = BeginButtonTestDialog (
|
|
title,
|
|
title,
|
|
width,
|
|
width,
|
|
Alignment.Fill,
|
|
Alignment.Fill,
|
|
@@ -194,7 +194,7 @@ public class DialogTests
|
|
buttonRow = $"{CM.Glyphs.VLine} {btn1} {btn2} {btn3} {btn4}{CM.Glyphs.VLine}";
|
|
buttonRow = $"{CM.Glyphs.VLine} {btn1} {btn2} {btn3} {btn4}{CM.Glyphs.VLine}";
|
|
Assert.Equal (width, buttonRow.Length);
|
|
Assert.Equal (width, buttonRow.Length);
|
|
|
|
|
|
- (runstate, dlg) = RunButtonTestDialog (
|
|
|
|
|
|
+ (runstate, dlg) = BeginButtonTestDialog (
|
|
title,
|
|
title,
|
|
width,
|
|
width,
|
|
Alignment.End,
|
|
Alignment.End,
|
|
@@ -211,7 +211,7 @@ public class DialogTests
|
|
buttonRow = $"{CM.Glyphs.VLine}{btn1} {btn2} {btn3} {btn4} {CM.Glyphs.VLine}";
|
|
buttonRow = $"{CM.Glyphs.VLine}{btn1} {btn2} {btn3} {btn4} {CM.Glyphs.VLine}";
|
|
Assert.Equal (width, buttonRow.Length);
|
|
Assert.Equal (width, buttonRow.Length);
|
|
|
|
|
|
- (runstate, dlg) = RunButtonTestDialog (
|
|
|
|
|
|
+ (runstate, dlg) = BeginButtonTestDialog (
|
|
title,
|
|
title,
|
|
width,
|
|
width,
|
|
Alignment.Start,
|
|
Alignment.Start,
|
|
@@ -255,7 +255,7 @@ public class DialogTests
|
|
buttonRow =
|
|
buttonRow =
|
|
$"{CM.Glyphs.VLine} yes {CM.Glyphs.RightBracket}{btn2}{btn3}{CM.Glyphs.LeftBracket} never{CM.Glyphs.VLine}";
|
|
$"{CM.Glyphs.VLine} yes {CM.Glyphs.RightBracket}{btn2}{btn3}{CM.Glyphs.LeftBracket} never{CM.Glyphs.VLine}";
|
|
|
|
|
|
- (runstate, Dialog dlg) = RunButtonTestDialog (
|
|
|
|
|
|
+ (runstate, Dialog dlg) = BeginButtonTestDialog (
|
|
title,
|
|
title,
|
|
width,
|
|
width,
|
|
Alignment.Center,
|
|
Alignment.Center,
|
|
@@ -273,7 +273,7 @@ public class DialogTests
|
|
buttonRow =
|
|
buttonRow =
|
|
$"{CM.Glyphs.VLine}{CM.Glyphs.LeftBracket} yes {CM.Glyphs.LeftBracket} no {CM.Glyphs.LeftBracket} maybe {CM.Glyphs.LeftBracket} never {CM.Glyphs.RightBracket}{CM.Glyphs.VLine}";
|
|
$"{CM.Glyphs.VLine}{CM.Glyphs.LeftBracket} yes {CM.Glyphs.LeftBracket} no {CM.Glyphs.LeftBracket} maybe {CM.Glyphs.LeftBracket} never {CM.Glyphs.RightBracket}{CM.Glyphs.VLine}";
|
|
|
|
|
|
- (runstate, dlg) = RunButtonTestDialog (
|
|
|
|
|
|
+ (runstate, dlg) = BeginButtonTestDialog (
|
|
title,
|
|
title,
|
|
width,
|
|
width,
|
|
Alignment.Fill,
|
|
Alignment.Fill,
|
|
@@ -290,7 +290,7 @@ public class DialogTests
|
|
buttonRow = $"{CM.Glyphs.VLine}es {CM.Glyphs.RightBracket}{btn2}{btn3}{btn4}{CM.Glyphs.VLine}";
|
|
buttonRow = $"{CM.Glyphs.VLine}es {CM.Glyphs.RightBracket}{btn2}{btn3}{btn4}{CM.Glyphs.VLine}";
|
|
Assert.Equal (width, buttonRow.Length);
|
|
Assert.Equal (width, buttonRow.Length);
|
|
|
|
|
|
- (runstate, dlg) = RunButtonTestDialog (
|
|
|
|
|
|
+ (runstate, dlg) = BeginButtonTestDialog (
|
|
title,
|
|
title,
|
|
width,
|
|
width,
|
|
Alignment.End,
|
|
Alignment.End,
|
|
@@ -306,7 +306,7 @@ public class DialogTests
|
|
// Left
|
|
// Left
|
|
buttonRow = $"{CM.Glyphs.VLine}{btn1}{btn2}{btn3}{CM.Glyphs.LeftBracket} neve{CM.Glyphs.VLine}";
|
|
buttonRow = $"{CM.Glyphs.VLine}{btn1}{btn2}{btn3}{CM.Glyphs.LeftBracket} neve{CM.Glyphs.VLine}";
|
|
|
|
|
|
- (runstate, dlg) = RunButtonTestDialog (
|
|
|
|
|
|
+ (runstate, dlg) = BeginButtonTestDialog (
|
|
title,
|
|
title,
|
|
width,
|
|
width,
|
|
Alignment.Start,
|
|
Alignment.Start,
|
|
@@ -349,7 +349,7 @@ public class DialogTests
|
|
d.SetBufferSize (buttonRow.Length, 1);
|
|
d.SetBufferSize (buttonRow.Length, 1);
|
|
|
|
|
|
// Default - Center
|
|
// Default - Center
|
|
- (runstate, Dialog dlg) = RunButtonTestDialog (
|
|
|
|
|
|
+ (runstate, Dialog dlg) = BeginButtonTestDialog (
|
|
title,
|
|
title,
|
|
width,
|
|
width,
|
|
Alignment.Center,
|
|
Alignment.Center,
|
|
@@ -366,7 +366,7 @@ public class DialogTests
|
|
buttonRow = $"{CM.Glyphs.VLine}{btn1} {btn2} {btn3} {btn4}{CM.Glyphs.VLine}";
|
|
buttonRow = $"{CM.Glyphs.VLine}{btn1} {btn2} {btn3} {btn4}{CM.Glyphs.VLine}";
|
|
Assert.Equal (width, buttonRow.Length);
|
|
Assert.Equal (width, buttonRow.Length);
|
|
|
|
|
|
- (runstate, dlg) = RunButtonTestDialog (
|
|
|
|
|
|
+ (runstate, dlg) = BeginButtonTestDialog (
|
|
title,
|
|
title,
|
|
width,
|
|
width,
|
|
Alignment.Fill,
|
|
Alignment.Fill,
|
|
@@ -383,7 +383,7 @@ public class DialogTests
|
|
buttonRow = $"{CM.Glyphs.VLine} {btn1} {btn2} {btn3} {btn4}{CM.Glyphs.VLine}";
|
|
buttonRow = $"{CM.Glyphs.VLine} {btn1} {btn2} {btn3} {btn4}{CM.Glyphs.VLine}";
|
|
Assert.Equal (width, buttonRow.Length);
|
|
Assert.Equal (width, buttonRow.Length);
|
|
|
|
|
|
- (runstate, dlg) = RunButtonTestDialog (
|
|
|
|
|
|
+ (runstate, dlg) = BeginButtonTestDialog (
|
|
title,
|
|
title,
|
|
width,
|
|
width,
|
|
Alignment.End,
|
|
Alignment.End,
|
|
@@ -400,7 +400,7 @@ public class DialogTests
|
|
buttonRow = $"{CM.Glyphs.VLine}{btn1} {btn2} {btn3} {btn4} {CM.Glyphs.VLine}";
|
|
buttonRow = $"{CM.Glyphs.VLine}{btn1} {btn2} {btn3} {btn4} {CM.Glyphs.VLine}";
|
|
Assert.Equal (width, buttonRow.Length);
|
|
Assert.Equal (width, buttonRow.Length);
|
|
|
|
|
|
- (runstate, dlg) = RunButtonTestDialog (
|
|
|
|
|
|
+ (runstate, dlg) = BeginButtonTestDialog (
|
|
title,
|
|
title,
|
|
width,
|
|
width,
|
|
Alignment.Start,
|
|
Alignment.Start,
|
|
@@ -445,7 +445,7 @@ public class DialogTests
|
|
d.SetBufferSize (width, 3);
|
|
d.SetBufferSize (width, 3);
|
|
|
|
|
|
// Default - Center
|
|
// Default - Center
|
|
- (runstate, Dialog dlg) = RunButtonTestDialog (
|
|
|
|
|
|
+ (runstate, Dialog dlg) = BeginButtonTestDialog (
|
|
title,
|
|
title,
|
|
width,
|
|
width,
|
|
Alignment.Center,
|
|
Alignment.Center,
|
|
@@ -462,7 +462,7 @@ public class DialogTests
|
|
buttonRow = $"{CM.Glyphs.VLine}{btn1} {btn2} {btn3} {btn4}{CM.Glyphs.VLine}";
|
|
buttonRow = $"{CM.Glyphs.VLine}{btn1} {btn2} {btn3} {btn4}{CM.Glyphs.VLine}";
|
|
Assert.Equal (width, buttonRow.GetColumns ());
|
|
Assert.Equal (width, buttonRow.GetColumns ());
|
|
|
|
|
|
- (runstate, dlg) = RunButtonTestDialog (
|
|
|
|
|
|
+ (runstate, dlg) = BeginButtonTestDialog (
|
|
title,
|
|
title,
|
|
width,
|
|
width,
|
|
Alignment.Fill,
|
|
Alignment.Fill,
|
|
@@ -479,7 +479,7 @@ public class DialogTests
|
|
buttonRow = $"{CM.Glyphs.VLine} {btn1} {btn2} {btn3} {btn4}{CM.Glyphs.VLine}";
|
|
buttonRow = $"{CM.Glyphs.VLine} {btn1} {btn2} {btn3} {btn4}{CM.Glyphs.VLine}";
|
|
Assert.Equal (width, buttonRow.GetColumns ());
|
|
Assert.Equal (width, buttonRow.GetColumns ());
|
|
|
|
|
|
- (runstate, dlg) = RunButtonTestDialog (
|
|
|
|
|
|
+ (runstate, dlg) = BeginButtonTestDialog (
|
|
title,
|
|
title,
|
|
width,
|
|
width,
|
|
Alignment.End,
|
|
Alignment.End,
|
|
@@ -496,7 +496,7 @@ public class DialogTests
|
|
buttonRow = $"{CM.Glyphs.VLine}{btn1} {btn2} {btn3} {btn4} {CM.Glyphs.VLine}";
|
|
buttonRow = $"{CM.Glyphs.VLine}{btn1} {btn2} {btn3} {btn4} {CM.Glyphs.VLine}";
|
|
Assert.Equal (width, buttonRow.GetColumns ());
|
|
Assert.Equal (width, buttonRow.GetColumns ());
|
|
|
|
|
|
- (runstate, dlg) = RunButtonTestDialog (
|
|
|
|
|
|
+ (runstate, dlg) = BeginButtonTestDialog (
|
|
title,
|
|
title,
|
|
width,
|
|
width,
|
|
Alignment.Start,
|
|
Alignment.Start,
|
|
@@ -530,7 +530,7 @@ public class DialogTests
|
|
|
|
|
|
d.SetBufferSize (width, 1);
|
|
d.SetBufferSize (width, 1);
|
|
|
|
|
|
- (runstate, Dialog dlg) = RunButtonTestDialog (
|
|
|
|
|
|
+ (runstate, Dialog dlg) = BeginButtonTestDialog (
|
|
title,
|
|
title,
|
|
width,
|
|
width,
|
|
Alignment.Center,
|
|
Alignment.Center,
|
|
@@ -547,7 +547,7 @@ public class DialogTests
|
|
$"{CM.Glyphs.VLine}{CM.Glyphs.LeftBracket} {btnText} {CM.Glyphs.RightBracket} {CM.Glyphs.VLine}";
|
|
$"{CM.Glyphs.VLine}{CM.Glyphs.LeftBracket} {btnText} {CM.Glyphs.RightBracket} {CM.Glyphs.VLine}";
|
|
Assert.Equal (width, buttonRow.Length);
|
|
Assert.Equal (width, buttonRow.Length);
|
|
|
|
|
|
- (runstate, dlg) = RunButtonTestDialog (
|
|
|
|
|
|
+ (runstate, dlg) = BeginButtonTestDialog (
|
|
title,
|
|
title,
|
|
width,
|
|
width,
|
|
Alignment.Fill,
|
|
Alignment.Fill,
|
|
@@ -562,7 +562,7 @@ public class DialogTests
|
|
$"{CM.Glyphs.VLine} {CM.Glyphs.LeftBracket} {btnText} {CM.Glyphs.RightBracket}{CM.Glyphs.VLine}";
|
|
$"{CM.Glyphs.VLine} {CM.Glyphs.LeftBracket} {btnText} {CM.Glyphs.RightBracket}{CM.Glyphs.VLine}";
|
|
Assert.Equal (width, buttonRow.Length);
|
|
Assert.Equal (width, buttonRow.Length);
|
|
|
|
|
|
- (runstate, dlg) = RunButtonTestDialog (
|
|
|
|
|
|
+ (runstate, dlg) = BeginButtonTestDialog (
|
|
title,
|
|
title,
|
|
width,
|
|
width,
|
|
Alignment.End,
|
|
Alignment.End,
|
|
@@ -577,7 +577,7 @@ public class DialogTests
|
|
$"{CM.Glyphs.VLine}{CM.Glyphs.LeftBracket} {btnText} {CM.Glyphs.RightBracket} {CM.Glyphs.VLine}";
|
|
$"{CM.Glyphs.VLine}{CM.Glyphs.LeftBracket} {btnText} {CM.Glyphs.RightBracket} {CM.Glyphs.VLine}";
|
|
Assert.Equal (width, buttonRow.Length);
|
|
Assert.Equal (width, buttonRow.Length);
|
|
|
|
|
|
- (runstate, dlg) = RunButtonTestDialog (
|
|
|
|
|
|
+ (runstate, dlg) = BeginButtonTestDialog (
|
|
title,
|
|
title,
|
|
width,
|
|
width,
|
|
Alignment.Start,
|
|
Alignment.Start,
|
|
@@ -594,7 +594,7 @@ public class DialogTests
|
|
|
|
|
|
d.SetBufferSize (width, 1);
|
|
d.SetBufferSize (width, 1);
|
|
|
|
|
|
- (runstate, dlg) = RunButtonTestDialog (
|
|
|
|
|
|
+ (runstate, dlg) = BeginButtonTestDialog (
|
|
title,
|
|
title,
|
|
width,
|
|
width,
|
|
Alignment.Center,
|
|
Alignment.Center,
|
|
@@ -609,7 +609,7 @@ public class DialogTests
|
|
$"{CM.Glyphs.VLine}{CM.Glyphs.LeftBracket} {btnText} {CM.Glyphs.RightBracket} {CM.Glyphs.VLine}";
|
|
$"{CM.Glyphs.VLine}{CM.Glyphs.LeftBracket} {btnText} {CM.Glyphs.RightBracket} {CM.Glyphs.VLine}";
|
|
Assert.Equal (width, buttonRow.Length);
|
|
Assert.Equal (width, buttonRow.Length);
|
|
|
|
|
|
- (runstate, dlg) = RunButtonTestDialog (
|
|
|
|
|
|
+ (runstate, dlg) = BeginButtonTestDialog (
|
|
title,
|
|
title,
|
|
width,
|
|
width,
|
|
Alignment.Fill,
|
|
Alignment.Fill,
|
|
@@ -624,7 +624,7 @@ public class DialogTests
|
|
$"{CM.Glyphs.VLine} {CM.Glyphs.LeftBracket} {btnText} {CM.Glyphs.RightBracket}{CM.Glyphs.VLine}";
|
|
$"{CM.Glyphs.VLine} {CM.Glyphs.LeftBracket} {btnText} {CM.Glyphs.RightBracket}{CM.Glyphs.VLine}";
|
|
Assert.Equal (width, buttonRow.Length);
|
|
Assert.Equal (width, buttonRow.Length);
|
|
|
|
|
|
- (runstate, dlg) = RunButtonTestDialog (
|
|
|
|
|
|
+ (runstate, dlg) = BeginButtonTestDialog (
|
|
title,
|
|
title,
|
|
width,
|
|
width,
|
|
Alignment.End,
|
|
Alignment.End,
|
|
@@ -639,7 +639,7 @@ public class DialogTests
|
|
$"{CM.Glyphs.VLine}{CM.Glyphs.LeftBracket} {btnText} {CM.Glyphs.RightBracket} {CM.Glyphs.VLine}";
|
|
$"{CM.Glyphs.VLine}{CM.Glyphs.LeftBracket} {btnText} {CM.Glyphs.RightBracket} {CM.Glyphs.VLine}";
|
|
Assert.Equal (width, buttonRow.Length);
|
|
Assert.Equal (width, buttonRow.Length);
|
|
|
|
|
|
- (runstate, dlg) = RunButtonTestDialog (
|
|
|
|
|
|
+ (runstate, dlg) = BeginButtonTestDialog (
|
|
title,
|
|
title,
|
|
width,
|
|
width,
|
|
Alignment.Start,
|
|
Alignment.Start,
|
|
@@ -675,7 +675,7 @@ public class DialogTests
|
|
|
|
|
|
d.SetBufferSize (buttonRow.Length, 3);
|
|
d.SetBufferSize (buttonRow.Length, 3);
|
|
|
|
|
|
- (runstate, Dialog dlg) = RunButtonTestDialog (
|
|
|
|
|
|
+ (runstate, Dialog dlg) = BeginButtonTestDialog (
|
|
title,
|
|
title,
|
|
width,
|
|
width,
|
|
Alignment.Center,
|
|
Alignment.Center,
|
|
@@ -691,7 +691,7 @@ public class DialogTests
|
|
buttonRow = $@"{CM.Glyphs.VLine}{btn1} {btn2} {btn3}{CM.Glyphs.VLine}";
|
|
buttonRow = $@"{CM.Glyphs.VLine}{btn1} {btn2} {btn3}{CM.Glyphs.VLine}";
|
|
Assert.Equal (width, buttonRow.Length);
|
|
Assert.Equal (width, buttonRow.Length);
|
|
|
|
|
|
- (runstate, dlg) = RunButtonTestDialog (
|
|
|
|
|
|
+ (runstate, dlg) = BeginButtonTestDialog (
|
|
title,
|
|
title,
|
|
width,
|
|
width,
|
|
Alignment.Fill,
|
|
Alignment.Fill,
|
|
@@ -707,7 +707,7 @@ public class DialogTests
|
|
buttonRow = $@"{CM.Glyphs.VLine} {btn1} {btn2} {btn3}{CM.Glyphs.VLine}";
|
|
buttonRow = $@"{CM.Glyphs.VLine} {btn1} {btn2} {btn3}{CM.Glyphs.VLine}";
|
|
Assert.Equal (width, buttonRow.Length);
|
|
Assert.Equal (width, buttonRow.Length);
|
|
|
|
|
|
- (runstate, dlg) = RunButtonTestDialog (
|
|
|
|
|
|
+ (runstate, dlg) = BeginButtonTestDialog (
|
|
title,
|
|
title,
|
|
width,
|
|
width,
|
|
Alignment.End,
|
|
Alignment.End,
|
|
@@ -723,7 +723,7 @@ public class DialogTests
|
|
buttonRow = $@"{CM.Glyphs.VLine}{btn1} {btn2} {btn3} {CM.Glyphs.VLine}";
|
|
buttonRow = $@"{CM.Glyphs.VLine}{btn1} {btn2} {btn3} {CM.Glyphs.VLine}";
|
|
Assert.Equal (width, buttonRow.Length);
|
|
Assert.Equal (width, buttonRow.Length);
|
|
|
|
|
|
- (runstate, dlg) = RunButtonTestDialog (
|
|
|
|
|
|
+ (runstate, dlg) = BeginButtonTestDialog (
|
|
title,
|
|
title,
|
|
width,
|
|
width,
|
|
Alignment.Start,
|
|
Alignment.Start,
|
|
@@ -759,7 +759,7 @@ public class DialogTests
|
|
|
|
|
|
d.SetBufferSize (buttonRow.Length, 3);
|
|
d.SetBufferSize (buttonRow.Length, 3);
|
|
|
|
|
|
- (runstate, Dialog dlg) = RunButtonTestDialog (
|
|
|
|
|
|
+ (runstate, Dialog dlg) = BeginButtonTestDialog (
|
|
title,
|
|
title,
|
|
width,
|
|
width,
|
|
Alignment.Center,
|
|
Alignment.Center,
|
|
@@ -774,7 +774,7 @@ public class DialogTests
|
|
buttonRow = $@"{CM.Glyphs.VLine}{btn1} {btn2}{CM.Glyphs.VLine}";
|
|
buttonRow = $@"{CM.Glyphs.VLine}{btn1} {btn2}{CM.Glyphs.VLine}";
|
|
Assert.Equal (width, buttonRow.Length);
|
|
Assert.Equal (width, buttonRow.Length);
|
|
|
|
|
|
- (runstate, dlg) = RunButtonTestDialog (
|
|
|
|
|
|
+ (runstate, dlg) = BeginButtonTestDialog (
|
|
title,
|
|
title,
|
|
width,
|
|
width,
|
|
Alignment.Fill,
|
|
Alignment.Fill,
|
|
@@ -789,7 +789,7 @@ public class DialogTests
|
|
buttonRow = $@"{CM.Glyphs.VLine} {btn1} {btn2}{CM.Glyphs.VLine}";
|
|
buttonRow = $@"{CM.Glyphs.VLine} {btn1} {btn2}{CM.Glyphs.VLine}";
|
|
Assert.Equal (width, buttonRow.Length);
|
|
Assert.Equal (width, buttonRow.Length);
|
|
|
|
|
|
- (runstate, dlg) = RunButtonTestDialog (
|
|
|
|
|
|
+ (runstate, dlg) = BeginButtonTestDialog (
|
|
title,
|
|
title,
|
|
width,
|
|
width,
|
|
Alignment.End,
|
|
Alignment.End,
|
|
@@ -804,7 +804,7 @@ public class DialogTests
|
|
buttonRow = $@"{CM.Glyphs.VLine}{btn1} {btn2} {CM.Glyphs.VLine}";
|
|
buttonRow = $@"{CM.Glyphs.VLine}{btn1} {btn2} {CM.Glyphs.VLine}";
|
|
Assert.Equal (width, buttonRow.Length);
|
|
Assert.Equal (width, buttonRow.Length);
|
|
|
|
|
|
- (runstate, dlg) = RunButtonTestDialog (
|
|
|
|
|
|
+ (runstate, dlg) = BeginButtonTestDialog (
|
|
title,
|
|
title,
|
|
width,
|
|
width,
|
|
Alignment.Start,
|
|
Alignment.Start,
|
|
@@ -846,7 +846,7 @@ public class DialogTests
|
|
// Default (Center)
|
|
// Default (Center)
|
|
button1 = new Button { Text = btn1Text };
|
|
button1 = new Button { Text = btn1Text };
|
|
button2 = new Button { Text = btn2Text };
|
|
button2 = new Button { Text = btn2Text };
|
|
- (runstate, dlg) = RunButtonTestDialog (title, width, Alignment.Center, button1, button2);
|
|
|
|
|
|
+ (runstate, dlg) = BeginButtonTestDialog (title, width, Alignment.Center, button1, button2);
|
|
button1.Visible = false;
|
|
button1.Visible = false;
|
|
RunIteration (ref runstate, firstIteration);
|
|
RunIteration (ref runstate, firstIteration);
|
|
buttonRow = $@"{CM.Glyphs.VLine} {btn2} {CM.Glyphs.VLine}";
|
|
buttonRow = $@"{CM.Glyphs.VLine} {btn2} {CM.Glyphs.VLine}";
|
|
@@ -858,7 +858,7 @@ public class DialogTests
|
|
Assert.Equal (width, buttonRow.Length);
|
|
Assert.Equal (width, buttonRow.Length);
|
|
button1 = new Button { Text = btn1Text };
|
|
button1 = new Button { Text = btn1Text };
|
|
button2 = new Button { Text = btn2Text };
|
|
button2 = new Button { Text = btn2Text };
|
|
- (runstate, dlg) = RunButtonTestDialog (title, width, Alignment.Fill, button1, button2);
|
|
|
|
|
|
+ (runstate, dlg) = BeginButtonTestDialog (title, width, Alignment.Fill, button1, button2);
|
|
button1.Visible = false;
|
|
button1.Visible = false;
|
|
RunIteration (ref runstate, firstIteration);
|
|
RunIteration (ref runstate, firstIteration);
|
|
buttonRow = $@"{CM.Glyphs.VLine} {btn2}{CM.Glyphs.VLine}";
|
|
buttonRow = $@"{CM.Glyphs.VLine} {btn2}{CM.Glyphs.VLine}";
|
|
@@ -870,7 +870,7 @@ public class DialogTests
|
|
Assert.Equal (width, buttonRow.Length);
|
|
Assert.Equal (width, buttonRow.Length);
|
|
button1 = new Button { Text = btn1Text };
|
|
button1 = new Button { Text = btn1Text };
|
|
button2 = new Button { Text = btn2Text };
|
|
button2 = new Button { Text = btn2Text };
|
|
- (runstate, dlg) = RunButtonTestDialog (title, width, Alignment.End, button1, button2);
|
|
|
|
|
|
+ (runstate, dlg) = BeginButtonTestDialog (title, width, Alignment.End, button1, button2);
|
|
button1.Visible = false;
|
|
button1.Visible = false;
|
|
RunIteration (ref runstate, firstIteration);
|
|
RunIteration (ref runstate, firstIteration);
|
|
TestHelpers.AssertDriverContentsWithFrameAre ($"{buttonRow}", _output);
|
|
TestHelpers.AssertDriverContentsWithFrameAre ($"{buttonRow}", _output);
|
|
@@ -881,7 +881,7 @@ public class DialogTests
|
|
Assert.Equal (width, buttonRow.Length);
|
|
Assert.Equal (width, buttonRow.Length);
|
|
button1 = new Button { Text = btn1Text };
|
|
button1 = new Button { Text = btn1Text };
|
|
button2 = new Button { Text = btn2Text };
|
|
button2 = new Button { Text = btn2Text };
|
|
- (runstate, dlg) = RunButtonTestDialog (title, width, Alignment.Start, button1, button2);
|
|
|
|
|
|
+ (runstate, dlg) = BeginButtonTestDialog (title, width, Alignment.Start, button1, button2);
|
|
button1.Visible = false;
|
|
button1.Visible = false;
|
|
RunIteration (ref runstate, firstIteration);
|
|
RunIteration (ref runstate, firstIteration);
|
|
buttonRow = $@"{CM.Glyphs.VLine} {btn2} {CM.Glyphs.VLine}";
|
|
buttonRow = $@"{CM.Glyphs.VLine} {btn2} {CM.Glyphs.VLine}";
|
|
@@ -1323,7 +1323,7 @@ public class DialogTests
|
|
int width = buttonRow.Length;
|
|
int width = buttonRow.Length;
|
|
d.SetBufferSize (buttonRow.Length, 10);
|
|
d.SetBufferSize (buttonRow.Length, 10);
|
|
|
|
|
|
- (runstate, Dialog dlg) = RunButtonTestDialog (
|
|
|
|
|
|
+ (runstate, Dialog dlg) = BeginButtonTestDialog (
|
|
title,
|
|
title,
|
|
width,
|
|
width,
|
|
Alignment.Center,
|
|
Alignment.Center,
|
|
@@ -1382,14 +1382,15 @@ public class DialogTests
|
|
int width = buttonRow.Length;
|
|
int width = buttonRow.Length;
|
|
d.SetBufferSize (buttonRow.Length, 3);
|
|
d.SetBufferSize (buttonRow.Length, 3);
|
|
|
|
|
|
- (runstate, Dialog dlg) = RunButtonTestDialog (title, width, Alignment.Center, null);
|
|
|
|
|
|
+ (runstate, Dialog dlg) = BeginButtonTestDialog (title, width, Alignment.Center, null);
|
|
|
|
+
|
|
TestHelpers.AssertDriverContentsWithFrameAre ($"{buttonRow}", _output);
|
|
TestHelpers.AssertDriverContentsWithFrameAre ($"{buttonRow}", _output);
|
|
|
|
|
|
End (runstate);
|
|
End (runstate);
|
|
dlg.Dispose ();
|
|
dlg.Dispose ();
|
|
}
|
|
}
|
|
|
|
|
|
- private (RunState, Dialog) RunButtonTestDialog (
|
|
|
|
|
|
+ private (RunState, Dialog) BeginButtonTestDialog (
|
|
string title,
|
|
string title,
|
|
int width,
|
|
int width,
|
|
Alignment align,
|
|
Alignment align,
|
|
@@ -1416,7 +1417,14 @@ public class DialogTests
|
|
// Create with no top or bottom border to simplify testing button layout (no need to account for title etc..)
|
|
// Create with no top or bottom border to simplify testing button layout (no need to account for title etc..)
|
|
dlg.Border.Thickness = new (1, 0, 1, 0);
|
|
dlg.Border.Thickness = new (1, 0, 1, 0);
|
|
|
|
|
|
- return (Begin (dlg), dlg);
|
|
|
|
|
|
+ RunState runState = Begin (dlg);
|
|
|
|
+
|
|
|
|
+ dlg.SetNeedsDisplay();
|
|
|
|
+ dlg.SetLayoutNeeded ();
|
|
|
|
+ dlg.Layout ();
|
|
|
|
+ dlg.Draw ();
|
|
|
|
+
|
|
|
|
+ return (runState, dlg);
|
|
}
|
|
}
|
|
|
|
|
|
[Fact]
|
|
[Fact]
|