[Mwinapi-commits] SF.net SVN: mwinapi:[80] trunk/Tools/VolumeFader
Status: Beta
Brought to you by:
schierlm
From: <sch...@us...> - 2009-02-09 18:40:35
|
Revision: 80 http://mwinapi.svn.sourceforge.net/mwinapi/?rev=80&view=rev Author: schierlm Date: 2009-02-09 18:40:25 +0000 (Mon, 09 Feb 2009) Log Message: ----------- Add a "line select" combo box Modified Paths: -------------- trunk/Tools/VolumeFader/MainForm.Designer.cs trunk/Tools/VolumeFader/MainForm.cs trunk/Tools/VolumeFader/Properties/AssemblyInfo.cs Property Changed: ---------------- trunk/Tools/VolumeFader/ Property changes on: trunk/Tools/VolumeFader ___________________________________________________________________ Modified: svn:ignore - bin obj VolumeFader.csproj.user + bin obj VolumeFader.csproj.user VolumeFader.suo Modified: trunk/Tools/VolumeFader/MainForm.Designer.cs =================================================================== --- trunk/Tools/VolumeFader/MainForm.Designer.cs 2009-02-08 15:26:24 UTC (rev 79) +++ trunk/Tools/VolumeFader/MainForm.Designer.cs 2009-02-09 18:40:25 UTC (rev 80) @@ -40,6 +40,8 @@ this.live = new System.Windows.Forms.CheckBox(); this.srcLineControlContainer = new System.Windows.Forms.TableLayoutPanel(); this.fadeTimer = new System.Windows.Forms.Timer(this.components); + this.muxSelect = new System.Windows.Forms.ComboBox(); + this.muxLabel = new System.Windows.Forms.Label(); this.destLineControl = new VolumeFader.LineControl(); this.tableLayoutPanel1.SuspendLayout(); this.splitContainer1.Panel1.SuspendLayout(); @@ -100,6 +102,8 @@ // // splitContainer1.Panel1 // + this.splitContainer1.Panel1.Controls.Add(this.muxLabel); + this.splitContainer1.Panel1.Controls.Add(this.muxSelect); this.splitContainer1.Panel1.Controls.Add(this.fadeLabel); this.splitContainer1.Panel1.Controls.Add(this.fadeSpeed); this.splitContainer1.Panel1.Controls.Add(this.fadeButton); @@ -110,7 +114,7 @@ // this.splitContainer1.Panel2.AutoScroll = true; this.splitContainer1.Panel2.Controls.Add(this.srcLineControlContainer); - this.splitContainer1.Size = new System.Drawing.Size(507, 257); + this.splitContainer1.Size = new System.Drawing.Size(507, 287); this.splitContainer1.SplitterDistance = 226; this.splitContainer1.TabIndex = 1; // @@ -119,7 +123,7 @@ this.fadeLabel.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left) | System.Windows.Forms.AnchorStyles.Right))); this.fadeLabel.Enabled = false; - this.fadeLabel.Location = new System.Drawing.Point(3, 144); + this.fadeLabel.Location = new System.Drawing.Point(3, 174); this.fadeLabel.Name = "fadeLabel"; this.fadeLabel.Size = new System.Drawing.Size(220, 13); this.fadeLabel.TabIndex = 4; @@ -130,7 +134,7 @@ this.fadeSpeed.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left) | System.Windows.Forms.AnchorStyles.Right))); this.fadeSpeed.Enabled = false; - this.fadeSpeed.Location = new System.Drawing.Point(3, 160); + this.fadeSpeed.Location = new System.Drawing.Point(3, 190); this.fadeSpeed.Maximum = 16; this.fadeSpeed.Name = "fadeSpeed"; this.fadeSpeed.Size = new System.Drawing.Size(220, 42); @@ -142,7 +146,7 @@ this.fadeButton.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left) | System.Windows.Forms.AnchorStyles.Right))); this.fadeButton.Enabled = false; - this.fadeButton.Location = new System.Drawing.Point(3, 208); + this.fadeButton.Location = new System.Drawing.Point(3, 238); this.fadeButton.Name = "fadeButton"; this.fadeButton.Size = new System.Drawing.Size(220, 23); this.fadeButton.TabIndex = 2; @@ -156,7 +160,7 @@ | System.Windows.Forms.AnchorStyles.Right))); this.live.Checked = true; this.live.CheckState = System.Windows.Forms.CheckState.Checked; - this.live.Location = new System.Drawing.Point(3, 237); + this.live.Location = new System.Drawing.Point(3, 267); this.live.Name = "live"; this.live.Size = new System.Drawing.Size(220, 17); this.live.TabIndex = 1; @@ -183,6 +187,27 @@ this.fadeTimer.Interval = 50; this.fadeTimer.Tick += new System.EventHandler(this.fadeTimer_Tick); // + // muxSelect + // + this.muxSelect.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; + this.muxSelect.FormattingEnabled = true; + this.muxSelect.Items.AddRange(new object[] { + ""}); + this.muxSelect.Location = new System.Drawing.Point(3, 150); + this.muxSelect.Name = "muxSelect"; + this.muxSelect.Size = new System.Drawing.Size(220, 21); + this.muxSelect.TabIndex = 5; + this.muxSelect.SelectedIndexChanged += new System.EventHandler(this.muxSelect_SelectedIndexChanged); + // + // muxLabel + // + this.muxLabel.AutoSize = true; + this.muxLabel.Location = new System.Drawing.Point(3, 134); + this.muxLabel.Name = "muxLabel"; + this.muxLabel.Size = new System.Drawing.Size(75, 13); + this.muxLabel.TabIndex = 6; + this.muxLabel.Text = "Selected Line:"; + // // destLineControl // this.destLineControl.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) @@ -195,7 +220,7 @@ // // MainForm // - this.ClientSize = new System.Drawing.Size(531, 319); + this.ClientSize = new System.Drawing.Size(531, 349); this.Controls.Add(this.splitContainer1); this.Controls.Add(this.tableLayoutPanel1); this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon"))); @@ -225,6 +250,8 @@ private System.Windows.Forms.Label fadeLabel; private System.Windows.Forms.TrackBar fadeSpeed; private System.Windows.Forms.Timer fadeTimer; + private System.Windows.Forms.ComboBox muxSelect; + private System.Windows.Forms.Label muxLabel; } } Modified: trunk/Tools/VolumeFader/MainForm.cs =================================================================== --- trunk/Tools/VolumeFader/MainForm.cs 2009-02-08 15:26:24 UTC (rev 79) +++ trunk/Tools/VolumeFader/MainForm.cs 2009-02-09 18:40:25 UTC (rev 80) @@ -13,12 +13,56 @@ { private Mixer mix = null; private DestinationLine dline = null; + private ListMixerControl mux = null; public MainForm() { InitializeComponent(); + UpdateMux(); } + private void UpdateMux() + { + if (mux != null) + { + mux.Changed -= mux_Changed; + } + mux = null; + muxSelect.Items.Clear(); + muxSelect.Items.Add("No MUX found."); + muxSelect.SelectedIndex = 0; + muxSelect.Enabled = false; + if (dline != null) + { + foreach (MixerControl ctrl in dline.Controls) + { + if (ctrl.ControlType == MixerControlType.MIXERCONTROL_CONTROLTYPE_MUX && ctrl is ListMixerControl) + { + muxSelect.Items.Clear(); + ListMixerControl listCtrl = (ListMixerControl)ctrl; + foreach (string label in listCtrl.ListTexts) + { + muxSelect.Items.Add(label); + } + Boolean[] values = listCtrl.Values; + for (int i = 0; i < values.Length; i++) + { + if (values[i]) + muxSelect.SelectedIndex = i; + } + muxSelect.Enabled = true; + mux = listCtrl; + mux.Changed += mux_Changed; + } + } + } + } + + private void mux_Changed(object source, EventArgs e) + { + UpdateMux(); + } + private void MainForm_Load(object sender, EventArgs e) { for (uint i = 0; i < Mixer.MixerCount; i++) @@ -78,6 +122,7 @@ } srcLineControlContainer.Height = sumHeight; } + UpdateMux(); } public bool IsLiveUpdate @@ -115,5 +160,13 @@ fadeLabel.Enabled = !live.Checked; fadeSpeed.Enabled = !live.Checked; } + + private void muxSelect_SelectedIndexChanged(object sender, EventArgs e) + { + if (mux == null) return; + bool[] values = new Boolean[mux.RawValueMultiplicity]; + values[muxSelect.SelectedIndex] = true; + mux.Values = values; + } } } \ No newline at end of file Modified: trunk/Tools/VolumeFader/Properties/AssemblyInfo.cs =================================================================== --- trunk/Tools/VolumeFader/Properties/AssemblyInfo.cs 2009-02-08 15:26:24 UTC (rev 79) +++ trunk/Tools/VolumeFader/Properties/AssemblyInfo.cs 2009-02-09 18:40:25 UTC (rev 80) @@ -1,4 +1,4 @@ -using System.Reflection; +using System.Reflection; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; @@ -10,7 +10,7 @@ [assembly: AssemblyConfiguration("")] [assembly: AssemblyCompany("")] [assembly: AssemblyProduct("VolumeFader")] -[assembly: AssemblyCopyright("Copyright © 2006, 2007 Michael Schierl")] +[assembly: AssemblyCopyright("Copyright \xA9 2006, 2007, 2009 Michael Schierl")] [assembly: AssemblyTrademark("")] [assembly: AssemblyCulture("")] @@ -29,5 +29,5 @@ // Build Number // Revision // -[assembly: AssemblyVersion("0.2")] -[assembly: AssemblyFileVersion("0.2")] +[assembly: AssemblyVersion("0.3.1")] +[assembly: AssemblyFileVersion("0.3.1")] This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |