Call CalculatePosition if CenteredScreen.Title gets changed
This commit is contained in:
parent
fb44579b33
commit
a70f4f4393
|
@ -21,11 +21,7 @@ namespace CC_Functions.Commandline.TUI
|
|||
/// </summary>
|
||||
public Panel ContentPanel;
|
||||
|
||||
/// <summary>
|
||||
/// The title to display at the top of the console
|
||||
/// </summary>
|
||||
public string Title = "CC-Functions.CommandLine app";
|
||||
|
||||
private string _title = "CC-Functions.CommandLine app";
|
||||
private readonly Label _titleLabel;
|
||||
|
||||
/// <summary>
|
||||
|
@ -47,6 +43,22 @@ namespace CC_Functions.Commandline.TUI
|
|||
CalculatePosition(true);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// The title to display at the top of the console
|
||||
/// </summary>
|
||||
public string Title
|
||||
{
|
||||
get => _title;
|
||||
set
|
||||
{
|
||||
if (_title != value && !string.IsNullOrWhiteSpace(value))
|
||||
{
|
||||
_title = value;
|
||||
CalculatePosition();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Calculates the Size variable, Title and ContentPanel position/size
|
||||
/// </summary>
|
||||
|
|
Reference in New Issue