mirror of
https://github.com/crskycode/GARbro.git
synced 2024-11-23 21:55:34 +08:00
added separate status bar text for sound file currently playing.
This commit is contained in:
parent
ec8f39a2c7
commit
88d7b7d492
@ -221,9 +221,13 @@
|
||||
Visibility="{Binding Source={x:Static p:Settings.Default}, Path=winStatusBarVisibility, Mode=TwoWay}">
|
||||
<Separator Height="1" Margin="0"/>
|
||||
<StatusBar>
|
||||
<StatusBarItem>
|
||||
<StatusBarItem Width="{Binding ElementName=CurrentDirectory, Path=ActualWidth}">
|
||||
<TextBlock x:Name="appStatusText"/>
|
||||
</StatusBarItem>
|
||||
<Separator Width="1"/>
|
||||
<StatusBarItem>
|
||||
<TextBlock x:Name="appResourceText"/>
|
||||
</StatusBarItem>
|
||||
</StatusBar>
|
||||
</StackPanel>
|
||||
<Grid x:Name="ContentGrid" DockPanel.Dock="Left" VerticalAlignment="Stretch"
|
||||
|
@ -146,6 +146,11 @@ namespace GARbro.GUI
|
||||
Dispatcher.Invoke (() => { appStatusText.Text = text; });
|
||||
}
|
||||
|
||||
public void SetResourceText (string text)
|
||||
{
|
||||
Dispatcher.Invoke (() => { appResourceText.Text = text; });
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Popup error message box. Could be called from any thread.
|
||||
/// </summary>
|
||||
@ -822,7 +827,7 @@ namespace GARbro.GUI
|
||||
m_audio.PlaybackStopped += OnPlaybackStopped;
|
||||
m_audio.Play();
|
||||
var fmt = wave_stream.WaveFormat;
|
||||
SetStatusText (string.Format ("Playing {0} / {2}bps / {1}Hz", entry.Name,
|
||||
SetResourceText (string.Format ("Playing {0} / {2}bps / {1}Hz", entry.Name,
|
||||
fmt.SampleRate, sound.SourceBitrate / 1000));
|
||||
}
|
||||
}
|
||||
@ -834,7 +839,7 @@ namespace GARbro.GUI
|
||||
|
||||
private void OnPlaybackStopped (object sender, StoppedEventArgs e)
|
||||
{
|
||||
SetStatusText ("");
|
||||
SetResourceText ("");
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
Loading…
Reference in New Issue
Block a user