diff options
author | sr55 <[email protected]> | 2009-06-29 20:05:04 +0000 |
---|---|---|
committer | sr55 <[email protected]> | 2009-06-29 20:05:04 +0000 |
commit | fafb7a774fba159de59fd54e5bf10b53a2382f7d (patch) | |
tree | 7e6ec763fb01a49e12f204dbfe3ca011557d3979 /win/C#/Controls/AudioPanel.cs | |
parent | 36d3b711916f38c606a4ed5db77608a07d5efbbe (diff) |
WinGui:
- Added Global Event Handlers to parts of some of the user controls.
- Added register and deregister event handler functions for widget changes. (This allows the preset label to be changed to custom when a user changes a widget). This isn't finalised.
- Misc UI tweaks
- Few bug fixes:
* Preset update notification appearing behind splashscreen
* Tweaks to the preset loader to make it work a bit better.
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@2640 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'win/C#/Controls/AudioPanel.cs')
-rw-r--r-- | win/C#/Controls/AudioPanel.cs | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/win/C#/Controls/AudioPanel.cs b/win/C#/Controls/AudioPanel.cs index 57a258322..272f88ce8 100644 --- a/win/C#/Controls/AudioPanel.cs +++ b/win/C#/Controls/AudioPanel.cs @@ -11,6 +11,7 @@ namespace Handbrake.Controls {
public partial class AudioPanel : UserControl
{
+ public event EventHandler AudioListChanged;
public AudioPanel()
{
InitializeComponent();
@@ -131,6 +132,10 @@ namespace Handbrake.Controls newTrack.SubItems.Add(lbl_drc.Text);
lv_audioList.Items.Add(newTrack);
+ // The Audio List has changed to raise the event.
+ if (this.AudioListChanged != null)
+ this.AudioListChanged(this, new EventArgs());
+
// Select the newly added track and select the control
lv_audioList.Items[lv_audioList.Items.Count - 1].Selected = true;
lv_audioList.Select();
@@ -184,6 +189,10 @@ namespace Handbrake.Controls // Remove the Item and reselect the control if the following conditions are met.
if (lv_audioList.SelectedItems.Count != 0)
{
+ // The Audio List is about to change so raise the event.
+ if (this.AudioListChanged != null)
+ this.AudioListChanged(this, new EventArgs());
+
// Record the current selected index.
int currentPosition = lv_audioList.SelectedIndices[0];
@@ -252,10 +261,14 @@ namespace Handbrake.Controls public void addTrackForPreset(ListViewItem item)
{
lv_audioList.Items.Add(item);
+ if (this.AudioListChanged != null)
+ this.AudioListChanged(this, new EventArgs());
}
public void clearAudioList()
{
lv_audioList.Items.Clear();
+ if (this.AudioListChanged != null)
+ this.AudioListChanged(this, new EventArgs());
}
public int getNewID()
{
|