This commit is contained in:
parent
c2f6e0c1fe
commit
69e6d86e59
3 changed files with 26 additions and 7 deletions
|
|
@ -249,7 +249,7 @@ namespace DMX2
|
||||||
{
|
{
|
||||||
VScale tirette = new VScale (null);
|
VScale tirette = new VScale (null);
|
||||||
tirette.WidthRequest = 25;
|
tirette.WidthRequest = 25;
|
||||||
tirette.HeightRequest = 150;
|
tirette.HeightRequest = 125;
|
||||||
tirette.CanFocus = true;
|
tirette.CanFocus = true;
|
||||||
tirette.Inverted = true;
|
tirette.Inverted = true;
|
||||||
tirette.Adjustment.Upper = 255;
|
tirette.Adjustment.Upper = 255;
|
||||||
|
|
@ -329,6 +329,7 @@ namespace DMX2
|
||||||
|
|
||||||
int lastKnownWidth =0;
|
int lastKnownWidth =0;
|
||||||
object circuitKey = new object();
|
object circuitKey = new object();
|
||||||
|
object labKey = new object();
|
||||||
|
|
||||||
ContextMenuHelper tirettesContextHelper = new ContextMenuHelper();
|
ContextMenuHelper tirettesContextHelper = new ContextMenuHelper();
|
||||||
|
|
||||||
|
|
@ -353,17 +354,33 @@ namespace DMX2
|
||||||
Label label;
|
Label label;
|
||||||
|
|
||||||
foreach (Circuit c in sequenceur.Circuits) {
|
foreach (Circuit c in sequenceur.Circuits) {
|
||||||
|
label = new Label();
|
||||||
|
|
||||||
|
label.LabelProp = "00.0";
|
||||||
|
label.WidthRequest = 25;
|
||||||
|
label.HeightRequest = 25;
|
||||||
|
zoneWid.Add(label);
|
||||||
|
fx = ( zoneWid[label] as Fixed.FixedChild);
|
||||||
|
fx.X = xpos;
|
||||||
|
fx.Y = ypos;
|
||||||
|
label.Show();
|
||||||
|
label.Justify = Justification.Left;
|
||||||
|
|
||||||
tirettes[c] = tirette = NouvelleTirette();
|
tirettes[c] = tirette = NouvelleTirette();
|
||||||
tirettesNames[c] = "sclTirette";
|
tirettesNames[c] = "sclTirette";
|
||||||
zoneWid.Add(tirette);
|
zoneWid.Add(tirette);
|
||||||
fx = ( zoneWid[tirette] as Fixed.FixedChild);
|
fx = ( zoneWid[tirette] as Fixed.FixedChild);
|
||||||
fx.X = xpos; fx.Y = ypos;
|
fx.X = xpos;
|
||||||
|
fx.Y = ypos + 25;
|
||||||
tirette.Show();
|
tirette.Show();
|
||||||
tirette.ValueChanged += TiretteActionee;
|
tirette.ValueChanged += TiretteActionee;
|
||||||
tirette.Data.Add(circuitKey,c);
|
tirette.Data.Add(circuitKey,c);
|
||||||
|
tirette.Data.Add(labKey,label);
|
||||||
tirettesContextHelper.AttachToWidget(tirette);
|
tirettesContextHelper.AttachToWidget(tirette);
|
||||||
tirette.TooltipText = c.Name;
|
tirette.TooltipText = c.Name;
|
||||||
|
|
||||||
|
tirette.DrawValue = false;
|
||||||
|
|
||||||
|
|
||||||
label = NouveauLabel();
|
label = NouveauLabel();
|
||||||
zoneWid.Add(label);
|
zoneWid.Add(label);
|
||||||
|
|
@ -389,8 +406,10 @@ namespace DMX2
|
||||||
bool updating=false;
|
bool updating=false;
|
||||||
void TiretteActionee (object sender, EventArgs e)
|
void TiretteActionee (object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
if (updating)return;
|
|
||||||
VScale t = sender as VScale;
|
VScale t = sender as VScale;
|
||||||
|
Label lab = t.Data[labKey] as Label;
|
||||||
|
lab.LabelProp = string.Format(@"{0:00.0}",100 * t.Value / 255 );
|
||||||
|
if (updating) return;
|
||||||
Circuit c = t.Data[circuitKey] as Circuit;
|
Circuit c = t.Data[circuitKey] as Circuit;
|
||||||
sequenceur.ChangeValeur(c,(int)(t.Value));
|
sequenceur.ChangeValeur(c,(int)(t.Value));
|
||||||
}
|
}
|
||||||
|
|
@ -411,7 +430,7 @@ namespace DMX2
|
||||||
tname="sclTiretteT";
|
tname="sclTiretteT";
|
||||||
else
|
else
|
||||||
tname="sclTirette";
|
tname="sclTirette";
|
||||||
if (tirettesNames[c] != tname) tirettesNames[c] = tirettes[c].Name = tname;
|
if (tirettesNames[c] != tname) tirettesNames[c] = (tirettes[c].Data[labKey] as Label).Name = tirettes[c].Name = tname;
|
||||||
}
|
}
|
||||||
seqMasterScale.Value = sequenceur.Master;
|
seqMasterScale.Value = sequenceur.Master;
|
||||||
updating=false;
|
updating=false;
|
||||||
|
|
|
||||||
|
|
@ -49,7 +49,7 @@ namespace DMX2
|
||||||
this.Child.ShowAll ();
|
this.Child.ShowAll ();
|
||||||
}
|
}
|
||||||
this.DefaultWidth = 400;
|
this.DefaultWidth = 400;
|
||||||
this.DefaultHeight = 300;
|
this.DefaultHeight = 194;
|
||||||
this.Show ();
|
this.Show ();
|
||||||
this.buttonOk.Clicked += new global::System.EventHandler (this.OnButtonOkClicked);
|
this.buttonOk.Clicked += new global::System.EventHandler (this.OnButtonOkClicked);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -5,7 +5,7 @@
|
||||||
<target-gtk-version>2.12</target-gtk-version>
|
<target-gtk-version>2.12</target-gtk-version>
|
||||||
</configuration>
|
</configuration>
|
||||||
<import>
|
<import>
|
||||||
<widget-library name="../bin/Release/DMX-2.0.exe" internal="true" />
|
<widget-library name="../bin/Debug/DMX-2.0.exe" internal="true" />
|
||||||
</import>
|
</import>
|
||||||
<icon-factory>
|
<icon-factory>
|
||||||
<icon-set id="tirettes">
|
<icon-set id="tirettes">
|
||||||
|
|
@ -2565,7 +2565,7 @@ au sequenceur</property>
|
||||||
</widget>
|
</widget>
|
||||||
</child>
|
</child>
|
||||||
</widget>
|
</widget>
|
||||||
<widget class="Gtk.Dialog" id="DMX2.About" design-size="400 300">
|
<widget class="Gtk.Dialog" id="DMX2.About" design-size="400 194">
|
||||||
<property name="MemberName" />
|
<property name="MemberName" />
|
||||||
<property name="WindowPosition">CenterOnParent</property>
|
<property name="WindowPosition">CenterOnParent</property>
|
||||||
<property name="Modal">True</property>
|
<property name="Modal">True</property>
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue