Optimisations

This commit is contained in:
tzim 2013-11-06 15:33:58 +00:00
parent f20534e44f
commit c50de673d2
7 changed files with 27 additions and 12 deletions

View file

@ -163,7 +163,7 @@ namespace DMX2
if (!Pause) { if (!Pause) {
if (deltaT > TimeSpan.FromMilliseconds (15)) if (deltaT > TimeSpan.FromMilliseconds (15))
Console.WriteLine ("{0}", deltaT); Info.Publish(string.Format ("{0}", deltaT));
lock (this) { lock (this) {

View file

@ -115,6 +115,7 @@
<Compile Include="SequenceurMacro.cs" /> <Compile Include="SequenceurMacro.cs" />
<Compile Include="SeqMacroUI.cs" /> <Compile Include="SeqMacroUI.cs" />
<Compile Include="gtk-gui\DMX2.SeqMacroUI.cs" /> <Compile Include="gtk-gui\DMX2.SeqMacroUI.cs" />
<Compile Include="Info.cs" />
</ItemGroup> </ItemGroup>
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" /> <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
<ProjectExtensions> <ProjectExtensions>

12
DMX-2.0/Info.cs Normal file
View file

@ -0,0 +1,12 @@
using System;
namespace DMX2
{
public class Info
{
public Info ()
{
}
}
}

View file

@ -460,6 +460,7 @@ namespace DMX2
void Update (object sender, EventArgs e) void Update (object sender, EventArgs e)
{ {
lblInfo.Text = Info.GetInfo();
if(Conduite.Courante==null)return; if(Conduite.Courante==null)return;
foreach (var notebookchild in onglets.Children) { foreach (var notebookchild in onglets.Children) {
SequenceurUI sequi = notebookchild as SequenceurUI; SequenceurUI sequi = notebookchild as SequenceurUI;

View file

@ -326,13 +326,14 @@ namespace DMX2
updating = true; updating = true;
foreach (Circuit c in tirettes.Keys) { foreach (Circuit c in tirettes.Keys) {
tirettes[c].Value = sequenceur.ValeurBruteCircuit(c); tirettes[c].Value = sequenceur.ValeurBruteCircuit(c);
string tname;
if(sequenceur.EstChange(c)) if(sequenceur.EstChange(c))
tirettes[c].Name="sclTiretteC"; tname="sclTiretteC";
else if (sequenceur.EnTransition(c)) else if (sequenceur.EnTransition(c))
tirettes[c].Name="sclTiretteT"; tname="sclTiretteT";
else else
tirettes[c].Name="sclTirette"; tname="sclTirette";
if (tirettes[c].Name != tname) tirettes[c].Name = tname;
} }
updating=false; updating=false;
} }

View file

@ -47,7 +47,7 @@ namespace DMX2
private global::Gtk.HBox hbox4; private global::Gtk.HBox hbox4;
private global::Gtk.Toolbar toolbar7; private global::Gtk.Toolbar toolbar7;
private global::Gtk.EventBox evInfo; private global::Gtk.EventBox evInfo;
private global::Gtk.Label label2; private global::Gtk.Label lblInfo;
private global::Gtk.Toolbar toolbar8; private global::Gtk.Toolbar toolbar8;
protected virtual void Build () protected virtual void Build ()
@ -405,10 +405,10 @@ namespace DMX2
this.evInfo = new global::Gtk.EventBox (); this.evInfo = new global::Gtk.EventBox ();
this.evInfo.Name = "evInfo"; this.evInfo.Name = "evInfo";
// Container child evInfo.Gtk.Container+ContainerChild // Container child evInfo.Gtk.Container+ContainerChild
this.label2 = new global::Gtk.Label (); this.lblInfo = new global::Gtk.Label ();
this.label2.Name = "label2"; this.lblInfo.Name = "lblInfo";
this.label2.LabelProp = global::Mono.Unix.Catalog.GetString ("info"); this.lblInfo.LabelProp = global::Mono.Unix.Catalog.GetString ("info");
this.evInfo.Add (this.label2); this.evInfo.Add (this.lblInfo);
this.hbox4.Add (this.evInfo); this.hbox4.Add (this.evInfo);
global::Gtk.Box.BoxChild w74 = ((global::Gtk.Box.BoxChild)(this.hbox4 [this.evInfo])); global::Gtk.Box.BoxChild w74 = ((global::Gtk.Box.BoxChild)(this.hbox4 [this.evInfo]));
w74.Position = 1; w74.Position = 1;

View file

@ -510,7 +510,7 @@ celle selectionnée</property>
<widget class="Gtk.EventBox" id="evInfo"> <widget class="Gtk.EventBox" id="evInfo">
<property name="MemberName" /> <property name="MemberName" />
<child> <child>
<widget class="Gtk.Label" id="label2"> <widget class="Gtk.Label" id="lblInfo">
<property name="MemberName" /> <property name="MemberName" />
<property name="LabelProp" translatable="yes">info</property> <property name="LabelProp" translatable="yes">info</property>
</widget> </widget>