Modifs interface (boutons a texte :/ )
Ajout fonction repeat seq son
This commit is contained in:
parent
1515b0a335
commit
47ea3a2139
4 changed files with 23 additions and 6 deletions
|
|
@ -55,6 +55,8 @@ namespace DMX2
|
||||||
Gst.State state,pending;
|
Gst.State state,pending;
|
||||||
Gst.StateChangeReturn scret;
|
Gst.StateChangeReturn scret;
|
||||||
|
|
||||||
|
bool repeat = false;
|
||||||
|
|
||||||
actionEventTargetEx volumeEventTarget=null;
|
actionEventTargetEx volumeEventTarget=null;
|
||||||
|
|
||||||
public ReadOnlyCollection<string> Files {
|
public ReadOnlyCollection<string> Files {
|
||||||
|
|
@ -72,6 +74,7 @@ namespace DMX2
|
||||||
return files.IndexOf (curfile);
|
return files.IndexOf (curfile);
|
||||||
}
|
}
|
||||||
set {
|
set {
|
||||||
|
repeat = false;
|
||||||
if(value>=0 && value< files.Count)
|
if(value>=0 && value< files.Count)
|
||||||
lock(this)
|
lock(this)
|
||||||
LoadFile(value);
|
LoadFile(value);
|
||||||
|
|
@ -229,12 +232,13 @@ namespace DMX2
|
||||||
get {
|
get {
|
||||||
if(element == null) return "Stopped";
|
if(element == null) return "Stopped";
|
||||||
UpdateState();
|
UpdateState();
|
||||||
|
string rpStr = repeat ? " (r)" : string.Empty;
|
||||||
if(pending == Gst.State.VoidPending){
|
if(pending == Gst.State.VoidPending){
|
||||||
return state.ToString();
|
return string.Format("{0}{1}", state.ToString(),rpStr);
|
||||||
}
|
}
|
||||||
if(scret == Gst.StateChangeReturn.Async)
|
if(scret == Gst.StateChangeReturn.Async)
|
||||||
return string.Format("{0}=>{1}", state,pending);
|
return string.Format("{0}=>{1}{2}", state,pending,rpStr);
|
||||||
return string.Format("{0}=>{1} : {2}",state,pending,scret);
|
return string.Format("{0}=>{1} : {2} {3}",state,pending,scret,rpStr);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -286,6 +290,13 @@ namespace DMX2
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if (repeat) {
|
||||||
|
if (state == Gst.State.Playing) {
|
||||||
|
if ((Duration - PlayTime).TotalSeconds < 0.001) {
|
||||||
|
PlayTime = TimeSpan.Zero;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public override void Save (System.Xml.XmlElement parent)
|
public override void Save (System.Xml.XmlElement parent)
|
||||||
|
|
@ -325,11 +336,11 @@ namespace DMX2
|
||||||
|
|
||||||
|
|
||||||
static System.Text.RegularExpressions.Regex regexCommand1 = new System.Text.RegularExpressions.Regex(
|
static System.Text.RegularExpressions.Regex regexCommand1 = new System.Text.RegularExpressions.Regex(
|
||||||
@"(?<file>\d+)?(g(?<goto>[\d\.:]+))?(v(?<volume>\d+)(,(?<fade>\d+))?)?(?<play>(ps|p|s))?",
|
@"(?<file>\d+)?(g(?<goto>[\d\.:]+))?(v(?<volume>\d+)(,(?<fade>\d+))?)?(?<play>(ps|p|s))?(?<repeat>(r))?",
|
||||||
System.Text.RegularExpressions.RegexOptions.Compiled);
|
System.Text.RegularExpressions.RegexOptions.Compiled);
|
||||||
|
|
||||||
static System.Text.RegularExpressions.Regex regexCommand2 = new System.Text.RegularExpressions.Regex(
|
static System.Text.RegularExpressions.Regex regexCommand2 = new System.Text.RegularExpressions.Regex(
|
||||||
@"^(?<file>\d+)(?<params>[gvp](.+)?)?",
|
@"^(?<file>\d+)(?<params>[gvpsr](.+)?)?",
|
||||||
System.Text.RegularExpressions.RegexOptions.Compiled);
|
System.Text.RegularExpressions.RegexOptions.Compiled);
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -393,6 +404,9 @@ namespace DMX2
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if (cmd.Groups ["repeat"].Success) {
|
||||||
|
repeat = true;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -497,6 +497,7 @@ namespace DMX2
|
||||||
this.toolbar7 = ((global::Gtk.Toolbar)(this.UIManager.GetWidget ("/toolbar7")));
|
this.toolbar7 = ((global::Gtk.Toolbar)(this.UIManager.GetWidget ("/toolbar7")));
|
||||||
this.toolbar7.Name = "toolbar7";
|
this.toolbar7.Name = "toolbar7";
|
||||||
this.toolbar7.ShowArrow = false;
|
this.toolbar7.ShowArrow = false;
|
||||||
|
this.toolbar7.ToolbarStyle = ((global::Gtk.ToolbarStyle)(0));
|
||||||
this.hbox4.Add (this.toolbar7);
|
this.hbox4.Add (this.toolbar7);
|
||||||
global::Gtk.Box.BoxChild w80 = ((global::Gtk.Box.BoxChild)(this.hbox4 [this.toolbar7]));
|
global::Gtk.Box.BoxChild w80 = ((global::Gtk.Box.BoxChild)(this.hbox4 [this.toolbar7]));
|
||||||
w80.Position = 0;
|
w80.Position = 0;
|
||||||
|
|
|
||||||
|
|
@ -185,6 +185,7 @@ namespace DMX2
|
||||||
this.toolbar2 = ((global::Gtk.Toolbar)(this.UIManager.GetWidget ("/toolbar2")));
|
this.toolbar2 = ((global::Gtk.Toolbar)(this.UIManager.GetWidget ("/toolbar2")));
|
||||||
this.toolbar2.Name = "toolbar2";
|
this.toolbar2.Name = "toolbar2";
|
||||||
this.toolbar2.ShowArrow = false;
|
this.toolbar2.ShowArrow = false;
|
||||||
|
this.toolbar2.ToolbarStyle = ((global::Gtk.ToolbarStyle)(0));
|
||||||
this.toolbar2.IconSize = ((global::Gtk.IconSize)(2));
|
this.toolbar2.IconSize = ((global::Gtk.IconSize)(2));
|
||||||
this.vbox4.Add (this.toolbar2);
|
this.vbox4.Add (this.toolbar2);
|
||||||
global::Gtk.Box.BoxChild w11 = ((global::Gtk.Box.BoxChild)(this.vbox4 [this.toolbar2]));
|
global::Gtk.Box.BoxChild w11 = ((global::Gtk.Box.BoxChild)(this.vbox4 [this.toolbar2]));
|
||||||
|
|
|
||||||
|
|
@ -617,6 +617,7 @@ page</property>
|
||||||
<widget class="Gtk.Toolbar" id="toolbar7">
|
<widget class="Gtk.Toolbar" id="toolbar7">
|
||||||
<property name="MemberName" />
|
<property name="MemberName" />
|
||||||
<property name="ShowArrow">False</property>
|
<property name="ShowArrow">False</property>
|
||||||
|
<property name="ButtonStyle">Icons</property>
|
||||||
<node name="toolbar7" type="Toolbar">
|
<node name="toolbar7" type="Toolbar">
|
||||||
<node type="Toolitem" action="circAction" />
|
<node type="Toolitem" action="circAction" />
|
||||||
<node type="Toolitem" action="seqLinAction" />
|
<node type="Toolitem" action="seqLinAction" />
|
||||||
|
|
@ -1015,6 +1016,7 @@ au sequenceur</property>
|
||||||
<widget class="Gtk.Toolbar" id="toolbar2">
|
<widget class="Gtk.Toolbar" id="toolbar2">
|
||||||
<property name="MemberName" />
|
<property name="MemberName" />
|
||||||
<property name="ShowArrow">False</property>
|
<property name="ShowArrow">False</property>
|
||||||
|
<property name="ButtonStyle">Icons</property>
|
||||||
<property name="IconSize">SmallToolbar</property>
|
<property name="IconSize">SmallToolbar</property>
|
||||||
<node name="toolbar2" type="Toolbar">
|
<node name="toolbar2" type="Toolbar">
|
||||||
<node type="Toolitem" action="saveAction" />
|
<node type="Toolitem" action="saveAction" />
|
||||||
|
|
@ -3900,7 +3902,6 @@ trames DMX (ms)</property>
|
||||||
<child>
|
<child>
|
||||||
<widget class="Gtk.Label" id="titleLabel">
|
<widget class="Gtk.Label" id="titleLabel">
|
||||||
<property name="MemberName" />
|
<property name="MemberName" />
|
||||||
<property name="LabelProp" translatable="yes" />
|
|
||||||
<property name="UseMarkup">True</property>
|
<property name="UseMarkup">True</property>
|
||||||
<property name="Wrap">True</property>
|
<property name="Wrap">True</property>
|
||||||
</widget>
|
</widget>
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue