|
@@ -39,7 +39,7 @@ public class DialogTests
|
|
Width = width,
|
|
Width = width,
|
|
Height = 1,
|
|
Height = 1,
|
|
ButtonAlignment = Alignment.Center,
|
|
ButtonAlignment = Alignment.Center,
|
|
- Buttons = [new Button { Text = btn1Text }]
|
|
|
|
|
|
+ Buttons = [new() { Text = btn1Text }]
|
|
};
|
|
};
|
|
|
|
|
|
// 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..)
|
|
@@ -67,7 +67,7 @@ public class DialogTests
|
|
Width = width,
|
|
Width = width,
|
|
Height = 1,
|
|
Height = 1,
|
|
ButtonAlignment = Alignment.Fill,
|
|
ButtonAlignment = Alignment.Fill,
|
|
- Buttons = [new Button { Text = btn1Text }]
|
|
|
|
|
|
+ Buttons = [new() { Text = btn1Text }]
|
|
};
|
|
};
|
|
|
|
|
|
// 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..)
|
|
@@ -94,7 +94,7 @@ public class DialogTests
|
|
Width = width,
|
|
Width = width,
|
|
Height = 1,
|
|
Height = 1,
|
|
ButtonAlignment = Alignment.End,
|
|
ButtonAlignment = Alignment.End,
|
|
- Buttons = [new Button { Text = btn1Text }]
|
|
|
|
|
|
+ Buttons = [new() { Text = btn1Text }]
|
|
};
|
|
};
|
|
|
|
|
|
// 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..)
|
|
@@ -122,7 +122,7 @@ public class DialogTests
|
|
Width = width,
|
|
Width = width,
|
|
Height = 1,
|
|
Height = 1,
|
|
ButtonAlignment = Alignment.Start,
|
|
ButtonAlignment = Alignment.Start,
|
|
- Buttons = [new Button { Text = btn1Text }]
|
|
|
|
|
|
+ Buttons = [new() { Text = btn1Text }]
|
|
};
|
|
};
|
|
|
|
|
|
// 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..)
|
|
@@ -169,17 +169,16 @@ public class DialogTests
|
|
int width = buttonRow.Length;
|
|
int width = buttonRow.Length;
|
|
d.SetBufferSize (buttonRow.Length, 3);
|
|
d.SetBufferSize (buttonRow.Length, 3);
|
|
|
|
|
|
-
|
|
|
|
// Default - Center
|
|
// Default - Center
|
|
(runstate, Dialog dlg) = BeginButtonTestDialog (
|
|
(runstate, Dialog dlg) = BeginButtonTestDialog (
|
|
- title,
|
|
|
|
- width,
|
|
|
|
- Alignment.Center,
|
|
|
|
- new Button { Text = btn1Text },
|
|
|
|
- new Button { Text = btn2Text },
|
|
|
|
- new Button { Text = btn3Text },
|
|
|
|
- new Button { Text = btn4Text }
|
|
|
|
- );
|
|
|
|
|
|
+ title,
|
|
|
|
+ width,
|
|
|
|
+ Alignment.Center,
|
|
|
|
+ new Button { Text = btn1Text },
|
|
|
|
+ new Button { Text = btn2Text },
|
|
|
|
+ new Button { Text = btn3Text },
|
|
|
|
+ new Button { Text = btn4Text }
|
|
|
|
+ );
|
|
TestHelpers.AssertDriverContentsWithFrameAre ($"{buttonRow}", _output);
|
|
TestHelpers.AssertDriverContentsWithFrameAre ($"{buttonRow}", _output);
|
|
End (runstate);
|
|
End (runstate);
|
|
dlg.Dispose ();
|
|
dlg.Dispose ();
|
|
@@ -189,14 +188,14 @@ public class DialogTests
|
|
Assert.Equal (width, buttonRow.Length);
|
|
Assert.Equal (width, buttonRow.Length);
|
|
|
|
|
|
(runstate, dlg) = BeginButtonTestDialog (
|
|
(runstate, dlg) = BeginButtonTestDialog (
|
|
- title,
|
|
|
|
- width,
|
|
|
|
- Alignment.Fill,
|
|
|
|
- new Button { Text = btn1Text },
|
|
|
|
- new Button { Text = btn2Text },
|
|
|
|
- new Button { Text = btn3Text },
|
|
|
|
- new Button { Text = btn4Text }
|
|
|
|
- );
|
|
|
|
|
|
+ title,
|
|
|
|
+ width,
|
|
|
|
+ Alignment.Fill,
|
|
|
|
+ new Button { Text = btn1Text },
|
|
|
|
+ new Button { Text = btn2Text },
|
|
|
|
+ new Button { Text = btn3Text },
|
|
|
|
+ new Button { Text = btn4Text }
|
|
|
|
+ );
|
|
TestHelpers.AssertDriverContentsWithFrameAre ($"{buttonRow}", _output);
|
|
TestHelpers.AssertDriverContentsWithFrameAre ($"{buttonRow}", _output);
|
|
End (runstate);
|
|
End (runstate);
|
|
dlg.Dispose ();
|
|
dlg.Dispose ();
|
|
@@ -206,14 +205,14 @@ public class DialogTests
|
|
Assert.Equal (width, buttonRow.Length);
|
|
Assert.Equal (width, buttonRow.Length);
|
|
|
|
|
|
(runstate, dlg) = BeginButtonTestDialog (
|
|
(runstate, dlg) = BeginButtonTestDialog (
|
|
- title,
|
|
|
|
- width,
|
|
|
|
- Alignment.End,
|
|
|
|
- new Button { Text = btn1Text },
|
|
|
|
- new Button { Text = btn2Text },
|
|
|
|
- new Button { Text = btn3Text },
|
|
|
|
- new Button { Text = btn4Text }
|
|
|
|
- );
|
|
|
|
|
|
+ title,
|
|
|
|
+ width,
|
|
|
|
+ Alignment.End,
|
|
|
|
+ new Button { Text = btn1Text },
|
|
|
|
+ new Button { Text = btn2Text },
|
|
|
|
+ new Button { Text = btn3Text },
|
|
|
|
+ new Button { Text = btn4Text }
|
|
|
|
+ );
|
|
TestHelpers.AssertDriverContentsWithFrameAre ($"{buttonRow}", _output);
|
|
TestHelpers.AssertDriverContentsWithFrameAre ($"{buttonRow}", _output);
|
|
End (runstate);
|
|
End (runstate);
|
|
dlg.Dispose ();
|
|
dlg.Dispose ();
|
|
@@ -223,14 +222,14 @@ public class DialogTests
|
|
Assert.Equal (width, buttonRow.Length);
|
|
Assert.Equal (width, buttonRow.Length);
|
|
|
|
|
|
(runstate, dlg) = BeginButtonTestDialog (
|
|
(runstate, dlg) = BeginButtonTestDialog (
|
|
- title,
|
|
|
|
- width,
|
|
|
|
- Alignment.Start,
|
|
|
|
- new Button { Text = btn1Text },
|
|
|
|
- new Button { Text = btn2Text },
|
|
|
|
- new Button { Text = btn3Text },
|
|
|
|
- new Button { Text = btn4Text }
|
|
|
|
- );
|
|
|
|
|
|
+ title,
|
|
|
|
+ width,
|
|
|
|
+ Alignment.Start,
|
|
|
|
+ new Button { Text = btn1Text },
|
|
|
|
+ new Button { Text = btn2Text },
|
|
|
|
+ new Button { Text = btn3Text },
|
|
|
|
+ new Button { Text = btn4Text }
|
|
|
|
+ );
|
|
TestHelpers.AssertDriverContentsWithFrameAre ($"{buttonRow}", _output);
|
|
TestHelpers.AssertDriverContentsWithFrameAre ($"{buttonRow}", _output);
|
|
End (runstate);
|
|
End (runstate);
|
|
dlg.Dispose ();
|
|
dlg.Dispose ();
|
|
@@ -285,14 +284,14 @@ public class DialogTests
|
|
$"{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) = BeginButtonTestDialog (
|
|
(runstate, dlg) = BeginButtonTestDialog (
|
|
- title,
|
|
|
|
- width,
|
|
|
|
- Alignment.Fill,
|
|
|
|
- new Button { Text = btn1Text },
|
|
|
|
- new Button { Text = btn2Text },
|
|
|
|
- new Button { Text = btn3Text },
|
|
|
|
- new Button { Text = btn4Text }
|
|
|
|
- );
|
|
|
|
|
|
+ title,
|
|
|
|
+ width,
|
|
|
|
+ Alignment.Fill,
|
|
|
|
+ new Button { Text = btn1Text },
|
|
|
|
+ new Button { Text = btn2Text },
|
|
|
|
+ new Button { Text = btn3Text },
|
|
|
|
+ new Button { Text = btn4Text }
|
|
|
|
+ );
|
|
TestHelpers.AssertDriverContentsWithFrameAre ($"{buttonRow}", _output);
|
|
TestHelpers.AssertDriverContentsWithFrameAre ($"{buttonRow}", _output);
|
|
End (runstate);
|
|
End (runstate);
|
|
dlg.Dispose ();
|
|
dlg.Dispose ();
|
|
@@ -302,14 +301,14 @@ public class DialogTests
|
|
Assert.Equal (width, buttonRow.Length);
|
|
Assert.Equal (width, buttonRow.Length);
|
|
|
|
|
|
(runstate, dlg) = BeginButtonTestDialog (
|
|
(runstate, dlg) = BeginButtonTestDialog (
|
|
- title,
|
|
|
|
- width,
|
|
|
|
- Alignment.End,
|
|
|
|
- new Button { Text = btn1Text },
|
|
|
|
- new Button { Text = btn2Text },
|
|
|
|
- new Button { Text = btn3Text },
|
|
|
|
- new Button { Text = btn4Text }
|
|
|
|
- );
|
|
|
|
|
|
+ title,
|
|
|
|
+ width,
|
|
|
|
+ Alignment.End,
|
|
|
|
+ new Button { Text = btn1Text },
|
|
|
|
+ new Button { Text = btn2Text },
|
|
|
|
+ new Button { Text = btn3Text },
|
|
|
|
+ new Button { Text = btn4Text }
|
|
|
|
+ );
|
|
TestHelpers.AssertDriverContentsWithFrameAre ($"{buttonRow}", _output);
|
|
TestHelpers.AssertDriverContentsWithFrameAre ($"{buttonRow}", _output);
|
|
End (runstate);
|
|
End (runstate);
|
|
dlg.Dispose ();
|
|
dlg.Dispose ();
|
|
@@ -318,14 +317,14 @@ public class DialogTests
|
|
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) = BeginButtonTestDialog (
|
|
(runstate, dlg) = BeginButtonTestDialog (
|
|
- title,
|
|
|
|
- width,
|
|
|
|
- Alignment.Start,
|
|
|
|
- new Button { Text = btn1Text },
|
|
|
|
- new Button { Text = btn2Text },
|
|
|
|
- new Button { Text = btn3Text },
|
|
|
|
- new Button { Text = btn4Text }
|
|
|
|
- );
|
|
|
|
|
|
+ title,
|
|
|
|
+ width,
|
|
|
|
+ Alignment.Start,
|
|
|
|
+ new Button { Text = btn1Text },
|
|
|
|
+ new Button { Text = btn2Text },
|
|
|
|
+ new Button { Text = btn3Text },
|
|
|
|
+ new Button { Text = btn4Text }
|
|
|
|
+ );
|
|
TestHelpers.AssertDriverContentsWithFrameAre ($"{buttonRow}", _output);
|
|
TestHelpers.AssertDriverContentsWithFrameAre ($"{buttonRow}", _output);
|
|
End (runstate);
|
|
End (runstate);
|
|
dlg.Dispose ();
|
|
dlg.Dispose ();
|
|
@@ -361,14 +360,14 @@ public class DialogTests
|
|
|
|
|
|
// Default - Center
|
|
// Default - Center
|
|
(runstate, Dialog dlg) = BeginButtonTestDialog (
|
|
(runstate, Dialog dlg) = BeginButtonTestDialog (
|
|
- title,
|
|
|
|
- width,
|
|
|
|
- Alignment.Center,
|
|
|
|
- new Button { Text = btn1Text },
|
|
|
|
- new Button { Text = btn2Text },
|
|
|
|
- new Button { Text = btn3Text },
|
|
|
|
- new Button { Text = btn4Text }
|
|
|
|
- );
|
|
|
|
|
|
+ title,
|
|
|
|
+ width,
|
|
|
|
+ Alignment.Center,
|
|
|
|
+ new Button { Text = btn1Text },
|
|
|
|
+ new Button { Text = btn2Text },
|
|
|
|
+ new Button { Text = btn3Text },
|
|
|
|
+ new Button { Text = btn4Text }
|
|
|
|
+ );
|
|
TestHelpers.AssertDriverContentsWithFrameAre ($"{buttonRow}", _output);
|
|
TestHelpers.AssertDriverContentsWithFrameAre ($"{buttonRow}", _output);
|
|
End (runstate);
|
|
End (runstate);
|
|
dlg.Dispose ();
|
|
dlg.Dispose ();
|
|
@@ -378,14 +377,14 @@ public class DialogTests
|
|
Assert.Equal (width, buttonRow.Length);
|
|
Assert.Equal (width, buttonRow.Length);
|
|
|
|
|
|
(runstate, dlg) = BeginButtonTestDialog (
|
|
(runstate, dlg) = BeginButtonTestDialog (
|
|
- title,
|
|
|
|
- width,
|
|
|
|
- Alignment.Fill,
|
|
|
|
- new Button { Text = btn1Text },
|
|
|
|
- new Button { Text = btn2Text },
|
|
|
|
- new Button { Text = btn3Text },
|
|
|
|
- new Button { Text = btn4Text }
|
|
|
|
- );
|
|
|
|
|
|
+ title,
|
|
|
|
+ width,
|
|
|
|
+ Alignment.Fill,
|
|
|
|
+ new Button { Text = btn1Text },
|
|
|
|
+ new Button { Text = btn2Text },
|
|
|
|
+ new Button { Text = btn3Text },
|
|
|
|
+ new Button { Text = btn4Text }
|
|
|
|
+ );
|
|
TestHelpers.AssertDriverContentsWithFrameAre ($"{buttonRow}", _output);
|
|
TestHelpers.AssertDriverContentsWithFrameAre ($"{buttonRow}", _output);
|
|
End (runstate);
|
|
End (runstate);
|
|
dlg.Dispose ();
|
|
dlg.Dispose ();
|
|
@@ -395,14 +394,14 @@ public class DialogTests
|
|
Assert.Equal (width, buttonRow.Length);
|
|
Assert.Equal (width, buttonRow.Length);
|
|
|
|
|
|
(runstate, dlg) = BeginButtonTestDialog (
|
|
(runstate, dlg) = BeginButtonTestDialog (
|
|
- title,
|
|
|
|
- width,
|
|
|
|
- Alignment.End,
|
|
|
|
- new Button { Text = btn1Text },
|
|
|
|
- new Button { Text = btn2Text },
|
|
|
|
- new Button { Text = btn3Text },
|
|
|
|
- new Button { Text = btn4Text }
|
|
|
|
- );
|
|
|
|
|
|
+ title,
|
|
|
|
+ width,
|
|
|
|
+ Alignment.End,
|
|
|
|
+ new Button { Text = btn1Text },
|
|
|
|
+ new Button { Text = btn2Text },
|
|
|
|
+ new Button { Text = btn3Text },
|
|
|
|
+ new Button { Text = btn4Text }
|
|
|
|
+ );
|
|
TestHelpers.AssertDriverContentsWithFrameAre ($"{buttonRow}", _output);
|
|
TestHelpers.AssertDriverContentsWithFrameAre ($"{buttonRow}", _output);
|
|
End (runstate);
|
|
End (runstate);
|
|
dlg.Dispose ();
|
|
dlg.Dispose ();
|
|
@@ -412,14 +411,14 @@ public class DialogTests
|
|
Assert.Equal (width, buttonRow.Length);
|
|
Assert.Equal (width, buttonRow.Length);
|
|
|
|
|
|
(runstate, dlg) = BeginButtonTestDialog (
|
|
(runstate, dlg) = BeginButtonTestDialog (
|
|
- title,
|
|
|
|
- width,
|
|
|
|
- Alignment.Start,
|
|
|
|
- new Button { Text = btn1Text },
|
|
|
|
- new Button { Text = btn2Text },
|
|
|
|
- new Button { Text = btn3Text },
|
|
|
|
- new Button { Text = btn4Text }
|
|
|
|
- );
|
|
|
|
|
|
+ title,
|
|
|
|
+ width,
|
|
|
|
+ Alignment.Start,
|
|
|
|
+ new Button { Text = btn1Text },
|
|
|
|
+ new Button { Text = btn2Text },
|
|
|
|
+ new Button { Text = btn3Text },
|
|
|
|
+ new Button { Text = btn4Text }
|
|
|
|
+ );
|
|
TestHelpers.AssertDriverContentsWithFrameAre ($"{buttonRow}", _output);
|
|
TestHelpers.AssertDriverContentsWithFrameAre ($"{buttonRow}", _output);
|
|
End (runstate);
|
|
End (runstate);
|
|
dlg.Dispose ();
|
|
dlg.Dispose ();
|
|
@@ -457,14 +456,14 @@ public class DialogTests
|
|
|
|
|
|
// Default - Center
|
|
// Default - Center
|
|
(runstate, Dialog dlg) = BeginButtonTestDialog (
|
|
(runstate, Dialog dlg) = BeginButtonTestDialog (
|
|
- title,
|
|
|
|
- width,
|
|
|
|
- Alignment.Center,
|
|
|
|
- new Button { Text = btn1Text },
|
|
|
|
- new Button { Text = btn2Text },
|
|
|
|
- new Button { Text = btn3Text },
|
|
|
|
- new Button { Text = btn4Text }
|
|
|
|
- );
|
|
|
|
|
|
+ title,
|
|
|
|
+ width,
|
|
|
|
+ Alignment.Center,
|
|
|
|
+ new Button { Text = btn1Text },
|
|
|
|
+ new Button { Text = btn2Text },
|
|
|
|
+ new Button { Text = btn3Text },
|
|
|
|
+ new Button { Text = btn4Text }
|
|
|
|
+ );
|
|
TestHelpers.AssertDriverContentsWithFrameAre ($"{buttonRow}", _output);
|
|
TestHelpers.AssertDriverContentsWithFrameAre ($"{buttonRow}", _output);
|
|
End (runstate);
|
|
End (runstate);
|
|
dlg.Dispose ();
|
|
dlg.Dispose ();
|
|
@@ -474,14 +473,14 @@ public class DialogTests
|
|
Assert.Equal (width, buttonRow.GetColumns ());
|
|
Assert.Equal (width, buttonRow.GetColumns ());
|
|
|
|
|
|
(runstate, dlg) = BeginButtonTestDialog (
|
|
(runstate, dlg) = BeginButtonTestDialog (
|
|
- title,
|
|
|
|
- width,
|
|
|
|
- Alignment.Fill,
|
|
|
|
- new Button { Text = btn1Text },
|
|
|
|
- new Button { Text = btn2Text },
|
|
|
|
- new Button { Text = btn3Text },
|
|
|
|
- new Button { Text = btn4Text }
|
|
|
|
- );
|
|
|
|
|
|
+ title,
|
|
|
|
+ width,
|
|
|
|
+ Alignment.Fill,
|
|
|
|
+ new Button { Text = btn1Text },
|
|
|
|
+ new Button { Text = btn2Text },
|
|
|
|
+ new Button { Text = btn3Text },
|
|
|
|
+ new Button { Text = btn4Text }
|
|
|
|
+ );
|
|
TestHelpers.AssertDriverContentsWithFrameAre ($"{buttonRow}", _output);
|
|
TestHelpers.AssertDriverContentsWithFrameAre ($"{buttonRow}", _output);
|
|
End (runstate);
|
|
End (runstate);
|
|
dlg.Dispose ();
|
|
dlg.Dispose ();
|
|
@@ -491,14 +490,14 @@ public class DialogTests
|
|
Assert.Equal (width, buttonRow.GetColumns ());
|
|
Assert.Equal (width, buttonRow.GetColumns ());
|
|
|
|
|
|
(runstate, dlg) = BeginButtonTestDialog (
|
|
(runstate, dlg) = BeginButtonTestDialog (
|
|
- title,
|
|
|
|
- width,
|
|
|
|
- Alignment.End,
|
|
|
|
- new Button { Text = btn1Text },
|
|
|
|
- new Button { Text = btn2Text },
|
|
|
|
- new Button { Text = btn3Text },
|
|
|
|
- new Button { Text = btn4Text }
|
|
|
|
- );
|
|
|
|
|
|
+ title,
|
|
|
|
+ width,
|
|
|
|
+ Alignment.End,
|
|
|
|
+ new Button { Text = btn1Text },
|
|
|
|
+ new Button { Text = btn2Text },
|
|
|
|
+ new Button { Text = btn3Text },
|
|
|
|
+ new Button { Text = btn4Text }
|
|
|
|
+ );
|
|
TestHelpers.AssertDriverContentsWithFrameAre ($"{buttonRow}", _output);
|
|
TestHelpers.AssertDriverContentsWithFrameAre ($"{buttonRow}", _output);
|
|
End (runstate);
|
|
End (runstate);
|
|
dlg.Dispose ();
|
|
dlg.Dispose ();
|
|
@@ -508,14 +507,14 @@ public class DialogTests
|
|
Assert.Equal (width, buttonRow.GetColumns ());
|
|
Assert.Equal (width, buttonRow.GetColumns ());
|
|
|
|
|
|
(runstate, dlg) = BeginButtonTestDialog (
|
|
(runstate, dlg) = BeginButtonTestDialog (
|
|
- title,
|
|
|
|
- width,
|
|
|
|
- Alignment.Start,
|
|
|
|
- new Button { Text = btn1Text },
|
|
|
|
- new Button { Text = btn2Text },
|
|
|
|
- new Button { Text = btn3Text },
|
|
|
|
- new Button { Text = btn4Text }
|
|
|
|
- );
|
|
|
|
|
|
+ title,
|
|
|
|
+ width,
|
|
|
|
+ Alignment.Start,
|
|
|
|
+ new Button { Text = btn1Text },
|
|
|
|
+ new Button { Text = btn2Text },
|
|
|
|
+ new Button { Text = btn3Text },
|
|
|
|
+ new Button { Text = btn4Text }
|
|
|
|
+ );
|
|
TestHelpers.AssertDriverContentsWithFrameAre ($"{buttonRow}", _output);
|
|
TestHelpers.AssertDriverContentsWithFrameAre ($"{buttonRow}", _output);
|
|
End (runstate);
|
|
End (runstate);
|
|
dlg.Dispose ();
|
|
dlg.Dispose ();
|
|
@@ -542,11 +541,11 @@ public class DialogTests
|
|
d.SetBufferSize (width, 1);
|
|
d.SetBufferSize (width, 1);
|
|
|
|
|
|
(runstate, Dialog dlg) = BeginButtonTestDialog (
|
|
(runstate, Dialog dlg) = BeginButtonTestDialog (
|
|
- title,
|
|
|
|
- width,
|
|
|
|
- Alignment.Center,
|
|
|
|
- new Button { Text = btnText }
|
|
|
|
- );
|
|
|
|
|
|
+ title,
|
|
|
|
+ width,
|
|
|
|
+ Alignment.Center,
|
|
|
|
+ new Button { Text = btnText }
|
|
|
|
+ );
|
|
|
|
|
|
// Center
|
|
// Center
|
|
TestHelpers.AssertDriverContentsWithFrameAre ($"{buttonRow}", _output);
|
|
TestHelpers.AssertDriverContentsWithFrameAre ($"{buttonRow}", _output);
|
|
@@ -559,11 +558,11 @@ public class DialogTests
|
|
Assert.Equal (width, buttonRow.Length);
|
|
Assert.Equal (width, buttonRow.Length);
|
|
|
|
|
|
(runstate, dlg) = BeginButtonTestDialog (
|
|
(runstate, dlg) = BeginButtonTestDialog (
|
|
- title,
|
|
|
|
- width,
|
|
|
|
- Alignment.Fill,
|
|
|
|
- new Button { Text = btnText }
|
|
|
|
- );
|
|
|
|
|
|
+ title,
|
|
|
|
+ width,
|
|
|
|
+ Alignment.Fill,
|
|
|
|
+ new Button { Text = btnText }
|
|
|
|
+ );
|
|
TestHelpers.AssertDriverContentsWithFrameAre ($"{buttonRow}", _output);
|
|
TestHelpers.AssertDriverContentsWithFrameAre ($"{buttonRow}", _output);
|
|
End (runstate);
|
|
End (runstate);
|
|
dlg.Dispose ();
|
|
dlg.Dispose ();
|
|
@@ -574,11 +573,11 @@ public class DialogTests
|
|
Assert.Equal (width, buttonRow.Length);
|
|
Assert.Equal (width, buttonRow.Length);
|
|
|
|
|
|
(runstate, dlg) = BeginButtonTestDialog (
|
|
(runstate, dlg) = BeginButtonTestDialog (
|
|
- title,
|
|
|
|
- width,
|
|
|
|
- Alignment.End,
|
|
|
|
- new Button { Text = btnText }
|
|
|
|
- );
|
|
|
|
|
|
+ title,
|
|
|
|
+ width,
|
|
|
|
+ Alignment.End,
|
|
|
|
+ new Button { Text = btnText }
|
|
|
|
+ );
|
|
TestHelpers.AssertDriverContentsWithFrameAre ($"{buttonRow}", _output);
|
|
TestHelpers.AssertDriverContentsWithFrameAre ($"{buttonRow}", _output);
|
|
End (runstate);
|
|
End (runstate);
|
|
dlg.Dispose ();
|
|
dlg.Dispose ();
|
|
@@ -589,11 +588,11 @@ public class DialogTests
|
|
Assert.Equal (width, buttonRow.Length);
|
|
Assert.Equal (width, buttonRow.Length);
|
|
|
|
|
|
(runstate, dlg) = BeginButtonTestDialog (
|
|
(runstate, dlg) = BeginButtonTestDialog (
|
|
- title,
|
|
|
|
- width,
|
|
|
|
- Alignment.Start,
|
|
|
|
- new Button { Text = btnText }
|
|
|
|
- );
|
|
|
|
|
|
+ title,
|
|
|
|
+ width,
|
|
|
|
+ Alignment.Start,
|
|
|
|
+ new Button { Text = btnText }
|
|
|
|
+ );
|
|
TestHelpers.AssertDriverContentsWithFrameAre ($"{buttonRow}", _output);
|
|
TestHelpers.AssertDriverContentsWithFrameAre ($"{buttonRow}", _output);
|
|
End (runstate);
|
|
End (runstate);
|
|
dlg.Dispose ();
|
|
dlg.Dispose ();
|
|
@@ -606,11 +605,11 @@ public class DialogTests
|
|
d.SetBufferSize (width, 1);
|
|
d.SetBufferSize (width, 1);
|
|
|
|
|
|
(runstate, dlg) = BeginButtonTestDialog (
|
|
(runstate, dlg) = BeginButtonTestDialog (
|
|
- title,
|
|
|
|
- width,
|
|
|
|
- Alignment.Center,
|
|
|
|
- new Button { Text = btnText }
|
|
|
|
- );
|
|
|
|
|
|
+ title,
|
|
|
|
+ width,
|
|
|
|
+ Alignment.Center,
|
|
|
|
+ new Button { Text = btnText }
|
|
|
|
+ );
|
|
TestHelpers.AssertDriverContentsWithFrameAre ($"{buttonRow}", _output);
|
|
TestHelpers.AssertDriverContentsWithFrameAre ($"{buttonRow}", _output);
|
|
End (runstate);
|
|
End (runstate);
|
|
dlg.Dispose ();
|
|
dlg.Dispose ();
|
|
@@ -621,11 +620,11 @@ public class DialogTests
|
|
Assert.Equal (width, buttonRow.Length);
|
|
Assert.Equal (width, buttonRow.Length);
|
|
|
|
|
|
(runstate, dlg) = BeginButtonTestDialog (
|
|
(runstate, dlg) = BeginButtonTestDialog (
|
|
- title,
|
|
|
|
- width,
|
|
|
|
- Alignment.Fill,
|
|
|
|
- new Button { Text = btnText }
|
|
|
|
- );
|
|
|
|
|
|
+ title,
|
|
|
|
+ width,
|
|
|
|
+ Alignment.Fill,
|
|
|
|
+ new Button { Text = btnText }
|
|
|
|
+ );
|
|
TestHelpers.AssertDriverContentsWithFrameAre ($"{buttonRow}", _output);
|
|
TestHelpers.AssertDriverContentsWithFrameAre ($"{buttonRow}", _output);
|
|
End (runstate);
|
|
End (runstate);
|
|
dlg.Dispose ();
|
|
dlg.Dispose ();
|
|
@@ -636,11 +635,11 @@ public class DialogTests
|
|
Assert.Equal (width, buttonRow.Length);
|
|
Assert.Equal (width, buttonRow.Length);
|
|
|
|
|
|
(runstate, dlg) = BeginButtonTestDialog (
|
|
(runstate, dlg) = BeginButtonTestDialog (
|
|
- title,
|
|
|
|
- width,
|
|
|
|
- Alignment.End,
|
|
|
|
- new Button { Text = btnText }
|
|
|
|
- );
|
|
|
|
|
|
+ title,
|
|
|
|
+ width,
|
|
|
|
+ Alignment.End,
|
|
|
|
+ new Button { Text = btnText }
|
|
|
|
+ );
|
|
TestHelpers.AssertDriverContentsWithFrameAre ($"{buttonRow}", _output);
|
|
TestHelpers.AssertDriverContentsWithFrameAre ($"{buttonRow}", _output);
|
|
End (runstate);
|
|
End (runstate);
|
|
dlg.Dispose ();
|
|
dlg.Dispose ();
|
|
@@ -651,11 +650,11 @@ public class DialogTests
|
|
Assert.Equal (width, buttonRow.Length);
|
|
Assert.Equal (width, buttonRow.Length);
|
|
|
|
|
|
(runstate, dlg) = BeginButtonTestDialog (
|
|
(runstate, dlg) = BeginButtonTestDialog (
|
|
- title,
|
|
|
|
- width,
|
|
|
|
- Alignment.Start,
|
|
|
|
- new Button { Text = btnText }
|
|
|
|
- );
|
|
|
|
|
|
+ title,
|
|
|
|
+ width,
|
|
|
|
+ Alignment.Start,
|
|
|
|
+ new Button { Text = btnText }
|
|
|
|
+ );
|
|
TestHelpers.AssertDriverContentsWithFrameAre ($"{buttonRow}", _output);
|
|
TestHelpers.AssertDriverContentsWithFrameAre ($"{buttonRow}", _output);
|
|
End (runstate);
|
|
End (runstate);
|
|
dlg.Dispose ();
|
|
dlg.Dispose ();
|
|
@@ -687,13 +686,13 @@ public class DialogTests
|
|
d.SetBufferSize (buttonRow.Length, 3);
|
|
d.SetBufferSize (buttonRow.Length, 3);
|
|
|
|
|
|
(runstate, Dialog dlg) = BeginButtonTestDialog (
|
|
(runstate, Dialog dlg) = BeginButtonTestDialog (
|
|
- title,
|
|
|
|
- width,
|
|
|
|
- Alignment.Center,
|
|
|
|
- new Button { Text = btn1Text },
|
|
|
|
- new Button { Text = btn2Text },
|
|
|
|
- new Button { Text = btn3Text }
|
|
|
|
- );
|
|
|
|
|
|
+ title,
|
|
|
|
+ width,
|
|
|
|
+ Alignment.Center,
|
|
|
|
+ new Button { Text = btn1Text },
|
|
|
|
+ new Button { Text = btn2Text },
|
|
|
|
+ new Button { Text = btn3Text }
|
|
|
|
+ );
|
|
TestHelpers.AssertDriverContentsWithFrameAre ($"{buttonRow}", _output);
|
|
TestHelpers.AssertDriverContentsWithFrameAre ($"{buttonRow}", _output);
|
|
End (runstate);
|
|
End (runstate);
|
|
dlg.Dispose ();
|
|
dlg.Dispose ();
|
|
@@ -703,13 +702,13 @@ public class DialogTests
|
|
Assert.Equal (width, buttonRow.Length);
|
|
Assert.Equal (width, buttonRow.Length);
|
|
|
|
|
|
(runstate, dlg) = BeginButtonTestDialog (
|
|
(runstate, dlg) = BeginButtonTestDialog (
|
|
- title,
|
|
|
|
- width,
|
|
|
|
- Alignment.Fill,
|
|
|
|
- new Button { Text = btn1Text },
|
|
|
|
- new Button { Text = btn2Text },
|
|
|
|
- new Button { Text = btn3Text }
|
|
|
|
- );
|
|
|
|
|
|
+ title,
|
|
|
|
+ width,
|
|
|
|
+ Alignment.Fill,
|
|
|
|
+ new Button { Text = btn1Text },
|
|
|
|
+ new Button { Text = btn2Text },
|
|
|
|
+ new Button { Text = btn3Text }
|
|
|
|
+ );
|
|
TestHelpers.AssertDriverContentsWithFrameAre ($"{buttonRow}", _output);
|
|
TestHelpers.AssertDriverContentsWithFrameAre ($"{buttonRow}", _output);
|
|
End (runstate);
|
|
End (runstate);
|
|
dlg.Dispose ();
|
|
dlg.Dispose ();
|
|
@@ -719,13 +718,13 @@ public class DialogTests
|
|
Assert.Equal (width, buttonRow.Length);
|
|
Assert.Equal (width, buttonRow.Length);
|
|
|
|
|
|
(runstate, dlg) = BeginButtonTestDialog (
|
|
(runstate, dlg) = BeginButtonTestDialog (
|
|
- title,
|
|
|
|
- width,
|
|
|
|
- Alignment.End,
|
|
|
|
- new Button { Text = btn1Text },
|
|
|
|
- new Button { Text = btn2Text },
|
|
|
|
- new Button { Text = btn3Text }
|
|
|
|
- );
|
|
|
|
|
|
+ title,
|
|
|
|
+ width,
|
|
|
|
+ Alignment.End,
|
|
|
|
+ new Button { Text = btn1Text },
|
|
|
|
+ new Button { Text = btn2Text },
|
|
|
|
+ new Button { Text = btn3Text }
|
|
|
|
+ );
|
|
TestHelpers.AssertDriverContentsWithFrameAre ($"{buttonRow}", _output);
|
|
TestHelpers.AssertDriverContentsWithFrameAre ($"{buttonRow}", _output);
|
|
End (runstate);
|
|
End (runstate);
|
|
dlg.Dispose ();
|
|
dlg.Dispose ();
|
|
@@ -735,13 +734,13 @@ public class DialogTests
|
|
Assert.Equal (width, buttonRow.Length);
|
|
Assert.Equal (width, buttonRow.Length);
|
|
|
|
|
|
(runstate, dlg) = BeginButtonTestDialog (
|
|
(runstate, dlg) = BeginButtonTestDialog (
|
|
- title,
|
|
|
|
- width,
|
|
|
|
- Alignment.Start,
|
|
|
|
- new Button { Text = btn1Text },
|
|
|
|
- new Button { Text = btn2Text },
|
|
|
|
- new Button { Text = btn3Text }
|
|
|
|
- );
|
|
|
|
|
|
+ title,
|
|
|
|
+ width,
|
|
|
|
+ Alignment.Start,
|
|
|
|
+ new Button { Text = btn1Text },
|
|
|
|
+ new Button { Text = btn2Text },
|
|
|
|
+ new Button { Text = btn3Text }
|
|
|
|
+ );
|
|
TestHelpers.AssertDriverContentsWithFrameAre ($"{buttonRow}", _output);
|
|
TestHelpers.AssertDriverContentsWithFrameAre ($"{buttonRow}", _output);
|
|
End (runstate);
|
|
End (runstate);
|
|
dlg.Dispose ();
|
|
dlg.Dispose ();
|
|
@@ -771,12 +770,12 @@ public class DialogTests
|
|
d.SetBufferSize (buttonRow.Length, 3);
|
|
d.SetBufferSize (buttonRow.Length, 3);
|
|
|
|
|
|
(runstate, Dialog dlg) = BeginButtonTestDialog (
|
|
(runstate, Dialog dlg) = BeginButtonTestDialog (
|
|
- title,
|
|
|
|
- width,
|
|
|
|
- Alignment.Center,
|
|
|
|
- new Button { Text = btn1Text },
|
|
|
|
- new Button { Text = btn2Text }
|
|
|
|
- );
|
|
|
|
|
|
+ title,
|
|
|
|
+ width,
|
|
|
|
+ Alignment.Center,
|
|
|
|
+ new Button { Text = btn1Text },
|
|
|
|
+ new Button { Text = btn2Text }
|
|
|
|
+ );
|
|
TestHelpers.AssertDriverContentsWithFrameAre ($"{buttonRow}", _output);
|
|
TestHelpers.AssertDriverContentsWithFrameAre ($"{buttonRow}", _output);
|
|
End (runstate);
|
|
End (runstate);
|
|
dlg.Dispose ();
|
|
dlg.Dispose ();
|
|
@@ -786,12 +785,12 @@ public class DialogTests
|
|
Assert.Equal (width, buttonRow.Length);
|
|
Assert.Equal (width, buttonRow.Length);
|
|
|
|
|
|
(runstate, dlg) = BeginButtonTestDialog (
|
|
(runstate, dlg) = BeginButtonTestDialog (
|
|
- title,
|
|
|
|
- width,
|
|
|
|
- Alignment.Fill,
|
|
|
|
- new Button { Text = btn1Text },
|
|
|
|
- new Button { Text = btn2Text }
|
|
|
|
- );
|
|
|
|
|
|
+ title,
|
|
|
|
+ width,
|
|
|
|
+ Alignment.Fill,
|
|
|
|
+ new Button { Text = btn1Text },
|
|
|
|
+ new Button { Text = btn2Text }
|
|
|
|
+ );
|
|
TestHelpers.AssertDriverContentsWithFrameAre ($"{buttonRow}", _output);
|
|
TestHelpers.AssertDriverContentsWithFrameAre ($"{buttonRow}", _output);
|
|
End (runstate);
|
|
End (runstate);
|
|
dlg.Dispose ();
|
|
dlg.Dispose ();
|
|
@@ -801,12 +800,12 @@ public class DialogTests
|
|
Assert.Equal (width, buttonRow.Length);
|
|
Assert.Equal (width, buttonRow.Length);
|
|
|
|
|
|
(runstate, dlg) = BeginButtonTestDialog (
|
|
(runstate, dlg) = BeginButtonTestDialog (
|
|
- title,
|
|
|
|
- width,
|
|
|
|
- Alignment.End,
|
|
|
|
- new Button { Text = btn1Text },
|
|
|
|
- new Button { Text = btn2Text }
|
|
|
|
- );
|
|
|
|
|
|
+ title,
|
|
|
|
+ width,
|
|
|
|
+ Alignment.End,
|
|
|
|
+ new Button { Text = btn1Text },
|
|
|
|
+ new Button { Text = btn2Text }
|
|
|
|
+ );
|
|
TestHelpers.AssertDriverContentsWithFrameAre ($"{buttonRow}", _output);
|
|
TestHelpers.AssertDriverContentsWithFrameAre ($"{buttonRow}", _output);
|
|
End (runstate);
|
|
End (runstate);
|
|
dlg.Dispose ();
|
|
dlg.Dispose ();
|
|
@@ -816,12 +815,12 @@ public class DialogTests
|
|
Assert.Equal (width, buttonRow.Length);
|
|
Assert.Equal (width, buttonRow.Length);
|
|
|
|
|
|
(runstate, dlg) = BeginButtonTestDialog (
|
|
(runstate, dlg) = BeginButtonTestDialog (
|
|
- title,
|
|
|
|
- width,
|
|
|
|
- Alignment.Start,
|
|
|
|
- new Button { Text = btn1Text },
|
|
|
|
- new Button { Text = btn2Text }
|
|
|
|
- );
|
|
|
|
|
|
+ title,
|
|
|
|
+ width,
|
|
|
|
+ Alignment.Start,
|
|
|
|
+ new Button { Text = btn1Text },
|
|
|
|
+ new Button { Text = btn2Text }
|
|
|
|
+ );
|
|
TestHelpers.AssertDriverContentsWithFrameAre ($"{buttonRow}", _output);
|
|
TestHelpers.AssertDriverContentsWithFrameAre ($"{buttonRow}", _output);
|
|
End (runstate);
|
|
End (runstate);
|
|
dlg.Dispose ();
|
|
dlg.Dispose ();
|
|
@@ -855,8 +854,8 @@ public class DialogTests
|
|
Button button1, button2;
|
|
Button button1, button2;
|
|
|
|
|
|
// Default (Center)
|
|
// Default (Center)
|
|
- button1 = new Button { Text = btn1Text };
|
|
|
|
- button2 = new Button { Text = btn2Text };
|
|
|
|
|
|
+ button1 = new() { Text = btn1Text };
|
|
|
|
+ button2 = new() { Text = btn2Text };
|
|
(runstate, dlg) = BeginButtonTestDialog (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);
|
|
@@ -867,8 +866,8 @@ public class DialogTests
|
|
|
|
|
|
// Justify
|
|
// Justify
|
|
Assert.Equal (width, buttonRow.Length);
|
|
Assert.Equal (width, buttonRow.Length);
|
|
- button1 = new Button { Text = btn1Text };
|
|
|
|
- button2 = new Button { Text = btn2Text };
|
|
|
|
|
|
+ button1 = new() { Text = btn1Text };
|
|
|
|
+ button2 = new() { Text = btn2Text };
|
|
(runstate, dlg) = BeginButtonTestDialog (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);
|
|
@@ -879,8 +878,8 @@ public class DialogTests
|
|
|
|
|
|
// Right
|
|
// Right
|
|
Assert.Equal (width, buttonRow.Length);
|
|
Assert.Equal (width, buttonRow.Length);
|
|
- button1 = new Button { Text = btn1Text };
|
|
|
|
- button2 = new Button { Text = btn2Text };
|
|
|
|
|
|
+ button1 = new() { Text = btn1Text };
|
|
|
|
+ button2 = new() { Text = btn2Text };
|
|
(runstate, dlg) = BeginButtonTestDialog (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);
|
|
@@ -890,8 +889,8 @@ public class DialogTests
|
|
|
|
|
|
// Left
|
|
// Left
|
|
Assert.Equal (width, buttonRow.Length);
|
|
Assert.Equal (width, buttonRow.Length);
|
|
- button1 = new Button { Text = btn1Text };
|
|
|
|
- button2 = new Button { Text = btn2Text };
|
|
|
|
|
|
+ button1 = new() { Text = btn1Text };
|
|
|
|
+ button2 = new() { Text = btn2Text };
|
|
(runstate, dlg) = BeginButtonTestDialog (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);
|
|
@@ -1020,7 +1019,7 @@ public class DialogTests
|
|
Dialog.DefaultBorderStyle = LineStyle.Single;
|
|
Dialog.DefaultBorderStyle = LineStyle.Single;
|
|
Dialog.DefaultShadow = ShadowStyle.None;
|
|
Dialog.DefaultShadow = ShadowStyle.None;
|
|
Button.DefaultShadow = ShadowStyle.None;
|
|
Button.DefaultShadow = ShadowStyle.None;
|
|
-
|
|
|
|
|
|
+
|
|
Iteration += (s, a) =>
|
|
Iteration += (s, a) =>
|
|
{
|
|
{
|
|
iterations++;
|
|
iterations++;
|
|
@@ -1151,7 +1150,7 @@ public class DialogTests
|
|
_output
|
|
_output
|
|
);
|
|
);
|
|
|
|
|
|
- Assert.False (Top!.NewKeyDownEvent (Key.Enter));
|
|
|
|
|
|
+ Assert.False (Top.NewKeyDownEvent (Key.Enter));
|
|
|
|
|
|
break;
|
|
break;
|
|
case 4:
|
|
case 4:
|
|
@@ -1194,7 +1193,7 @@ public class DialogTests
|
|
[AutoInitShutdown]
|
|
[AutoInitShutdown]
|
|
public void Location_Default ()
|
|
public void Location_Default ()
|
|
{
|
|
{
|
|
- var d = new Dialog ()
|
|
|
|
|
|
+ var d = new Dialog
|
|
{
|
|
{
|
|
Width = Dim.Percent (85),
|
|
Width = Dim.Percent (85),
|
|
Height = Dim.Percent (85)
|
|
Height = Dim.Percent (85)
|
|
@@ -1253,86 +1252,6 @@ public class DialogTests
|
|
d.Dispose ();
|
|
d.Dispose ();
|
|
}
|
|
}
|
|
|
|
|
|
-// [Fact]
|
|
|
|
-// [AutoInitShutdown]
|
|
|
|
-// public void Location_When_Not_Application_Top_Not_Default ()
|
|
|
|
-// {
|
|
|
|
-// var top = new Toplevel ();
|
|
|
|
-// top.BorderStyle = LineStyle.Double;
|
|
|
|
-
|
|
|
|
-// int iterations = -1;
|
|
|
|
-
|
|
|
|
-// // Override CM
|
|
|
|
-// Window.DefaultBorderStyle = LineStyle.Single;
|
|
|
|
-// Dialog.DefaultButtonAlignment = Alignment.Center;
|
|
|
|
-// Dialog.DefaultBorderStyle = LineStyle.Single;
|
|
|
|
-// Dialog.DefaultShadow = ShadowStyle.None;
|
|
|
|
-
|
|
|
|
-// Iteration += (s, a) =>
|
|
|
|
-// {
|
|
|
|
-// iterations++;
|
|
|
|
-
|
|
|
|
-// if (iterations == 0)
|
|
|
|
-// {
|
|
|
|
-// var d = new Dialog { X = 5, Y = 5, Height = 3, Width = 5 };
|
|
|
|
-// RunState rs = Begin (d);
|
|
|
|
-
|
|
|
|
-// Assert.Equal (new (5, 5), d.Frame.Location);
|
|
|
|
-
|
|
|
|
-// TestHelpers.AssertDriverContentsWithFrameAre (
|
|
|
|
-// @"
|
|
|
|
-//╔══════════════════╗
|
|
|
|
-//║ ║
|
|
|
|
-//║ ║
|
|
|
|
-//║ ║
|
|
|
|
-//║ ║
|
|
|
|
-//║ ┌───┐ ║
|
|
|
|
-//║ │ │ ║
|
|
|
|
-//║ └───┘ ║
|
|
|
|
-//║ ║
|
|
|
|
-//╚══════════════════╝",
|
|
|
|
-// _output
|
|
|
|
-// );
|
|
|
|
-// End (rs);
|
|
|
|
-// d.Dispose ();
|
|
|
|
-
|
|
|
|
-// d = new ()
|
|
|
|
-// {
|
|
|
|
-// X = 5, Y = 5,
|
|
|
|
-// Width = Dim.Percent (85),
|
|
|
|
-// Height = Dim.Percent (85)
|
|
|
|
-
|
|
|
|
-// };
|
|
|
|
-// rs = Begin (d);
|
|
|
|
-
|
|
|
|
-// TestHelpers.AssertDriverContentsWithFrameAre (
|
|
|
|
-// @"
|
|
|
|
-//╔══════════════════╗
|
|
|
|
-//║ ║
|
|
|
|
-//║ ║
|
|
|
|
-//║ ║
|
|
|
|
-//║ ║
|
|
|
|
-//║ ┌──────────────
|
|
|
|
-//║ │
|
|
|
|
-//║ │
|
|
|
|
-//║ │
|
|
|
|
-//╚════│ ",
|
|
|
|
-// _output
|
|
|
|
-// );
|
|
|
|
-// End (rs);
|
|
|
|
-// d.Dispose ();
|
|
|
|
-// }
|
|
|
|
-// else if (iterations > 0)
|
|
|
|
-// {
|
|
|
|
-// RequestStop ();
|
|
|
|
-// }
|
|
|
|
-// };
|
|
|
|
-
|
|
|
|
-// ((FakeDriver)Driver).SetBufferSize (20, 10);
|
|
|
|
-// Run (top);
|
|
|
|
-// top.Dispose ();
|
|
|
|
-// }
|
|
|
|
-
|
|
|
|
[Fact]
|
|
[Fact]
|
|
[AutoInitShutdown]
|
|
[AutoInitShutdown]
|
|
public void One_Button_Works ()
|
|
public void One_Button_Works ()
|
|
@@ -1353,11 +1272,11 @@ public class DialogTests
|
|
d.SetBufferSize (buttonRow.Length, 10);
|
|
d.SetBufferSize (buttonRow.Length, 10);
|
|
|
|
|
|
(runstate, Dialog dlg) = BeginButtonTestDialog (
|
|
(runstate, Dialog dlg) = BeginButtonTestDialog (
|
|
- title,
|
|
|
|
- width,
|
|
|
|
- Alignment.Center,
|
|
|
|
- new Button { Text = btnText }
|
|
|
|
- );
|
|
|
|
|
|
+ title,
|
|
|
|
+ width,
|
|
|
|
+ Alignment.Center,
|
|
|
|
+ new Button { Text = btnText }
|
|
|
|
+ );
|
|
TestHelpers.AssertDriverContentsWithFrameAre ($"{buttonRow}", _output);
|
|
TestHelpers.AssertDriverContentsWithFrameAre ($"{buttonRow}", _output);
|
|
End (runstate);
|
|
End (runstate);
|
|
dlg.Dispose ();
|
|
dlg.Dispose ();
|
|
@@ -1367,7 +1286,7 @@ public class DialogTests
|
|
[AutoInitShutdown]
|
|
[AutoInitShutdown]
|
|
public void Size_Default ()
|
|
public void Size_Default ()
|
|
{
|
|
{
|
|
- var d = new Dialog ()
|
|
|
|
|
|
+ var d = new Dialog
|
|
{
|
|
{
|
|
Width = Dim.Percent (85),
|
|
Width = Dim.Percent (85),
|
|
Height = Dim.Percent (85)
|
|
Height = Dim.Percent (85)
|