Fin interface Midi
Reste a gérer la sauvegarde de tout ca ...
This commit is contained in:
parent
b893ec5e6f
commit
b8deef5611
9 changed files with 364 additions and 121 deletions
|
|
@ -40,16 +40,19 @@ namespace DMX2
|
||||||
string _name; // Nom de la conduite
|
string _name; // Nom de la conduite
|
||||||
int master=100;
|
int master=100;
|
||||||
|
|
||||||
List<Circuit> circuits = new List<Circuit>();
|
readonly List<Circuit> circuits = new List<Circuit>();
|
||||||
List<UniversDMX> univers = new List<UniversDMX>();
|
readonly List<UniversDMX> univers = new List<UniversDMX>();
|
||||||
List<DriverDMX> drivers = new List<DriverDMX>();
|
readonly List<DriverDMX> drivers = new List<DriverDMX>();
|
||||||
List<Sequenceur> sequenceurs= new List<Sequenceur>();
|
readonly List<Sequenceur> sequenceurs= new List<Sequenceur>();
|
||||||
|
|
||||||
SequenceurMaitre seqmaitre = new SequenceurMaitre();
|
readonly SequenceurMaitre seqmaitre = new SequenceurMaitre();
|
||||||
|
|
||||||
EventManager eventManager = new EventManager(); // Gestion des fournisseurs d'evenements
|
readonly EventManager eventManager = new EventManager(); // Gestion des fournisseurs d'evenements
|
||||||
actionEventTarget masterEventTarget; // Recepteur d'evenements pour le master
|
actionEventTarget masterEventTarget; // Recepteur d'evenements pour le master
|
||||||
|
|
||||||
|
readonly MidiEventProvider midip=null;
|
||||||
|
|
||||||
|
|
||||||
bool running=true;
|
bool running=true;
|
||||||
|
|
||||||
public Conduite (): this(true)
|
public Conduite (): this(true)
|
||||||
|
|
@ -74,7 +77,7 @@ namespace DMX2
|
||||||
u.Nom = "Univers par Défaut";
|
u.Nom = "Univers par Défaut";
|
||||||
|
|
||||||
// La conduite peux recevoir des evenements midi
|
// La conduite peux recevoir des evenements midi
|
||||||
/*MidiEventProvider midip = */new MidiEventProvider (eventManager);
|
midip = new MidiEventProvider (eventManager);
|
||||||
|
|
||||||
masterEventTarget = new actionEventTarget (
|
masterEventTarget = new actionEventTarget (
|
||||||
delegate(EventData data) {
|
delegate(EventData data) {
|
||||||
|
|
@ -95,13 +98,19 @@ namespace DMX2
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public MidiEventProvider Midi {
|
||||||
|
get {
|
||||||
|
return midip;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public EventManager EventManager {
|
public EventManager EventManager {
|
||||||
get {
|
get {
|
||||||
return eventManager;
|
return eventManager;
|
||||||
}
|
}
|
||||||
set {
|
/* set {
|
||||||
eventManager = value;
|
eventManager = value;
|
||||||
}
|
}*/
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -45,6 +45,10 @@ namespace DMX2
|
||||||
|
|
||||||
Destroyed+= HandleDestroyed;
|
Destroyed+= HandleDestroyed;
|
||||||
|
|
||||||
|
|
||||||
|
spinNbPage.Value = MidiEventProvider.Maxpage;
|
||||||
|
chkNoChanZero.Active = MidiEventProvider.UnpaginatedChannels.Contains(0);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void HandleDestroyed (object sender, EventArgs e)
|
void HandleDestroyed (object sender, EventArgs e)
|
||||||
|
|
@ -104,7 +108,12 @@ namespace DMX2
|
||||||
|
|
||||||
protected void OnListKnownCursorChanged (object sender, EventArgs e)
|
protected void OnListKnownCursorChanged (object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
btnDesactiv.Sensitive = (listKnown.Selection.CountSelectedRows() >0);
|
chkFB.Sensitive = btnDesactiv.Sensitive = (listKnown.Selection.CountSelectedRows() >0);
|
||||||
|
TreeIter iter;
|
||||||
|
if(!listKnown.Selection.GetSelected(out iter)) return;
|
||||||
|
MidiEventProvider.MidiDev dev = lsKnown.GetValue(iter,0) as MidiEventProvider.MidiDev ;
|
||||||
|
chkFB.Active = dev.HasFeedback;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
protected void OnBtnActivClicked (object sender, EventArgs e)
|
protected void OnBtnActivClicked (object sender, EventArgs e)
|
||||||
|
|
@ -128,6 +137,31 @@ namespace DMX2
|
||||||
FillLsKnown();
|
FillLsKnown();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
protected void OnChkFBToggled (object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
TreeIter iter;
|
||||||
|
if(!listKnown.Selection.GetSelected(out iter)) return;
|
||||||
|
MidiEventProvider.MidiDev dev = lsKnown.GetValue(iter,0) as MidiEventProvider.MidiDev ;
|
||||||
|
dev.HasFeedback = chkFB.Active;
|
||||||
|
|
||||||
|
MidiEventProvider.RefreshFeedback(dev.Name);
|
||||||
|
|
||||||
|
}
|
||||||
|
protected void OnChkNoChanZeroToggled (object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
MidiEventProvider.UnpaginatedChannels.Clear();
|
||||||
|
if(chkNoChanZero.Active)
|
||||||
|
MidiEventProvider.UnpaginatedChannels.Add(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
protected void OnSpinNbPageValueChanged (object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
MidiEventProvider.Maxpage = (uint) spinNbPage.ValueAsInt;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -553,6 +553,9 @@ namespace DMX2
|
||||||
}
|
}
|
||||||
MajCircuits(fullUpdateFlag);
|
MajCircuits(fullUpdateFlag);
|
||||||
timeLabel.LabelProp = string.Format (@"{0:0\.0}", Conduite.Courante.SequenceurMaitre.TimeStamp.TotalMilliseconds / 100);
|
timeLabel.LabelProp = string.Format (@"{0:0\.0}", Conduite.Courante.SequenceurMaitre.TimeStamp.TotalMilliseconds / 100);
|
||||||
|
|
||||||
|
lblPage.LabelProp = Conduite.Courante.Midi.CurrentPage.ToString();
|
||||||
|
|
||||||
if(fullUpdateFlag) ConstruitMatriceSeqColumns();
|
if(fullUpdateFlag) ConstruitMatriceSeqColumns();
|
||||||
if( Conduite.Courante.SequenceurMaitre.EffetChange() )MatriceUI.QueueDraw();
|
if( Conduite.Courante.SequenceurMaitre.EffetChange() )MatriceUI.QueueDraw();
|
||||||
fullUpdateFlag=false;
|
fullUpdateFlag=false;
|
||||||
|
|
@ -780,5 +783,6 @@ namespace DMX2
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -30,7 +30,7 @@ namespace DMX2
|
||||||
|
|
||||||
readonly string internalName;
|
readonly string internalName;
|
||||||
bool bound=false;
|
bool bound=false;
|
||||||
readonly int page;
|
readonly uint page;
|
||||||
readonly int midiEvCode;
|
readonly int midiEvCode;
|
||||||
|
|
||||||
public bool Bound {
|
public bool Bound {
|
||||||
|
|
@ -48,7 +48,7 @@ namespace DMX2
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public int Page {
|
public uint Page {
|
||||||
get {
|
get {
|
||||||
return page;
|
return page;
|
||||||
}
|
}
|
||||||
|
|
@ -61,16 +61,16 @@ namespace DMX2
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public internalEvent(string _id, int _page, int _evHCode)
|
public internalEvent(string _id, uint _page, int _evHCode)
|
||||||
{
|
{
|
||||||
internalName=_id;
|
internalName=_id;
|
||||||
page=_page;
|
page=_page;
|
||||||
midiEvCode = _evHCode;
|
midiEvCode = _evHCode;
|
||||||
}
|
}
|
||||||
|
|
||||||
byte lastknownvalue;
|
int lastknownvalue=-1;
|
||||||
|
|
||||||
public byte LastKnownValue {
|
public int LastKnownValue {
|
||||||
get {
|
get {
|
||||||
return lastknownvalue;
|
return lastknownvalue;
|
||||||
}
|
}
|
||||||
|
|
@ -89,7 +89,6 @@ namespace DMX2
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
abstract class feedbackinfo : IFeedbackInfo {
|
abstract class feedbackinfo : IFeedbackInfo {
|
||||||
MidiEventProvider prov;
|
MidiEventProvider prov;
|
||||||
readonly internalEvent iev;
|
readonly internalEvent iev;
|
||||||
|
|
@ -116,8 +115,7 @@ namespace DMX2
|
||||||
if (prov.CurrentPage == iev.Page || iev.Page == 0) {
|
if (prov.CurrentPage == iev.Page || iev.Page == 0) {
|
||||||
prov.SendEvent (ev);
|
prov.SendEvent (ev);
|
||||||
foreach (int srcid in MidiEventProvider.feedbacksources) {
|
foreach (int srcid in MidiEventProvider.feedbacksources) {
|
||||||
int lnvk = srcid ^ iev.MidiEvCode;
|
prov.lastValueOfSrc[CombineHash( srcid , iev.MidiEvCode)] = data;
|
||||||
prov.lastKnownValues[lnvk] = data;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -125,7 +123,6 @@ namespace DMX2
|
||||||
}
|
}
|
||||||
#endregion
|
#endregion
|
||||||
}
|
}
|
||||||
|
|
||||||
class ctrlfeedbackinfo : feedbackinfo {
|
class ctrlfeedbackinfo : feedbackinfo {
|
||||||
public ctrlfeedbackinfo(MidiEventProvider _prov, internalEvent _iev, byte channel,uint param)
|
public ctrlfeedbackinfo(MidiEventProvider _prov, internalEvent _iev, byte channel,uint param)
|
||||||
:base(_prov,_iev)
|
:base(_prov,_iev)
|
||||||
|
|
@ -144,7 +141,6 @@ namespace DMX2
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
class pitchbendfeedbackinfo : feedbackinfo {
|
class pitchbendfeedbackinfo : feedbackinfo {
|
||||||
public pitchbendfeedbackinfo(MidiEventProvider _prov, internalEvent _iev, byte channel)
|
public pitchbendfeedbackinfo(MidiEventProvider _prov, internalEvent _iev, byte channel)
|
||||||
:base(_prov,_iev)
|
:base(_prov,_iev)
|
||||||
|
|
@ -180,11 +176,29 @@ namespace DMX2
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Etat interne des evenements midi paginés.
|
||||||
|
/// </summary>
|
||||||
readonly Dictionary<string,internalEvent> eventlist = new Dictionary<string, internalEvent>();
|
readonly Dictionary<string,internalEvent> eventlist = new Dictionary<string, internalEvent>();
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Liste des peripheriques connus (presents ou non)
|
||||||
|
/// </summary>
|
||||||
static readonly Dictionary<string,MidiDev> knowndevices = new Dictionary<string,MidiDev>();
|
static readonly Dictionary<string,MidiDev> knowndevices = new Dictionary<string,MidiDev>();
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Liste des ports connectés avec feedback
|
||||||
|
/// </summary>
|
||||||
static readonly List<int> feedbacksources = new List<int>();
|
static readonly List<int> feedbacksources = new List<int>();
|
||||||
readonly List<byte> unpaginatedchannels = new List<byte>();
|
|
||||||
readonly Dictionary<int,byte> lastKnownValues = new Dictionary<int, byte>();
|
//static readonly Dictionary<int,MidiDev> srcidToDev = new Dictionary<int, MidiDev>();
|
||||||
|
static readonly List<byte> unpaginatedchannels = new List<byte>();
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Derniere valeur connue pour une evenement sur source donnée :
|
||||||
|
/// Soit recue, soit envoyée (feedback / changement de page)
|
||||||
|
/// </summary>
|
||||||
|
readonly Dictionary<int,byte> lastValueOfSrc = new Dictionary<int, byte>();
|
||||||
|
|
||||||
|
|
||||||
EventData last;
|
EventData last;
|
||||||
|
|
@ -193,21 +207,29 @@ namespace DMX2
|
||||||
|
|
||||||
static bool guirefreshflag=false;
|
static bool guirefreshflag=false;
|
||||||
|
|
||||||
int page=1;
|
uint page=1;
|
||||||
|
static uint maxpage=8;
|
||||||
|
|
||||||
public int CurrentPage {
|
public uint CurrentPage {
|
||||||
get {
|
get {
|
||||||
return page;
|
return page;
|
||||||
}
|
}
|
||||||
set {
|
set {
|
||||||
if(value<1 || value > 255) return;
|
if(value<1 || value > maxpage) return;
|
||||||
page = value;
|
page = value;
|
||||||
Refresh();
|
Refresh();
|
||||||
Console.WriteLine(page);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public List<byte> UnpaginatedChannels {
|
public static uint Maxpage {
|
||||||
|
get {
|
||||||
|
return maxpage;
|
||||||
|
}
|
||||||
|
set {
|
||||||
|
maxpage = value;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
public static List<byte> UnpaginatedChannels {
|
||||||
get {
|
get {
|
||||||
return unpaginatedchannels;
|
return unpaginatedchannels;
|
||||||
}
|
}
|
||||||
|
|
@ -222,12 +244,27 @@ namespace DMX2
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
static public void ConnectDevice (string name)
|
static public void ConnectDevice (string name)
|
||||||
{
|
{
|
||||||
knowndevices.Add(name,new MidiDev(name));
|
knowndevices.Add(name,new MidiDev(name));
|
||||||
AutoConnect();
|
AutoConnect();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static public void RefreshFeedback (string name)
|
||||||
|
{
|
||||||
|
foreach (int port in knowndevices[name].ConnectedPorts) {
|
||||||
|
if(knowndevices[name].HasFeedback){
|
||||||
|
if(!feedbacksources.Contains(port))
|
||||||
|
feedbacksources.Add(port);
|
||||||
|
}else{
|
||||||
|
if(feedbacksources.Contains(port))
|
||||||
|
feedbacksources.Remove(port);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public static void DisconnectDevice (MidiEventProvider.MidiDev dev)
|
public static void DisconnectDevice (MidiEventProvider.MidiDev dev)
|
||||||
{
|
{
|
||||||
if (!knowndevices.ContainsKey (dev.Name))
|
if (!knowndevices.ContainsKey (dev.Name))
|
||||||
|
|
@ -296,7 +333,6 @@ namespace DMX2
|
||||||
guirefreshflag=true;
|
guirefreshflag=true;
|
||||||
|
|
||||||
string fullportname = cli.Name + ':' + p.Name;
|
string fullportname = cli.Name + ':' + p.Name;
|
||||||
Console.WriteLine(fullportname);
|
|
||||||
if(knowndevices.ContainsKey(fullportname)){
|
if(knowndevices.ContainsKey(fullportname)){
|
||||||
int srcid = p.ClientId <<8 + p.PortId;
|
int srcid = p.ClientId <<8 + p.PortId;
|
||||||
if(knowndevices[fullportname].ConnectedPorts.Contains(srcid))
|
if(knowndevices[fullportname].ConnectedPorts.Contains(srcid))
|
||||||
|
|
@ -320,7 +356,6 @@ namespace DMX2
|
||||||
int srcid = clientId << 8 + portId;
|
int srcid = clientId << 8 + portId;
|
||||||
if (connect) {
|
if (connect) {
|
||||||
string fpname= AlsaSeqLib.GetClientByID(clientId).Name + ":"+ AlsaSeqLib.GetPortByIDs (clientId, portId).Name;
|
string fpname= AlsaSeqLib.GetClientByID(clientId).Name + ":"+ AlsaSeqLib.GetPortByIDs (clientId, portId).Name;
|
||||||
Console.WriteLine("PortConnect {0}",fpname);
|
|
||||||
if (!knowndevices.ContainsKey(fpname)) return;
|
if (!knowndevices.ContainsKey(fpname)) return;
|
||||||
if (knowndevices [fpname].ConnectedPorts.Contains (srcid))
|
if (knowndevices [fpname].ConnectedPorts.Contains (srcid))
|
||||||
return;
|
return;
|
||||||
|
|
@ -328,12 +363,17 @@ namespace DMX2
|
||||||
if(knowndevices [fpname].HasFeedback)
|
if(knowndevices [fpname].HasFeedback)
|
||||||
feedbacksources.Add (srcid);
|
feedbacksources.Add (srcid);
|
||||||
guirefreshflag=true;
|
guirefreshflag=true;
|
||||||
|
|
||||||
|
//srcidToDev[srcid] = knowndevices [fpname];
|
||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
foreach (var dev in knowndevices.Values) {
|
foreach (var dev in knowndevices.Values) {
|
||||||
if(dev.ConnectedPorts.Contains (srcid))
|
if(dev.ConnectedPorts.Contains (srcid))
|
||||||
{
|
{
|
||||||
|
/*if(srcidToDev.ContainsKey(srcid))
|
||||||
|
srcidToDev.Remove(srcid);*/
|
||||||
dev.ConnectedPorts.Remove(srcid);
|
dev.ConnectedPorts.Remove(srcid);
|
||||||
guirefreshflag=true;
|
guirefreshflag=true;
|
||||||
return;
|
return;
|
||||||
|
|
@ -342,6 +382,13 @@ namespace DMX2
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static int CombineHash (int hash1, int hash2)
|
||||||
|
{
|
||||||
|
unchecked {
|
||||||
|
return hash1 * 33 + hash2;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
protected bool HasFeedback (int source)
|
protected bool HasFeedback (int source)
|
||||||
{
|
{
|
||||||
return feedbacksources.Contains(source);
|
return feedbacksources.Contains(source);
|
||||||
|
|
@ -358,8 +405,9 @@ namespace DMX2
|
||||||
if (ievent.Page == page){
|
if (ievent.Page == page){
|
||||||
SendEvent(ievent.StoredEvent);
|
SendEvent(ievent.StoredEvent);
|
||||||
foreach(int src in feedbacksources){
|
foreach(int src in feedbacksources){
|
||||||
int lnvk = src ^ ievent.MidiEvCode;
|
int lnvk = CombineHash(src, ievent.MidiEvCode);
|
||||||
lastKnownValues[lnvk] = ievent.LastKnownValue;
|
if(ievent.LastKnownValue!=-1)
|
||||||
|
lastValueOfSrc[lnvk] = (byte)ievent.LastKnownValue;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -381,7 +429,7 @@ namespace DMX2
|
||||||
if (! eventlist.ContainsKey (eventId)) {
|
if (! eventlist.ContainsKey (eventId)) {
|
||||||
var res = regexEventID.Match (eventId);
|
var res = regexEventID.Match (eventId);
|
||||||
if (!res.Success) return false;
|
if (!res.Success) return false;
|
||||||
int _page = byte.Parse (res.Groups ["page"].Value);
|
uint _page = uint.Parse (res.Groups ["page"].Value);
|
||||||
int _evHC = res.Groups["id"].Value.GetHashCode();
|
int _evHC = res.Groups["id"].Value.GetHashCode();
|
||||||
eventlist.Add (eventId, new internalEvent (eventId,_page,_evHC ));
|
eventlist.Add (eventId, new internalEvent (eventId,_page,_evHC ));
|
||||||
}
|
}
|
||||||
|
|
@ -403,15 +451,15 @@ namespace DMX2
|
||||||
Gtk.Menu retmenu = new Gtk.Menu ();
|
Gtk.Menu retmenu = new Gtk.Menu ();
|
||||||
|
|
||||||
if (levent != null) { // Creation du sous menu "Dernier"
|
if (levent != null) { // Creation du sous menu "Dernier"
|
||||||
Gtk.MenuItem lmenuitem = new Gtk.MenuItem ("Dernier");
|
/*Gtk.MenuItem lmenuitem = new Gtk.MenuItem ("Dernier");
|
||||||
retmenu.Add (lmenuitem);
|
retmenu.Add (lmenuitem);
|
||||||
Gtk.Menu lmenu = new Gtk.Menu ();
|
Gtk.Menu lmenu = new Gtk.Menu ();
|
||||||
lmenuitem.Submenu = lmenu;
|
lmenuitem.Submenu = lmenu;*/
|
||||||
Gtk.MenuItem item = new Gtk.MenuItem(GetDescription(levent.InternalName));
|
Gtk.MenuItem item = new Gtk.MenuItem(GetDescription(levent.InternalName));
|
||||||
item.Data[EventManager.EventIdKey] = levent.InternalName;
|
item.Data[EventManager.EventIdKey] = levent.InternalName;
|
||||||
item.Data[EventManager.StateKey] = state;
|
item.Data[EventManager.StateKey] = state;
|
||||||
item.ButtonPressEvent += handler;
|
item.ButtonPressEvent += handler;
|
||||||
lmenu.Add (item);
|
retmenu.Add (item);
|
||||||
}
|
}
|
||||||
|
|
||||||
Gtk.MenuItem evmenuitem = new Gtk.MenuItem ("Events"); // Creation du sous menu "Events"
|
Gtk.MenuItem evmenuitem = new Gtk.MenuItem ("Events"); // Creation du sous menu "Events"
|
||||||
|
|
@ -438,7 +486,7 @@ namespace DMX2
|
||||||
void IEventProvider.ProcessEvents (EventManagerCallback callback)
|
void IEventProvider.ProcessEvents (EventManagerCallback callback)
|
||||||
{
|
{
|
||||||
AlsaSeqLib.snd_seq_event_t evS;
|
AlsaSeqLib.snd_seq_event_t evS;
|
||||||
int evpage;
|
uint evpage;
|
||||||
|
|
||||||
// Tant qu'il y des evenements midi en attente
|
// Tant qu'il y des evenements midi en attente
|
||||||
while (AlsaSeqLib.GetEvent(out evS)) {
|
while (AlsaSeqLib.GetEvent(out evS)) {
|
||||||
|
|
@ -511,39 +559,44 @@ namespace DMX2
|
||||||
|
|
||||||
if(id!=null)
|
if(id!=null)
|
||||||
{
|
{
|
||||||
|
// Hashcode de l'ev Midi, non pagine
|
||||||
int evHC = id.GetHashCode();
|
int evHC = id.GetHashCode();
|
||||||
|
int srcid = evS.source.client <<8 + evS.source.port;
|
||||||
|
int lnvk = CombineHash( srcid , evHC);
|
||||||
|
|
||||||
if(channel == 255 || unpaginatedchannels.Contains(channel))
|
if(channel == 255 || unpaginatedchannels.Contains(channel))
|
||||||
evpage= 0;
|
evpage= 0;
|
||||||
else
|
else
|
||||||
evpage= page;
|
evpage= page;
|
||||||
|
|
||||||
|
// Construction de l'ID evenement
|
||||||
id = string.Format("MIDI-PAGE{0}-{1}",evpage,id);
|
id = string.Format("MIDI-PAGE{0}-{1}",evpage,id);
|
||||||
|
|
||||||
|
// Creation de l'objet interne si innexistant
|
||||||
if(!eventlist.ContainsKey(id))
|
if(!eventlist.ContainsKey(id))
|
||||||
eventlist.Add(id,new internalEvent(id,page,evHC));
|
eventlist.Add(id,new internalEvent(id,page,evHC));
|
||||||
levent= eventlist[id]; //Dernier Evenement recu conserve pour menu
|
levent= eventlist[id]; //Dernier Evenement recu conserve pour menu
|
||||||
|
|
||||||
int srcid = evS.source.client <<8 + evS.source.port;
|
if(!lastValueOfSrc.ContainsKey(lnvk))
|
||||||
int lnvk = srcid ^ evHC;
|
lastValueOfSrc[lnvk]= (byte)value;
|
||||||
if(!lastKnownValues.ContainsKey(lnvk))
|
|
||||||
lastKnownValues[lnvk]= (byte)value;
|
|
||||||
|
|
||||||
EventData evData = new EventData();
|
EventData evData = new EventData();
|
||||||
evData.id = id;
|
evData.id = id;
|
||||||
evData.value = (byte)value;
|
evData.value = (byte)value;
|
||||||
evData.prev_value = lastKnownValues[lnvk];
|
evData.prev_value = lastValueOfSrc[lnvk];
|
||||||
|
|
||||||
lastKnownValues[lnvk] = (byte)value;
|
|
||||||
|
|
||||||
if(evData.Equals(last)) continue;
|
if(evData.Equals(last)) continue;
|
||||||
last = evData;
|
last = evData;
|
||||||
|
|
||||||
if(eventlist[id].Bound) {
|
if(eventlist[id].Bound) {
|
||||||
callback(evData);
|
callback(evData);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
lastValueOfSrc[lnvk] = (byte)value;
|
||||||
|
|
||||||
|
eventlist[id].StoredEvent = evS;
|
||||||
|
eventlist[id].LastKnownValue = (byte)value;
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -564,8 +617,34 @@ namespace DMX2
|
||||||
@"MIDI-PAGE(?<page>\d+)-PB-C(?<chan>\d+)",
|
@"MIDI-PAGE(?<page>\d+)-PB-C(?<chan>\d+)",
|
||||||
System.Text.RegularExpressions.RegexOptions.Compiled);
|
System.Text.RegularExpressions.RegexOptions.Compiled);
|
||||||
|
|
||||||
|
static System.Text.RegularExpressions.Regex regexNoteEventID = new System.Text.RegularExpressions.Regex(
|
||||||
|
@"MIDI-PAGE(?<page>\d+)-NOTE-C(?<chan>\d+)N(?<note>\d+)",
|
||||||
|
System.Text.RegularExpressions.RegexOptions.Compiled);
|
||||||
|
|
||||||
string GetDescription (string eventId)
|
string GetDescription (string eventId)
|
||||||
{
|
{
|
||||||
|
if(!eventlist.ContainsKey(eventId)) return null;
|
||||||
|
|
||||||
|
var res = regexCtrlEventID.Match (eventId);
|
||||||
|
if (res.Success) {
|
||||||
|
uint page = uint.Parse(res.Groups ["page"].Value);
|
||||||
|
byte chan = byte.Parse (res.Groups ["chan"].Value);
|
||||||
|
uint param = uint.Parse (res.Groups ["param"].Value);
|
||||||
|
return string.Format("Page {2} => Control-Change C({0}) Param-{1}",chan+1,param,page);
|
||||||
|
}
|
||||||
|
res = regexPbEventID.Match (eventId);
|
||||||
|
if (res.Success) {
|
||||||
|
uint page = uint.Parse(res.Groups ["page"].Value);
|
||||||
|
byte chan = byte.Parse (res.Groups ["chan"].Value);
|
||||||
|
return string.Format("Page {1} => PitchBend C({0})",chan+1,page);
|
||||||
|
}
|
||||||
|
res = regexNoteEventID.Match (eventId);
|
||||||
|
if (res.Success) {
|
||||||
|
uint page = uint.Parse(res.Groups ["page"].Value);
|
||||||
|
byte chan = byte.Parse (res.Groups ["chan"].Value);
|
||||||
|
byte note = byte.Parse (res.Groups ["note"].Value);
|
||||||
|
return string.Format("Page {2} => Note C({0}) Note-{1}",chan+1,note,page);
|
||||||
|
}
|
||||||
return eventId;
|
return eventId;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -575,16 +654,13 @@ namespace DMX2
|
||||||
|
|
||||||
var res = regexCtrlEventID.Match (eventId);
|
var res = regexCtrlEventID.Match (eventId);
|
||||||
if (res.Success) {
|
if (res.Success) {
|
||||||
Console.WriteLine("Succes");
|
|
||||||
byte chan = byte.Parse (res.Groups ["chan"].Value);
|
byte chan = byte.Parse (res.Groups ["chan"].Value);
|
||||||
uint param = uint.Parse (res.Groups ["param"].Value);
|
uint param = uint.Parse (res.Groups ["param"].Value);
|
||||||
return new ctrlfeedbackinfo (this, eventlist[eventId],chan, param);
|
return new ctrlfeedbackinfo (this, eventlist[eventId],chan, param);
|
||||||
}
|
}
|
||||||
res = regexPbEventID.Match (eventId);
|
res = regexPbEventID.Match (eventId);
|
||||||
if (res.Success) {
|
if (res.Success) {
|
||||||
Console.WriteLine("Succes");
|
|
||||||
byte chan = byte.Parse (res.Groups ["chan"].Value);
|
byte chan = byte.Parse (res.Groups ["chan"].Value);
|
||||||
|
|
||||||
return new pitchbendfeedbackinfo (this, eventlist[eventId], chan);
|
return new pitchbendfeedbackinfo (this, eventlist[eventId], chan);
|
||||||
}
|
}
|
||||||
return null;
|
return null;
|
||||||
|
|
|
||||||
|
|
@ -127,6 +127,7 @@ namespace DMX2
|
||||||
Dictionary<string,int> valeursrecues= new Dictionary<string, int>();
|
Dictionary<string,int> valeursrecues= new Dictionary<string, int>();
|
||||||
SequenceurLineaire seq;
|
SequenceurLineaire seq;
|
||||||
int max=0;//, signe=-2;
|
int max=0;//, signe=-2;
|
||||||
|
bool nofeedback = false;
|
||||||
|
|
||||||
bool attache;
|
bool attache;
|
||||||
|
|
||||||
|
|
@ -160,7 +161,9 @@ namespace DMX2
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
nofeedback = true;
|
||||||
seq.ChangeValeur(circuit,max);
|
seq.ChangeValeur(circuit,max);
|
||||||
|
nofeedback = false;
|
||||||
attache = true;
|
attache = true;
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
@ -186,6 +189,7 @@ namespace DMX2
|
||||||
}
|
}
|
||||||
|
|
||||||
public void FeedBack(byte data){
|
public void FeedBack(byte data){
|
||||||
|
if(nofeedback) return;
|
||||||
Attache = false;
|
Attache = false;
|
||||||
foreach (var fb in feedbacks)
|
foreach (var fb in feedbacks)
|
||||||
fb.FeedBack(data);
|
fb.FeedBack(data);
|
||||||
|
|
|
||||||
|
|
@ -9,14 +9,14 @@ namespace DMX2
|
||||||
private global::Gtk.Alignment GtkAlignment3;
|
private global::Gtk.Alignment GtkAlignment3;
|
||||||
private global::Gtk.VBox vbox4;
|
private global::Gtk.VBox vbox4;
|
||||||
private global::Gtk.HBox hbox1;
|
private global::Gtk.HBox hbox1;
|
||||||
private global::Gtk.SpinButton spinbutton1;
|
private global::Gtk.SpinButton spinNbPage;
|
||||||
private global::Gtk.Label label3;
|
private global::Gtk.Label label3;
|
||||||
private global::Gtk.CheckButton checkbutton2;
|
private global::Gtk.CheckButton chkNoChanZero;
|
||||||
private global::Gtk.Label GtkLabel5;
|
private global::Gtk.Label GtkLabel5;
|
||||||
private global::Gtk.Frame frame3;
|
private global::Gtk.Frame frame3;
|
||||||
private global::Gtk.Alignment GtkAlignment2;
|
private global::Gtk.Alignment GtkAlignment2;
|
||||||
private global::Gtk.VBox vbox5;
|
private global::Gtk.VBox vbox5;
|
||||||
private global::Gtk.CheckButton checkbutton1;
|
private global::Gtk.CheckButton chkFB;
|
||||||
private global::Gtk.Label GtkLabel3;
|
private global::Gtk.Label GtkLabel3;
|
||||||
private global::Gtk.HButtonBox hbuttonbox2;
|
private global::Gtk.HButtonBox hbuttonbox2;
|
||||||
private global::Gtk.Button btnActiv;
|
private global::Gtk.Button btnActiv;
|
||||||
|
|
@ -64,15 +64,15 @@ namespace DMX2
|
||||||
this.hbox1.Name = "hbox1";
|
this.hbox1.Name = "hbox1";
|
||||||
this.hbox1.Spacing = 6;
|
this.hbox1.Spacing = 6;
|
||||||
// Container child hbox1.Gtk.Box+BoxChild
|
// Container child hbox1.Gtk.Box+BoxChild
|
||||||
this.spinbutton1 = new global::Gtk.SpinButton (0, 100, 1);
|
this.spinNbPage = new global::Gtk.SpinButton (1, 32, 1);
|
||||||
this.spinbutton1.CanFocus = true;
|
this.spinNbPage.CanFocus = true;
|
||||||
this.spinbutton1.Name = "spinbutton1";
|
this.spinNbPage.Name = "spinNbPage";
|
||||||
this.spinbutton1.Adjustment.PageIncrement = 10;
|
this.spinNbPage.Adjustment.PageIncrement = 10;
|
||||||
this.spinbutton1.ClimbRate = 1;
|
this.spinNbPage.ClimbRate = 1;
|
||||||
this.spinbutton1.Numeric = true;
|
this.spinNbPage.Numeric = true;
|
||||||
this.spinbutton1.Value = 8;
|
this.spinNbPage.Value = 8;
|
||||||
this.hbox1.Add (this.spinbutton1);
|
this.hbox1.Add (this.spinNbPage);
|
||||||
global::Gtk.Box.BoxChild w2 = ((global::Gtk.Box.BoxChild)(this.hbox1 [this.spinbutton1]));
|
global::Gtk.Box.BoxChild w2 = ((global::Gtk.Box.BoxChild)(this.hbox1 [this.spinNbPage]));
|
||||||
w2.PackType = ((global::Gtk.PackType)(1));
|
w2.PackType = ((global::Gtk.PackType)(1));
|
||||||
w2.Position = 0;
|
w2.Position = 0;
|
||||||
w2.Expand = false;
|
w2.Expand = false;
|
||||||
|
|
@ -94,14 +94,14 @@ namespace DMX2
|
||||||
w4.Expand = false;
|
w4.Expand = false;
|
||||||
w4.Fill = false;
|
w4.Fill = false;
|
||||||
// Container child vbox4.Gtk.Box+BoxChild
|
// Container child vbox4.Gtk.Box+BoxChild
|
||||||
this.checkbutton2 = new global::Gtk.CheckButton ();
|
this.chkNoChanZero = new global::Gtk.CheckButton ();
|
||||||
this.checkbutton2.CanFocus = true;
|
this.chkNoChanZero.CanFocus = true;
|
||||||
this.checkbutton2.Name = "checkbutton2";
|
this.chkNoChanZero.Name = "chkNoChanZero";
|
||||||
this.checkbutton2.Label = "Ne pas paginer\nle canal midi 1";
|
this.chkNoChanZero.Label = "Ne pas paginer\nle canal midi 1";
|
||||||
this.checkbutton2.DrawIndicator = true;
|
this.chkNoChanZero.DrawIndicator = true;
|
||||||
this.checkbutton2.UseUnderline = true;
|
this.chkNoChanZero.UseUnderline = true;
|
||||||
this.vbox4.Add (this.checkbutton2);
|
this.vbox4.Add (this.chkNoChanZero);
|
||||||
global::Gtk.Box.BoxChild w5 = ((global::Gtk.Box.BoxChild)(this.vbox4 [this.checkbutton2]));
|
global::Gtk.Box.BoxChild w5 = ((global::Gtk.Box.BoxChild)(this.vbox4 [this.chkNoChanZero]));
|
||||||
w5.Position = 1;
|
w5.Position = 1;
|
||||||
w5.Expand = false;
|
w5.Expand = false;
|
||||||
w5.Fill = false;
|
w5.Fill = false;
|
||||||
|
|
@ -129,14 +129,15 @@ namespace DMX2
|
||||||
this.vbox5.Name = "vbox5";
|
this.vbox5.Name = "vbox5";
|
||||||
this.vbox5.Spacing = 6;
|
this.vbox5.Spacing = 6;
|
||||||
// Container child vbox5.Gtk.Box+BoxChild
|
// Container child vbox5.Gtk.Box+BoxChild
|
||||||
this.checkbutton1 = new global::Gtk.CheckButton ();
|
this.chkFB = new global::Gtk.CheckButton ();
|
||||||
this.checkbutton1.CanFocus = true;
|
this.chkFB.Sensitive = false;
|
||||||
this.checkbutton1.Name = "checkbutton1";
|
this.chkFB.CanFocus = true;
|
||||||
this.checkbutton1.Label = "Feedback\n(interface motorisée)";
|
this.chkFB.Name = "chkFB";
|
||||||
this.checkbutton1.DrawIndicator = true;
|
this.chkFB.Label = "Feedback\n(interface motorisée)";
|
||||||
this.checkbutton1.UseUnderline = true;
|
this.chkFB.DrawIndicator = true;
|
||||||
this.vbox5.Add (this.checkbutton1);
|
this.chkFB.UseUnderline = true;
|
||||||
global::Gtk.Box.BoxChild w9 = ((global::Gtk.Box.BoxChild)(this.vbox5 [this.checkbutton1]));
|
this.vbox5.Add (this.chkFB);
|
||||||
|
global::Gtk.Box.BoxChild w9 = ((global::Gtk.Box.BoxChild)(this.vbox5 [this.chkFB]));
|
||||||
w9.Position = 0;
|
w9.Position = 0;
|
||||||
w9.Expand = false;
|
w9.Expand = false;
|
||||||
w9.Fill = false;
|
w9.Fill = false;
|
||||||
|
|
@ -312,6 +313,9 @@ namespace DMX2
|
||||||
this.listDetect.CursorChanged += new global::System.EventHandler (this.OnListDetectCursorChanged);
|
this.listDetect.CursorChanged += new global::System.EventHandler (this.OnListDetectCursorChanged);
|
||||||
this.btnActiv.Clicked += new global::System.EventHandler (this.OnBtnActivClicked);
|
this.btnActiv.Clicked += new global::System.EventHandler (this.OnBtnActivClicked);
|
||||||
this.btnDesactiv.Clicked += new global::System.EventHandler (this.OnBtnDesactivClicked);
|
this.btnDesactiv.Clicked += new global::System.EventHandler (this.OnBtnDesactivClicked);
|
||||||
|
this.chkFB.Toggled += new global::System.EventHandler (this.OnChkFBToggled);
|
||||||
|
this.spinNbPage.ValueChanged += new global::System.EventHandler (this.OnSpinNbPageValueChanged);
|
||||||
|
this.chkNoChanZero.Toggled += new global::System.EventHandler (this.OnChkNoChanZeroToggled);
|
||||||
this.buttonClose.Clicked += new global::System.EventHandler (this.OnButtonCloseClicked);
|
this.buttonClose.Clicked += new global::System.EventHandler (this.OnButtonCloseClicked);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -27,6 +27,7 @@ namespace DMX2
|
||||||
private global::Gtk.Action aboutAction;
|
private global::Gtk.Action aboutAction;
|
||||||
private global::Gtk.Action midiAction;
|
private global::Gtk.Action midiAction;
|
||||||
private global::Gtk.Action connectAction1;
|
private global::Gtk.Action connectAction1;
|
||||||
|
private global::Gtk.Action selectColorAction1;
|
||||||
private global::Gtk.VBox vbox1;
|
private global::Gtk.VBox vbox1;
|
||||||
private global::Gtk.HBox hbox1;
|
private global::Gtk.HBox hbox1;
|
||||||
private global::Gtk.VBox vbox2;
|
private global::Gtk.VBox vbox2;
|
||||||
|
|
@ -39,6 +40,10 @@ namespace DMX2
|
||||||
private global::Gtk.EventBox evBBox;
|
private global::Gtk.EventBox evBBox;
|
||||||
private global::Gtk.Label timeLabel;
|
private global::Gtk.Label timeLabel;
|
||||||
private global::Gtk.VScale masterScale;
|
private global::Gtk.VScale masterScale;
|
||||||
|
private global::Gtk.EventBox evBBox1;
|
||||||
|
private global::Gtk.VBox vbox3;
|
||||||
|
private global::Gtk.Label lblPage;
|
||||||
|
private global::Gtk.Label lblpagesmall;
|
||||||
private global::Gtk.VSeparator vseparator1;
|
private global::Gtk.VSeparator vseparator1;
|
||||||
private global::Gtk.HPaned hpaned1;
|
private global::Gtk.HPaned hpaned1;
|
||||||
private global::Gtk.HPaned hpaned2;
|
private global::Gtk.HPaned hpaned2;
|
||||||
|
|
@ -127,6 +132,8 @@ namespace DMX2
|
||||||
this.connectAction1 = new global::Gtk.Action ("connectAction1", "Connection Midi", null, "gtk-connect");
|
this.connectAction1 = new global::Gtk.Action ("connectAction1", "Connection Midi", null, "gtk-connect");
|
||||||
this.connectAction1.ShortLabel = "Connection Midi";
|
this.connectAction1.ShortLabel = "Connection Midi";
|
||||||
w1.Add (this.connectAction1, null);
|
w1.Add (this.connectAction1, null);
|
||||||
|
this.selectColorAction1 = new global::Gtk.Action ("selectColorAction1", null, null, "gtk-select-color");
|
||||||
|
w1.Add (this.selectColorAction1, null);
|
||||||
this.UIManager.InsertActionGroup (w1, 0);
|
this.UIManager.InsertActionGroup (w1, 0);
|
||||||
this.AddAccelGroup (this.UIManager.AccelGroup);
|
this.AddAccelGroup (this.UIManager.AccelGroup);
|
||||||
this.Name = "DMX2.MainWindow";
|
this.Name = "DMX2.MainWindow";
|
||||||
|
|
@ -326,19 +333,51 @@ namespace DMX2
|
||||||
this.vbox2.Add (this.masterScale);
|
this.vbox2.Add (this.masterScale);
|
||||||
global::Gtk.Box.BoxChild w58 = ((global::Gtk.Box.BoxChild)(this.vbox2 [this.masterScale]));
|
global::Gtk.Box.BoxChild w58 = ((global::Gtk.Box.BoxChild)(this.vbox2 [this.masterScale]));
|
||||||
w58.Position = 7;
|
w58.Position = 7;
|
||||||
this.hbox1.Add (this.vbox2);
|
// Container child vbox2.Gtk.Box+BoxChild
|
||||||
global::Gtk.Box.BoxChild w59 = ((global::Gtk.Box.BoxChild)(this.hbox1 [this.vbox2]));
|
this.evBBox1 = new global::Gtk.EventBox ();
|
||||||
|
this.evBBox1.Name = "evBBox1";
|
||||||
|
// Container child evBBox1.Gtk.Container+ContainerChild
|
||||||
|
this.vbox3 = new global::Gtk.VBox ();
|
||||||
|
this.vbox3.Name = "vbox3";
|
||||||
|
this.vbox3.Spacing = 6;
|
||||||
|
// Container child vbox3.Gtk.Box+BoxChild
|
||||||
|
this.lblPage = new global::Gtk.Label ();
|
||||||
|
this.lblPage.Name = "lblPage";
|
||||||
|
this.lblPage.LabelProp = "0";
|
||||||
|
this.vbox3.Add (this.lblPage);
|
||||||
|
global::Gtk.Box.BoxChild w59 = ((global::Gtk.Box.BoxChild)(this.vbox3 [this.lblPage]));
|
||||||
w59.Position = 0;
|
w59.Position = 0;
|
||||||
w59.Expand = false;
|
w59.Expand = false;
|
||||||
w59.Fill = false;
|
w59.Fill = false;
|
||||||
|
// Container child vbox3.Gtk.Box+BoxChild
|
||||||
|
this.lblpagesmall = new global::Gtk.Label ();
|
||||||
|
this.lblpagesmall.HeightRequest = 28;
|
||||||
|
this.lblpagesmall.Name = "lblpagesmall";
|
||||||
|
this.lblpagesmall.LabelProp = "midi\npage";
|
||||||
|
this.lblpagesmall.UseMarkup = true;
|
||||||
|
this.vbox3.Add (this.lblpagesmall);
|
||||||
|
global::Gtk.Box.BoxChild w60 = ((global::Gtk.Box.BoxChild)(this.vbox3 [this.lblpagesmall]));
|
||||||
|
w60.Position = 1;
|
||||||
|
w60.Fill = false;
|
||||||
|
this.evBBox1.Add (this.vbox3);
|
||||||
|
this.vbox2.Add (this.evBBox1);
|
||||||
|
global::Gtk.Box.BoxChild w62 = ((global::Gtk.Box.BoxChild)(this.vbox2 [this.evBBox1]));
|
||||||
|
w62.Position = 8;
|
||||||
|
w62.Expand = false;
|
||||||
|
w62.Fill = false;
|
||||||
|
this.hbox1.Add (this.vbox2);
|
||||||
|
global::Gtk.Box.BoxChild w63 = ((global::Gtk.Box.BoxChild)(this.hbox1 [this.vbox2]));
|
||||||
|
w63.Position = 0;
|
||||||
|
w63.Expand = false;
|
||||||
|
w63.Fill = false;
|
||||||
// Container child hbox1.Gtk.Box+BoxChild
|
// Container child hbox1.Gtk.Box+BoxChild
|
||||||
this.vseparator1 = new global::Gtk.VSeparator ();
|
this.vseparator1 = new global::Gtk.VSeparator ();
|
||||||
this.vseparator1.Name = "vseparator1";
|
this.vseparator1.Name = "vseparator1";
|
||||||
this.hbox1.Add (this.vseparator1);
|
this.hbox1.Add (this.vseparator1);
|
||||||
global::Gtk.Box.BoxChild w60 = ((global::Gtk.Box.BoxChild)(this.hbox1 [this.vseparator1]));
|
global::Gtk.Box.BoxChild w64 = ((global::Gtk.Box.BoxChild)(this.hbox1 [this.vseparator1]));
|
||||||
w60.Position = 1;
|
w64.Position = 1;
|
||||||
w60.Expand = false;
|
w64.Expand = false;
|
||||||
w60.Fill = false;
|
w64.Fill = false;
|
||||||
// Container child hbox1.Gtk.Box+BoxChild
|
// Container child hbox1.Gtk.Box+BoxChild
|
||||||
this.hpaned1 = new global::Gtk.HPaned ();
|
this.hpaned1 = new global::Gtk.HPaned ();
|
||||||
this.hpaned1.CanFocus = true;
|
this.hpaned1.CanFocus = true;
|
||||||
|
|
@ -360,8 +399,8 @@ namespace DMX2
|
||||||
this.MatriceUI.RulesHint = true;
|
this.MatriceUI.RulesHint = true;
|
||||||
this.GtkScrolledWindow2.Add (this.MatriceUI);
|
this.GtkScrolledWindow2.Add (this.MatriceUI);
|
||||||
this.hpaned2.Add (this.GtkScrolledWindow2);
|
this.hpaned2.Add (this.GtkScrolledWindow2);
|
||||||
global::Gtk.Paned.PanedChild w62 = ((global::Gtk.Paned.PanedChild)(this.hpaned2 [this.GtkScrolledWindow2]));
|
global::Gtk.Paned.PanedChild w66 = ((global::Gtk.Paned.PanedChild)(this.hpaned2 [this.GtkScrolledWindow2]));
|
||||||
w62.Resize = false;
|
w66.Resize = false;
|
||||||
// Container child hpaned2.Gtk.Paned+PanedChild
|
// Container child hpaned2.Gtk.Paned+PanedChild
|
||||||
this.onglets = new global::Gtk.Notebook ();
|
this.onglets = new global::Gtk.Notebook ();
|
||||||
this.onglets.CanFocus = true;
|
this.onglets.CanFocus = true;
|
||||||
|
|
@ -369,8 +408,8 @@ namespace DMX2
|
||||||
this.onglets.CurrentPage = 0;
|
this.onglets.CurrentPage = 0;
|
||||||
this.hpaned2.Add (this.onglets);
|
this.hpaned2.Add (this.onglets);
|
||||||
this.hpaned1.Add (this.hpaned2);
|
this.hpaned1.Add (this.hpaned2);
|
||||||
global::Gtk.Paned.PanedChild w64 = ((global::Gtk.Paned.PanedChild)(this.hpaned1 [this.hpaned2]));
|
global::Gtk.Paned.PanedChild w68 = ((global::Gtk.Paned.PanedChild)(this.hpaned1 [this.hpaned2]));
|
||||||
w64.Resize = false;
|
w68.Resize = false;
|
||||||
// Container child hpaned1.Gtk.Paned+PanedChild
|
// Container child hpaned1.Gtk.Paned+PanedChild
|
||||||
this.scrolledwindow2 = new global::Gtk.ScrolledWindow ();
|
this.scrolledwindow2 = new global::Gtk.ScrolledWindow ();
|
||||||
this.scrolledwindow2.WidthRequest = 150;
|
this.scrolledwindow2.WidthRequest = 150;
|
||||||
|
|
@ -378,32 +417,32 @@ namespace DMX2
|
||||||
this.scrolledwindow2.Name = "scrolledwindow2";
|
this.scrolledwindow2.Name = "scrolledwindow2";
|
||||||
this.scrolledwindow2.ShadowType = ((global::Gtk.ShadowType)(1));
|
this.scrolledwindow2.ShadowType = ((global::Gtk.ShadowType)(1));
|
||||||
// Container child scrolledwindow2.Gtk.Container+ContainerChild
|
// Container child scrolledwindow2.Gtk.Container+ContainerChild
|
||||||
global::Gtk.Viewport w65 = new global::Gtk.Viewport ();
|
global::Gtk.Viewport w69 = new global::Gtk.Viewport ();
|
||||||
w65.ShadowType = ((global::Gtk.ShadowType)(0));
|
w69.ShadowType = ((global::Gtk.ShadowType)(0));
|
||||||
// Container child GtkViewport1.Gtk.Container+ContainerChild
|
// Container child GtkViewport1.Gtk.Container+ContainerChild
|
||||||
this.vboxCircuits = new global::Gtk.VBox ();
|
this.vboxCircuits = new global::Gtk.VBox ();
|
||||||
this.vboxCircuits.Name = "vboxCircuits";
|
this.vboxCircuits.Name = "vboxCircuits";
|
||||||
this.vboxCircuits.Spacing = 2;
|
this.vboxCircuits.Spacing = 2;
|
||||||
w65.Add (this.vboxCircuits);
|
w69.Add (this.vboxCircuits);
|
||||||
this.scrolledwindow2.Add (w65);
|
this.scrolledwindow2.Add (w69);
|
||||||
this.hpaned1.Add (this.scrolledwindow2);
|
this.hpaned1.Add (this.scrolledwindow2);
|
||||||
global::Gtk.Paned.PanedChild w68 = ((global::Gtk.Paned.PanedChild)(this.hpaned1 [this.scrolledwindow2]));
|
global::Gtk.Paned.PanedChild w72 = ((global::Gtk.Paned.PanedChild)(this.hpaned1 [this.scrolledwindow2]));
|
||||||
w68.Resize = false;
|
w72.Resize = false;
|
||||||
w68.Shrink = false;
|
w72.Shrink = false;
|
||||||
this.hbox1.Add (this.hpaned1);
|
this.hbox1.Add (this.hpaned1);
|
||||||
global::Gtk.Box.BoxChild w69 = ((global::Gtk.Box.BoxChild)(this.hbox1 [this.hpaned1]));
|
global::Gtk.Box.BoxChild w73 = ((global::Gtk.Box.BoxChild)(this.hbox1 [this.hpaned1]));
|
||||||
w69.Position = 2;
|
w73.Position = 2;
|
||||||
this.vbox1.Add (this.hbox1);
|
this.vbox1.Add (this.hbox1);
|
||||||
global::Gtk.Box.BoxChild w70 = ((global::Gtk.Box.BoxChild)(this.vbox1 [this.hbox1]));
|
global::Gtk.Box.BoxChild w74 = ((global::Gtk.Box.BoxChild)(this.vbox1 [this.hbox1]));
|
||||||
w70.Position = 0;
|
w74.Position = 0;
|
||||||
// Container child vbox1.Gtk.Box+BoxChild
|
// Container child vbox1.Gtk.Box+BoxChild
|
||||||
this.hseparator1 = new global::Gtk.HSeparator ();
|
this.hseparator1 = new global::Gtk.HSeparator ();
|
||||||
this.hseparator1.Name = "hseparator1";
|
this.hseparator1.Name = "hseparator1";
|
||||||
this.vbox1.Add (this.hseparator1);
|
this.vbox1.Add (this.hseparator1);
|
||||||
global::Gtk.Box.BoxChild w71 = ((global::Gtk.Box.BoxChild)(this.vbox1 [this.hseparator1]));
|
global::Gtk.Box.BoxChild w75 = ((global::Gtk.Box.BoxChild)(this.vbox1 [this.hseparator1]));
|
||||||
w71.Position = 1;
|
w75.Position = 1;
|
||||||
w71.Expand = false;
|
w75.Expand = false;
|
||||||
w71.Fill = false;
|
w75.Fill = false;
|
||||||
// Container child vbox1.Gtk.Box+BoxChild
|
// Container child vbox1.Gtk.Box+BoxChild
|
||||||
this.hbox4 = new global::Gtk.HBox ();
|
this.hbox4 = new global::Gtk.HBox ();
|
||||||
this.hbox4.Name = "hbox4";
|
this.hbox4.Name = "hbox4";
|
||||||
|
|
@ -414,10 +453,10 @@ namespace DMX2
|
||||||
this.toolbar7.Name = "toolbar7";
|
this.toolbar7.Name = "toolbar7";
|
||||||
this.toolbar7.ShowArrow = false;
|
this.toolbar7.ShowArrow = false;
|
||||||
this.hbox4.Add (this.toolbar7);
|
this.hbox4.Add (this.toolbar7);
|
||||||
global::Gtk.Box.BoxChild w72 = ((global::Gtk.Box.BoxChild)(this.hbox4 [this.toolbar7]));
|
global::Gtk.Box.BoxChild w76 = ((global::Gtk.Box.BoxChild)(this.hbox4 [this.toolbar7]));
|
||||||
w72.Position = 0;
|
w76.Position = 0;
|
||||||
w72.Expand = false;
|
w76.Expand = false;
|
||||||
w72.Fill = false;
|
w76.Fill = false;
|
||||||
// Container child hbox4.Gtk.Box+BoxChild
|
// Container child hbox4.Gtk.Box+BoxChild
|
||||||
this.evInfo = new global::Gtk.EventBox ();
|
this.evInfo = new global::Gtk.EventBox ();
|
||||||
this.evInfo.Name = "evInfo";
|
this.evInfo.Name = "evInfo";
|
||||||
|
|
@ -427,8 +466,8 @@ namespace DMX2
|
||||||
this.lblInfo.LabelProp = "info";
|
this.lblInfo.LabelProp = "info";
|
||||||
this.evInfo.Add (this.lblInfo);
|
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 w78 = ((global::Gtk.Box.BoxChild)(this.hbox4 [this.evInfo]));
|
||||||
w74.Position = 1;
|
w78.Position = 1;
|
||||||
// Container child hbox4.Gtk.Box+BoxChild
|
// Container child hbox4.Gtk.Box+BoxChild
|
||||||
this.UIManager.AddUiFromString ("<ui><toolbar name='toolbar8'><toolitem name='newAction' action='newAction'/><toolitem name='openAction' action='openAction'/><toolitem name='saveAction' action='saveAction'/><toolitem name='saveAsAction' action='saveAsAction'/><toolitem name='closeAction' action='closeAction'/><toolitem name='midiAction' action='midiAction'/><toolitem name='aboutAction' action='aboutAction'/><toolitem name='quitAction' action='quitAction'/></toolbar></ui>");
|
this.UIManager.AddUiFromString ("<ui><toolbar name='toolbar8'><toolitem name='newAction' action='newAction'/><toolitem name='openAction' action='openAction'/><toolitem name='saveAction' action='saveAction'/><toolitem name='saveAsAction' action='saveAsAction'/><toolitem name='closeAction' action='closeAction'/><toolitem name='midiAction' action='midiAction'/><toolitem name='aboutAction' action='aboutAction'/><toolitem name='quitAction' action='quitAction'/></toolbar></ui>");
|
||||||
this.toolbar8 = ((global::Gtk.Toolbar)(this.UIManager.GetWidget ("/toolbar8")));
|
this.toolbar8 = ((global::Gtk.Toolbar)(this.UIManager.GetWidget ("/toolbar8")));
|
||||||
|
|
@ -436,15 +475,15 @@ namespace DMX2
|
||||||
this.toolbar8.ShowArrow = false;
|
this.toolbar8.ShowArrow = false;
|
||||||
this.toolbar8.ToolbarStyle = ((global::Gtk.ToolbarStyle)(0));
|
this.toolbar8.ToolbarStyle = ((global::Gtk.ToolbarStyle)(0));
|
||||||
this.hbox4.Add (this.toolbar8);
|
this.hbox4.Add (this.toolbar8);
|
||||||
global::Gtk.Box.BoxChild w75 = ((global::Gtk.Box.BoxChild)(this.hbox4 [this.toolbar8]));
|
global::Gtk.Box.BoxChild w79 = ((global::Gtk.Box.BoxChild)(this.hbox4 [this.toolbar8]));
|
||||||
w75.Position = 2;
|
w79.Position = 2;
|
||||||
w75.Expand = false;
|
w79.Expand = false;
|
||||||
w75.Fill = false;
|
w79.Fill = false;
|
||||||
this.vbox1.Add (this.hbox4);
|
this.vbox1.Add (this.hbox4);
|
||||||
global::Gtk.Box.BoxChild w76 = ((global::Gtk.Box.BoxChild)(this.vbox1 [this.hbox4]));
|
global::Gtk.Box.BoxChild w80 = ((global::Gtk.Box.BoxChild)(this.vbox1 [this.hbox4]));
|
||||||
w76.Position = 2;
|
w80.Position = 2;
|
||||||
w76.Expand = false;
|
w80.Expand = false;
|
||||||
w76.Fill = false;
|
w80.Fill = false;
|
||||||
this.Add (this.vbox1);
|
this.Add (this.vbox1);
|
||||||
if ((this.Child != null)) {
|
if ((this.Child != null)) {
|
||||||
this.Child.ShowAll ();
|
this.Child.ShowAll ();
|
||||||
|
|
@ -470,6 +509,7 @@ namespace DMX2
|
||||||
this.aguiAction.Activated += new global::System.EventHandler (this.OnInfoActionActivated);
|
this.aguiAction.Activated += new global::System.EventHandler (this.OnInfoActionActivated);
|
||||||
this.aboutAction.Activated += new global::System.EventHandler (this.OnAboutActionActivated);
|
this.aboutAction.Activated += new global::System.EventHandler (this.OnAboutActionActivated);
|
||||||
this.midiAction.Activated += new global::System.EventHandler (this.OnMidiActionActivated);
|
this.midiAction.Activated += new global::System.EventHandler (this.OnMidiActionActivated);
|
||||||
|
this.selectColorAction1.Activated += new global::System.EventHandler (this.OnSelectColorActionActivated);
|
||||||
this.btnGo.Clicked += new global::System.EventHandler (this.OnBtnGoClicked);
|
this.btnGo.Clicked += new global::System.EventHandler (this.OnBtnGoClicked);
|
||||||
this.btnGoBack.Clicked += new global::System.EventHandler (this.OnBtnGoBackClicked);
|
this.btnGoBack.Clicked += new global::System.EventHandler (this.OnBtnGoBackClicked);
|
||||||
this.btnAjoutLigne.Clicked += new global::System.EventHandler (this.OnBtnAjoutLigneClicked);
|
this.btnAjoutLigne.Clicked += new global::System.EventHandler (this.OnBtnAjoutLigneClicked);
|
||||||
|
|
|
||||||
|
|
@ -226,6 +226,12 @@
|
||||||
<property name="ShortLabel" translatable="yes">Connection Midi</property>
|
<property name="ShortLabel" translatable="yes">Connection Midi</property>
|
||||||
<property name="StockId">gtk-connect</property>
|
<property name="StockId">gtk-connect</property>
|
||||||
</action>
|
</action>
|
||||||
|
<action id="selectColorAction1">
|
||||||
|
<property name="Type">Action</property>
|
||||||
|
<property name="Label" translatable="yes" />
|
||||||
|
<property name="StockId">gtk-select-color</property>
|
||||||
|
<signal name="Activated" handler="OnSelectColorActionActivated" />
|
||||||
|
</action>
|
||||||
</action-group>
|
</action-group>
|
||||||
<property name="MemberName" />
|
<property name="MemberName" />
|
||||||
<property name="Title" translatable="yes">MainWindow</property>
|
<property name="Title" translatable="yes">MainWindow</property>
|
||||||
|
|
@ -393,6 +399,49 @@ celle selectionnée</property>
|
||||||
<property name="AutoSize">False</property>
|
<property name="AutoSize">False</property>
|
||||||
</packing>
|
</packing>
|
||||||
</child>
|
</child>
|
||||||
|
<child>
|
||||||
|
<widget class="Gtk.EventBox" id="evBBox1">
|
||||||
|
<property name="MemberName">evBBox</property>
|
||||||
|
<child>
|
||||||
|
<widget class="Gtk.VBox" id="vbox3">
|
||||||
|
<property name="MemberName" />
|
||||||
|
<property name="Spacing">6</property>
|
||||||
|
<child>
|
||||||
|
<widget class="Gtk.Label" id="lblPage">
|
||||||
|
<property name="MemberName" />
|
||||||
|
<property name="LabelProp" translatable="yes">0</property>
|
||||||
|
</widget>
|
||||||
|
<packing>
|
||||||
|
<property name="Position">0</property>
|
||||||
|
<property name="AutoSize">True</property>
|
||||||
|
<property name="Expand">False</property>
|
||||||
|
<property name="Fill">False</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<widget class="Gtk.Label" id="lblpagesmall">
|
||||||
|
<property name="MemberName" />
|
||||||
|
<property name="HeightRequest">28</property>
|
||||||
|
<property name="LabelProp" translatable="yes">midi
|
||||||
|
page</property>
|
||||||
|
<property name="UseMarkup">True</property>
|
||||||
|
</widget>
|
||||||
|
<packing>
|
||||||
|
<property name="Position">1</property>
|
||||||
|
<property name="AutoSize">False</property>
|
||||||
|
<property name="Fill">False</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
</widget>
|
||||||
|
</child>
|
||||||
|
</widget>
|
||||||
|
<packing>
|
||||||
|
<property name="Position">8</property>
|
||||||
|
<property name="AutoSize">True</property>
|
||||||
|
<property name="Expand">False</property>
|
||||||
|
<property name="Fill">False</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
</widget>
|
</widget>
|
||||||
<packing>
|
<packing>
|
||||||
<property name="Position">0</property>
|
<property name="Position">0</property>
|
||||||
|
|
@ -3118,15 +3167,17 @@ trames DMX (ms)</property>
|
||||||
<property name="MemberName" />
|
<property name="MemberName" />
|
||||||
<property name="Spacing">6</property>
|
<property name="Spacing">6</property>
|
||||||
<child>
|
<child>
|
||||||
<widget class="Gtk.SpinButton" id="spinbutton1">
|
<widget class="Gtk.SpinButton" id="spinNbPage">
|
||||||
<property name="MemberName" />
|
<property name="MemberName" />
|
||||||
<property name="CanFocus">True</property>
|
<property name="CanFocus">True</property>
|
||||||
<property name="Upper">100</property>
|
<property name="Lower">1</property>
|
||||||
|
<property name="Upper">32</property>
|
||||||
<property name="PageIncrement">10</property>
|
<property name="PageIncrement">10</property>
|
||||||
<property name="StepIncrement">1</property>
|
<property name="StepIncrement">1</property>
|
||||||
<property name="ClimbRate">1</property>
|
<property name="ClimbRate">1</property>
|
||||||
<property name="Numeric">True</property>
|
<property name="Numeric">True</property>
|
||||||
<property name="Value">8</property>
|
<property name="Value">8</property>
|
||||||
|
<signal name="ValueChanged" handler="OnSpinNbPageValueChanged" />
|
||||||
</widget>
|
</widget>
|
||||||
<packing>
|
<packing>
|
||||||
<property name="PackType">End</property>
|
<property name="PackType">End</property>
|
||||||
|
|
@ -3159,7 +3210,7 @@ trames DMX (ms)</property>
|
||||||
</packing>
|
</packing>
|
||||||
</child>
|
</child>
|
||||||
<child>
|
<child>
|
||||||
<widget class="Gtk.CheckButton" id="checkbutton2">
|
<widget class="Gtk.CheckButton" id="chkNoChanZero">
|
||||||
<property name="MemberName" />
|
<property name="MemberName" />
|
||||||
<property name="CanFocus">True</property>
|
<property name="CanFocus">True</property>
|
||||||
<property name="Label" translatable="yes">Ne pas paginer
|
<property name="Label" translatable="yes">Ne pas paginer
|
||||||
|
|
@ -3167,6 +3218,7 @@ le canal midi 1</property>
|
||||||
<property name="DrawIndicator">True</property>
|
<property name="DrawIndicator">True</property>
|
||||||
<property name="HasLabel">True</property>
|
<property name="HasLabel">True</property>
|
||||||
<property name="UseUnderline">True</property>
|
<property name="UseUnderline">True</property>
|
||||||
|
<signal name="Toggled" handler="OnChkNoChanZeroToggled" />
|
||||||
</widget>
|
</widget>
|
||||||
<packing>
|
<packing>
|
||||||
<property name="Position">1</property>
|
<property name="Position">1</property>
|
||||||
|
|
@ -3220,14 +3272,16 @@ le canal midi 1</property>
|
||||||
<property name="MemberName" />
|
<property name="MemberName" />
|
||||||
<property name="Spacing">6</property>
|
<property name="Spacing">6</property>
|
||||||
<child>
|
<child>
|
||||||
<widget class="Gtk.CheckButton" id="checkbutton1">
|
<widget class="Gtk.CheckButton" id="chkFB">
|
||||||
<property name="MemberName" />
|
<property name="MemberName" />
|
||||||
|
<property name="Sensitive">False</property>
|
||||||
<property name="CanFocus">True</property>
|
<property name="CanFocus">True</property>
|
||||||
<property name="Label" translatable="yes">Feedback
|
<property name="Label" translatable="yes">Feedback
|
||||||
(interface motorisée)</property>
|
(interface motorisée)</property>
|
||||||
<property name="DrawIndicator">True</property>
|
<property name="DrawIndicator">True</property>
|
||||||
<property name="HasLabel">True</property>
|
<property name="HasLabel">True</property>
|
||||||
<property name="UseUnderline">True</property>
|
<property name="UseUnderline">True</property>
|
||||||
|
<signal name="Toggled" handler="OnChkFBToggled" />
|
||||||
</widget>
|
</widget>
|
||||||
<packing>
|
<packing>
|
||||||
<property name="Position">0</property>
|
<property name="Position">0</property>
|
||||||
|
|
|
||||||
|
|
@ -104,6 +104,19 @@ style "counter"
|
||||||
font_name = "DejaVu Sans Mono Bold 12"
|
font_name = "DejaVu Sans Mono Bold 12"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
style "page"
|
||||||
|
{
|
||||||
|
fg[NORMAL] = "#FFFF00"
|
||||||
|
bg[NORMAL] = "#000000"
|
||||||
|
font_name = "DejaVu Sans Mono Bold 32"
|
||||||
|
}
|
||||||
|
style "pagesmall"
|
||||||
|
{
|
||||||
|
fg[NORMAL] = "#FFFF00"
|
||||||
|
bg[NORMAL] = "#000000"
|
||||||
|
font_name = "DejaVu Sans Mono Bold 6"
|
||||||
|
}
|
||||||
|
|
||||||
style "actmacro"
|
style "actmacro"
|
||||||
{
|
{
|
||||||
fg[NORMAL] = "#FFFF00"
|
fg[NORMAL] = "#FFFF00"
|
||||||
|
|
@ -128,6 +141,11 @@ widget "*.timeLabel" style "counter"
|
||||||
widget "*.actLabel" style "actmacro"
|
widget "*.actLabel" style "actmacro"
|
||||||
|
|
||||||
widget "*.evBBox" style "counter"
|
widget "*.evBBox" style "counter"
|
||||||
|
widget "*.evBBox1" style "counter"
|
||||||
|
|
||||||
|
widget "*.lblPage" style "page"
|
||||||
|
widget "*.lblpagesmall" style "pagesmall"
|
||||||
|
|
||||||
widget "*.lblTirette" style "lbtirette"
|
widget "*.lblTirette" style "lbtirette"
|
||||||
widget "*.sclTirette" style "tirettes"
|
widget "*.sclTirette" style "tirettes"
|
||||||
widget "*.sclTiretteC" style "tirettesc"
|
widget "*.sclTiretteC" style "tirettesc"
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue