This commit is contained in:
parent
d14c1e7768
commit
f2c69c1260
4 changed files with 35 additions and 17 deletions
|
|
@ -175,6 +175,11 @@ namespace DMX2
|
||||||
{
|
{
|
||||||
Console.WriteLine("FF Released");
|
Console.WriteLine("FF Released");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
protected void OnSclVolumeValueChanged (object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
sequenceur.Volume = (uint)(sclVolume.Value);
|
||||||
|
}
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -35,6 +35,8 @@ namespace DMX2
|
||||||
|
|
||||||
string curfile = string.Empty;
|
string curfile = string.Empty;
|
||||||
|
|
||||||
|
uint volume=100;
|
||||||
|
|
||||||
Gst.Element element = null;
|
Gst.Element element = null;
|
||||||
|
|
||||||
public ReadOnlyCollection<string> Files {
|
public ReadOnlyCollection<string> Files {
|
||||||
|
|
@ -66,6 +68,15 @@ namespace DMX2
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public uint Volume {
|
||||||
|
get{ return volume;}
|
||||||
|
set {
|
||||||
|
volume=value;
|
||||||
|
if(element!=null)
|
||||||
|
element["volume"] = (double)volume / 100.0d ;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public void DelFile (int pos)
|
public void DelFile (int pos)
|
||||||
{
|
{
|
||||||
lock (this) {
|
lock (this) {
|
||||||
|
|
@ -95,7 +106,6 @@ namespace DMX2
|
||||||
if(element == null)return;
|
if(element == null)return;
|
||||||
element.SetState(Gst.State.Playing);
|
element.SetState(Gst.State.Playing);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void Pause ()
|
public void Pause ()
|
||||||
{
|
{
|
||||||
if(element == null)return;
|
if(element == null)return;
|
||||||
|
|
@ -103,6 +113,7 @@ namespace DMX2
|
||||||
}
|
}
|
||||||
public void Stop ()
|
public void Stop ()
|
||||||
{
|
{
|
||||||
|
if(element == null)return;
|
||||||
element.SetState(Gst.State.Null);
|
element.SetState(Gst.State.Null);
|
||||||
element.Dispose();
|
element.Dispose();
|
||||||
element=null;
|
element=null;
|
||||||
|
|
|
||||||
|
|
@ -39,7 +39,7 @@ namespace DMX2
|
||||||
private global::Gtk.Button btnNext;
|
private global::Gtk.Button btnNext;
|
||||||
private global::Gtk.Entry entry1;
|
private global::Gtk.Entry entry1;
|
||||||
private global::Gtk.Button button133;
|
private global::Gtk.Button button133;
|
||||||
private global::Gtk.VScale vscale1;
|
private global::Gtk.VScale sclVolume;
|
||||||
private global::Gtk.Toolbar toolbar4;
|
private global::Gtk.Toolbar toolbar4;
|
||||||
private global::Gtk.ScrolledWindow GtkScrolledWindow;
|
private global::Gtk.ScrolledWindow GtkScrolledWindow;
|
||||||
private global::Gtk.NodeView listFiles;
|
private global::Gtk.NodeView listFiles;
|
||||||
|
|
@ -358,20 +358,20 @@ namespace DMX2
|
||||||
global::Gtk.Box.BoxChild w75 = ((global::Gtk.Box.BoxChild)(this.hbox1 [this.vbox3]));
|
global::Gtk.Box.BoxChild w75 = ((global::Gtk.Box.BoxChild)(this.hbox1 [this.vbox3]));
|
||||||
w75.Position = 0;
|
w75.Position = 0;
|
||||||
// Container child hbox1.Gtk.Box+BoxChild
|
// Container child hbox1.Gtk.Box+BoxChild
|
||||||
this.vscale1 = new global::Gtk.VScale (null);
|
this.sclVolume = new global::Gtk.VScale (null);
|
||||||
this.vscale1.WidthRequest = 20;
|
this.sclVolume.WidthRequest = 20;
|
||||||
this.vscale1.CanFocus = true;
|
this.sclVolume.CanFocus = true;
|
||||||
this.vscale1.Name = "vscale1";
|
this.sclVolume.Name = "sclVolume";
|
||||||
this.vscale1.Inverted = true;
|
this.sclVolume.Inverted = true;
|
||||||
this.vscale1.Adjustment.Upper = 100;
|
this.sclVolume.Adjustment.Upper = 100;
|
||||||
this.vscale1.Adjustment.PageIncrement = 10;
|
this.sclVolume.Adjustment.PageIncrement = 10;
|
||||||
this.vscale1.Adjustment.StepIncrement = 1;
|
this.sclVolume.Adjustment.StepIncrement = 1;
|
||||||
this.vscale1.Adjustment.Value = 100;
|
this.sclVolume.Adjustment.Value = 100;
|
||||||
this.vscale1.DrawValue = true;
|
this.sclVolume.DrawValue = true;
|
||||||
this.vscale1.Digits = 0;
|
this.sclVolume.Digits = 0;
|
||||||
this.vscale1.ValuePos = ((global::Gtk.PositionType)(3));
|
this.sclVolume.ValuePos = ((global::Gtk.PositionType)(3));
|
||||||
this.hbox1.Add (this.vscale1);
|
this.hbox1.Add (this.sclVolume);
|
||||||
global::Gtk.Box.BoxChild w76 = ((global::Gtk.Box.BoxChild)(this.hbox1 [this.vscale1]));
|
global::Gtk.Box.BoxChild w76 = ((global::Gtk.Box.BoxChild)(this.hbox1 [this.sclVolume]));
|
||||||
w76.Position = 1;
|
w76.Position = 1;
|
||||||
w76.Expand = false;
|
w76.Expand = false;
|
||||||
w76.Fill = false;
|
w76.Fill = false;
|
||||||
|
|
@ -430,6 +430,7 @@ namespace DMX2
|
||||||
this.btnForward.Pressed += new global::System.EventHandler (this.OnBtnForwardPressed);
|
this.btnForward.Pressed += new global::System.EventHandler (this.OnBtnForwardPressed);
|
||||||
this.btnForward.Released += new global::System.EventHandler (this.OnBtnForwardReleased);
|
this.btnForward.Released += new global::System.EventHandler (this.OnBtnForwardReleased);
|
||||||
this.btnNext.Clicked += new global::System.EventHandler (this.OnBtnNextClicked);
|
this.btnNext.Clicked += new global::System.EventHandler (this.OnBtnNextClicked);
|
||||||
|
this.sclVolume.ValueChanged += new global::System.EventHandler (this.OnSclVolumeValueChanged);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -3866,7 +3866,7 @@ trames DMX (ms)</property>
|
||||||
</packing>
|
</packing>
|
||||||
</child>
|
</child>
|
||||||
<child>
|
<child>
|
||||||
<widget class="Gtk.VScale" id="vscale1">
|
<widget class="Gtk.VScale" id="sclVolume">
|
||||||
<property name="MemberName" />
|
<property name="MemberName" />
|
||||||
<property name="WidthRequest">20</property>
|
<property name="WidthRequest">20</property>
|
||||||
<property name="CanFocus">True</property>
|
<property name="CanFocus">True</property>
|
||||||
|
|
@ -3878,6 +3878,7 @@ trames DMX (ms)</property>
|
||||||
<property name="DrawValue">True</property>
|
<property name="DrawValue">True</property>
|
||||||
<property name="Digits">0</property>
|
<property name="Digits">0</property>
|
||||||
<property name="ValuePos">Bottom</property>
|
<property name="ValuePos">Bottom</property>
|
||||||
|
<signal name="ValueChanged" handler="OnSclVolumeValueChanged" />
|
||||||
</widget>
|
</widget>
|
||||||
<packing>
|
<packing>
|
||||||
<property name="Position">1</property>
|
<property name="Position">1</property>
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue