mirror of
https://github.com/gui-cs/Terminal.Gui.git
synced 2026-01-01 16:59:35 +01:00
Rebased onto v2_2491-Overlapped
This commit is contained in:
@@ -29,6 +29,8 @@ public class DialogTests
|
||||
// Override CM
|
||||
Dialog.DefaultButtonAlignment = Alignment.Center;
|
||||
Dialog.DefaultBorderStyle = LineStyle.Single;
|
||||
Dialog.DefaultShadow = ShadowStyle.None;
|
||||
Button.DefaultShadow = ShadowStyle.None;
|
||||
|
||||
// Default (center)
|
||||
var dlg = new Dialog
|
||||
@@ -138,6 +140,8 @@ public class DialogTests
|
||||
RunState runstate = null;
|
||||
|
||||
var d = (FakeDriver)Driver;
|
||||
Dialog.DefaultShadow = ShadowStyle.None;
|
||||
Button.DefaultShadow = ShadowStyle.None;
|
||||
|
||||
var title = "1234";
|
||||
|
||||
@@ -229,6 +233,8 @@ public class DialogTests
|
||||
RunState runstate = null;
|
||||
|
||||
var d = (FakeDriver)Driver;
|
||||
Dialog.DefaultShadow = ShadowStyle.None;
|
||||
Button.DefaultShadow = ShadowStyle.None;
|
||||
|
||||
var title = "1234";
|
||||
|
||||
@@ -322,6 +328,8 @@ public class DialogTests
|
||||
RunState runstate = null;
|
||||
|
||||
var d = (FakeDriver)Driver;
|
||||
Dialog.DefaultShadow = ShadowStyle.None;
|
||||
Button.DefaultShadow = ShadowStyle.None;
|
||||
|
||||
var title = "1234";
|
||||
|
||||
@@ -414,6 +422,8 @@ public class DialogTests
|
||||
RunState runstate = null;
|
||||
|
||||
var d = (FakeDriver)Driver;
|
||||
Dialog.DefaultShadow = ShadowStyle.None;
|
||||
Button.DefaultShadow = ShadowStyle.None;
|
||||
|
||||
var title = "1234";
|
||||
|
||||
@@ -507,6 +517,8 @@ public class DialogTests
|
||||
{
|
||||
var d = (FakeDriver)Driver;
|
||||
RunState runstate = null;
|
||||
Dialog.DefaultShadow = ShadowStyle.None;
|
||||
Button.DefaultShadow = ShadowStyle.None;
|
||||
|
||||
var title = "1234";
|
||||
|
||||
@@ -646,6 +658,8 @@ public class DialogTests
|
||||
RunState runstate = null;
|
||||
|
||||
var d = (FakeDriver)Driver;
|
||||
Dialog.DefaultShadow = ShadowStyle.None;
|
||||
Button.DefaultShadow = ShadowStyle.None;
|
||||
|
||||
var title = "1234";
|
||||
|
||||
@@ -730,6 +744,8 @@ public class DialogTests
|
||||
RunState runstate = null;
|
||||
|
||||
var d = (FakeDriver)Driver;
|
||||
Dialog.DefaultShadow = ShadowStyle.None;
|
||||
Button.DefaultShadow = ShadowStyle.None;
|
||||
|
||||
var title = "1234";
|
||||
|
||||
@@ -809,6 +825,8 @@ public class DialogTests
|
||||
var firstIteration = false;
|
||||
|
||||
var d = (FakeDriver)Driver;
|
||||
Dialog.DefaultShadow = ShadowStyle.None;
|
||||
Button.DefaultShadow = ShadowStyle.None;
|
||||
|
||||
var title = "1234";
|
||||
|
||||
@@ -883,6 +901,8 @@ public class DialogTests
|
||||
Window.DefaultBorderStyle = LineStyle.Single;
|
||||
Dialog.DefaultButtonAlignment = Alignment.Center;
|
||||
Dialog.DefaultBorderStyle = LineStyle.Single;
|
||||
Dialog.DefaultShadow = ShadowStyle.None;
|
||||
Button.DefaultShadow = ShadowStyle.None;
|
||||
|
||||
var win = new Window ();
|
||||
|
||||
@@ -988,7 +1008,9 @@ public class DialogTests
|
||||
// Override CM
|
||||
Dialog.DefaultButtonAlignment = Alignment.Center;
|
||||
Dialog.DefaultBorderStyle = LineStyle.Single;
|
||||
|
||||
Dialog.DefaultShadow = ShadowStyle.None;
|
||||
Button.DefaultShadow = ShadowStyle.None;
|
||||
|
||||
Iteration += (s, a) =>
|
||||
{
|
||||
iterations++;
|
||||
@@ -1028,6 +1050,8 @@ public class DialogTests
|
||||
// Override CM
|
||||
Dialog.DefaultButtonAlignment = Alignment.Center;
|
||||
Dialog.DefaultBorderStyle = LineStyle.Single;
|
||||
Dialog.DefaultShadow = ShadowStyle.None;
|
||||
Button.DefaultShadow = ShadowStyle.None;
|
||||
|
||||
var btn1 = new Button { Text = "press me 1" };
|
||||
Button btn2 = null;
|
||||
@@ -1178,6 +1202,8 @@ public class DialogTests
|
||||
Window.DefaultBorderStyle = LineStyle.Single;
|
||||
Dialog.DefaultButtonAlignment = Alignment.Center;
|
||||
Dialog.DefaultBorderStyle = LineStyle.Single;
|
||||
Dialog.DefaultShadow = ShadowStyle.None;
|
||||
Button.DefaultShadow = ShadowStyle.None;
|
||||
|
||||
var expected = 5;
|
||||
var d = new Dialog { X = expected, Y = expected, Height = 5, Width = 5 };
|
||||
@@ -1287,6 +1313,8 @@ public class DialogTests
|
||||
|
||||
var d = (FakeDriver)Driver;
|
||||
|
||||
Button.DefaultShadow = ShadowStyle.None;
|
||||
|
||||
var title = "";
|
||||
var btnText = "ok";
|
||||
|
||||
@@ -1329,6 +1357,8 @@ public class DialogTests
|
||||
[AutoInitShutdown]
|
||||
public void Size_Not_Default ()
|
||||
{
|
||||
Dialog.DefaultShadow = ShadowStyle.None;
|
||||
Button.DefaultShadow = ShadowStyle.None;
|
||||
var d = new Dialog { Width = 50, Height = 50 };
|
||||
|
||||
Begin (d);
|
||||
@@ -1370,6 +1400,8 @@ public class DialogTests
|
||||
// Override CM
|
||||
Dialog.DefaultButtonAlignment = Alignment.Center;
|
||||
Dialog.DefaultBorderStyle = LineStyle.Single;
|
||||
Dialog.DefaultShadow = ShadowStyle.None;
|
||||
Button.DefaultShadow = ShadowStyle.None;
|
||||
|
||||
var dlg = new Dialog
|
||||
{
|
||||
|
||||
@@ -138,6 +138,8 @@ public class MessageBoxTests
|
||||
int iterations = -1;
|
||||
|
||||
((FakeDriver)Application.Driver!).SetBufferSize (15, 15); // 15 x 15 gives us enough room for a button with one char (9x1)
|
||||
Dialog.DefaultShadow = ShadowStyle.None;
|
||||
Button.DefaultShadow = ShadowStyle.None;
|
||||
|
||||
Rectangle mbFrame = Rectangle.Empty;
|
||||
|
||||
@@ -177,6 +179,8 @@ public class MessageBoxTests
|
||||
// Override CM
|
||||
MessageBox.DefaultButtonAlignment = Alignment.End;
|
||||
MessageBox.DefaultBorderStyle = LineStyle.Double;
|
||||
Dialog.DefaultShadow = ShadowStyle.None;
|
||||
Button.DefaultShadow = ShadowStyle.None;
|
||||
|
||||
Application.Iteration += (s, a) =>
|
||||
{
|
||||
@@ -229,6 +233,7 @@ public class MessageBoxTests
|
||||
};
|
||||
|
||||
Application.Run (top);
|
||||
top.Dispose ();
|
||||
}
|
||||
|
||||
[Fact]
|
||||
@@ -246,6 +251,8 @@ public class MessageBoxTests
|
||||
// Override CM
|
||||
MessageBox.DefaultButtonAlignment = Alignment.End;
|
||||
MessageBox.DefaultBorderStyle = LineStyle.Double;
|
||||
Dialog.DefaultShadow = ShadowStyle.None;
|
||||
Button.DefaultShadow = ShadowStyle.None;
|
||||
|
||||
Application.Iteration += (s, a) =>
|
||||
{
|
||||
@@ -426,6 +433,8 @@ public class MessageBoxTests
|
||||
// Override CM
|
||||
MessageBox.DefaultButtonAlignment = Alignment.End;
|
||||
MessageBox.DefaultBorderStyle = LineStyle.Double;
|
||||
Dialog.DefaultShadow = ShadowStyle.None;
|
||||
Button.DefaultShadow = ShadowStyle.None;
|
||||
|
||||
Application.Iteration += (s, a) =>
|
||||
{
|
||||
@@ -473,7 +482,7 @@ public class MessageBoxTests
|
||||
var top = new Toplevel ();
|
||||
top.BorderStyle = LineStyle.Single;
|
||||
Application.Run (top);
|
||||
|
||||
top.Dispose ();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user