mirror of
https://github.com/crskycode/GARbro.git
synced 2024-11-24 06:05:35 +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}">
|
Visibility="{Binding Source={x:Static p:Settings.Default}, Path=winStatusBarVisibility, Mode=TwoWay}">
|
||||||
<Separator Height="1" Margin="0"/>
|
<Separator Height="1" Margin="0"/>
|
||||||
<StatusBar>
|
<StatusBar>
|
||||||
<StatusBarItem>
|
<StatusBarItem Width="{Binding ElementName=CurrentDirectory, Path=ActualWidth}">
|
||||||
<TextBlock x:Name="appStatusText"/>
|
<TextBlock x:Name="appStatusText"/>
|
||||||
</StatusBarItem>
|
</StatusBarItem>
|
||||||
|
<Separator Width="1"/>
|
||||||
|
<StatusBarItem>
|
||||||
|
<TextBlock x:Name="appResourceText"/>
|
||||||
|
</StatusBarItem>
|
||||||
</StatusBar>
|
</StatusBar>
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
<Grid x:Name="ContentGrid" DockPanel.Dock="Left" VerticalAlignment="Stretch"
|
<Grid x:Name="ContentGrid" DockPanel.Dock="Left" VerticalAlignment="Stretch"
|
||||||
|
@ -146,6 +146,11 @@ namespace GARbro.GUI
|
|||||||
Dispatcher.Invoke (() => { appStatusText.Text = text; });
|
Dispatcher.Invoke (() => { appStatusText.Text = text; });
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void SetResourceText (string text)
|
||||||
|
{
|
||||||
|
Dispatcher.Invoke (() => { appResourceText.Text = text; });
|
||||||
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Popup error message box. Could be called from any thread.
|
/// Popup error message box. Could be called from any thread.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@ -822,7 +827,7 @@ namespace GARbro.GUI
|
|||||||
m_audio.PlaybackStopped += OnPlaybackStopped;
|
m_audio.PlaybackStopped += OnPlaybackStopped;
|
||||||
m_audio.Play();
|
m_audio.Play();
|
||||||
var fmt = wave_stream.WaveFormat;
|
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));
|
fmt.SampleRate, sound.SourceBitrate / 1000));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -834,7 +839,7 @@ namespace GARbro.GUI
|
|||||||
|
|
||||||
private void OnPlaybackStopped (object sender, StoppedEventArgs e)
|
private void OnPlaybackStopped (object sender, StoppedEventArgs e)
|
||||||
{
|
{
|
||||||
SetStatusText ("");
|
SetResourceText ("");
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
Loading…
Reference in New Issue
Block a user