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);
|
||||
tirette.WidthRequest = 25;
|
||||
tirette.HeightRequest = 150;
|
||||
tirette.HeightRequest = 125;
|
||||
tirette.CanFocus = true;
|
||||
tirette.Inverted = true;
|
||||
tirette.Adjustment.Upper = 255;
|
||||
|
|
@ -329,6 +329,7 @@ namespace DMX2
|
|||
|
||||
int lastKnownWidth =0;
|
||||
object circuitKey = new object();
|
||||
object labKey = new object();
|
||||
|
||||
ContextMenuHelper tirettesContextHelper = new ContextMenuHelper();
|
||||
|
||||
|
|
@ -353,17 +354,33 @@ namespace DMX2
|
|||
Label label;
|
||||
|
||||
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();
|
||||
tirettesNames[c] = "sclTirette";
|
||||
zoneWid.Add(tirette);
|
||||
fx = ( zoneWid[tirette] as Fixed.FixedChild);
|
||||
fx.X = xpos; fx.Y = ypos;
|
||||
fx.X = xpos;
|
||||
fx.Y = ypos + 25;
|
||||
tirette.Show();
|
||||
tirette.ValueChanged += TiretteActionee;
|
||||
tirette.Data.Add(circuitKey,c);
|
||||
tirette.Data.Add(labKey,label);
|
||||
tirettesContextHelper.AttachToWidget(tirette);
|
||||
tirette.TooltipText = c.Name;
|
||||
|
||||
tirette.DrawValue = false;
|
||||
|
||||
|
||||
label = NouveauLabel();
|
||||
zoneWid.Add(label);
|
||||
|
|
@ -389,8 +406,10 @@ namespace DMX2
|
|||
bool updating=false;
|
||||
void TiretteActionee (object sender, EventArgs e)
|
||||
{
|
||||
if (updating)return;
|
||||
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;
|
||||
sequenceur.ChangeValeur(c,(int)(t.Value));
|
||||
}
|
||||
|
|
@ -411,7 +430,7 @@ namespace DMX2
|
|||
tname="sclTiretteT";
|
||||
else
|
||||
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;
|
||||
updating=false;
|
||||
|
|
|
|||
|
|
@ -49,7 +49,7 @@ namespace DMX2
|
|||
this.Child.ShowAll ();
|
||||
}
|
||||
this.DefaultWidth = 400;
|
||||
this.DefaultHeight = 300;
|
||||
this.DefaultHeight = 194;
|
||||
this.Show ();
|
||||
this.buttonOk.Clicked += new global::System.EventHandler (this.OnButtonOkClicked);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@
|
|||
<target-gtk-version>2.12</target-gtk-version>
|
||||
</configuration>
|
||||
<import>
|
||||
<widget-library name="../bin/Release/DMX-2.0.exe" internal="true" />
|
||||
<widget-library name="../bin/Debug/DMX-2.0.exe" internal="true" />
|
||||
</import>
|
||||
<icon-factory>
|
||||
<icon-set id="tirettes">
|
||||
|
|
@ -2565,7 +2565,7 @@ au sequenceur</property>
|
|||
</widget>
|
||||
</child>
|
||||
</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="WindowPosition">CenterOnParent</property>
|
||||
<property name="Modal">True</property>
|
||||
|
|
|
|||
Loading…
Reference in a new issue