Tastudio - fix up how the winform text property is generated
This commit is contained in:
parent
cee8c0dcb9
commit
64706e2a9e
|
@ -123,11 +123,22 @@ namespace BizHawk.Client.EmuHawk
|
||||||
WantsToControlStopMovie = false;
|
WantsToControlStopMovie = false;
|
||||||
GlobalWin.MainForm.StartNewMovie(_currentTasMovie, record: true);
|
GlobalWin.MainForm.StartNewMovie(_currentTasMovie, record: true);
|
||||||
WantsToControlStopMovie = true;
|
WantsToControlStopMovie = true;
|
||||||
Text = "TAStudio - " + _currentTasMovie.Name;
|
SetTExtProperty();
|
||||||
RefreshDialog();
|
RefreshDialog();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void SetTExtProperty()
|
||||||
|
{
|
||||||
|
var text = "TAStudio";
|
||||||
|
if (_currentTasMovie != null)
|
||||||
|
{
|
||||||
|
text += " - " + _currentTasMovie.Name + (_currentTasMovie.Changes ? "*" : "");
|
||||||
|
}
|
||||||
|
|
||||||
|
Text = text;
|
||||||
|
}
|
||||||
|
|
||||||
public void LoadProject(string path)
|
public void LoadProject(string path)
|
||||||
{
|
{
|
||||||
if (AskSaveChanges())
|
if (AskSaveChanges())
|
||||||
|
@ -1002,15 +1013,7 @@ namespace BizHawk.Client.EmuHawk
|
||||||
//This method is called everytime the Changes property is toggled on a TasMovie instance.
|
//This method is called everytime the Changes property is toggled on a TasMovie instance.
|
||||||
private void TasMovie_OnPropertyChanged(object sender, PropertyChangedEventArgs e)
|
private void TasMovie_OnPropertyChanged(object sender, PropertyChangedEventArgs e)
|
||||||
{
|
{
|
||||||
if (_currentTasMovie != null && _currentTasMovie.Changes)
|
SetTExtProperty();
|
||||||
{
|
|
||||||
|
|
||||||
Text += "*";
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
Text = Text.Replace("*", "");
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
Loading…
Reference in New Issue