mirror of
https://github.com/gui-cs/Terminal.Gui.git
synced 2026-01-02 01:03:29 +01:00
Fixed all modelusage bugs?
Replaced static `Application` references with instance-based `App` context across the codebase. Updated calls to `Application.RequestStop()` and `Application.Screen` to use `App?.RequestStop()` and `App?.Screen` for better encapsulation and flexibility. Refactored test infrastructure to align with the new context, including reintroducing `FakeApplicationFactory` and `FakeApplicationLifecycle` for testing purposes. Improved logging, error handling, and test clarity by adding `logWriter` support and simplifying test setup. Removed redundant or obsolete code, such as `NetSequences` and the old `FakeApplicationFactory` implementation. Updated documentation to reflect the new `IApplication.RequestStop()` usage.
This commit is contained in:
@@ -266,7 +266,7 @@ public class Dialogs : Scenario
|
||||
{
|
||||
Title = titleEdit.Text,
|
||||
Text = "Dialog Text",
|
||||
ButtonAlignment = (Alignment)Enum.Parse (typeof (Alignment), alignmentGroup.Labels! [(int)alignmentGroup.Value!.Value] [1..]),
|
||||
ButtonAlignment = (Alignment)Enum.Parse (typeof (Alignment), alignmentGroup.Labels! [(int)alignmentGroup.Value!.Value] [0..]),
|
||||
|
||||
Buttons = buttons.ToArray ()
|
||||
};
|
||||
|
||||
@@ -200,7 +200,7 @@ public class DynamicStatusBar : Scenario
|
||||
TextTitle.Text = string.Empty;
|
||||
Application.RequestStop ();
|
||||
};
|
||||
var dialog = new Dialog { Title = "Enter the menu details.", Buttons = [btnOk, btnCancel], Height = Dim.Auto (DimAutoStyle.Content, 17, Application.Screen.Height) };
|
||||
var dialog = new Dialog { Title = "Enter the menu details.", Buttons = [btnOk, btnCancel], Height = Dim.Auto (DimAutoStyle.Content, 17, App?.Screen.Height) };
|
||||
|
||||
Width = Dim.Fill ();
|
||||
Height = Dim.Fill () - 2;
|
||||
|
||||
Reference in New Issue
Block a user