Fenetre de gestion midi
This commit is contained in:
parent
fcfda68d82
commit
b93a02e033
12 changed files with 513 additions and 28 deletions
|
|
@ -19,6 +19,7 @@ namespace DMX2
|
|||
public const int SND_SEQ_PORT_SYSTEM_TIMER = 0;
|
||||
public const int SND_SEQ_PORT_SYSTEM_ANNOUNCE = 1;
|
||||
public const int SND_SEQ_QUERY_SUBS_READ = 0;
|
||||
public const int SND_SEQ_QUERY_SUBS_WRITE = 1;
|
||||
public const int SND_SEQ_PORT_TYPE_APPLICATION = (1 << 20);
|
||||
public const byte SND_SEQ_CLIENT_SYSTEM = 0;
|
||||
public const byte SND_SEQ_ADDRESS_UNKNOWN = 253;
|
||||
|
|
@ -242,11 +243,15 @@ namespace DMX2
|
|||
[FieldOffset(16)]
|
||||
public snd_seq_result_t
|
||||
data_result;
|
||||
[FieldOffset(16)]
|
||||
public snd_seq_addr_t
|
||||
data_addr;
|
||||
}
|
||||
|
||||
static int _clientInfoSize;
|
||||
static int _portInfoSize;
|
||||
static int _subscriberInfoSize;
|
||||
static int _query_subscribeInfoSize;
|
||||
|
||||
static int GetClientInfoSize ()
|
||||
{
|
||||
|
|
@ -271,5 +276,12 @@ namespace DMX2
|
|||
}
|
||||
return _subscriberInfoSize;
|
||||
}
|
||||
static int GetQuerySubscribeInfoSize ()
|
||||
{
|
||||
if (_query_subscribeInfoSize == 0) {
|
||||
_query_subscribeInfoSize = Invoke.snd_seq_query_subscribe_sizeof ();
|
||||
}
|
||||
return _query_subscribeInfoSize;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -56,9 +56,18 @@ namespace DMX2
|
|||
[DllImport(ASOUND_LIB_NAME, CallingConvention = CallingConvention.Cdecl)]
|
||||
public static extern void snd_seq_port_info_set_client (IntPtr info, int client);
|
||||
|
||||
[DllImport(ASOUND_LIB_NAME, CallingConvention = CallingConvention.Cdecl)]
|
||||
public static extern void snd_seq_query_subscribe_set_client (IntPtr info, int client);
|
||||
|
||||
[DllImport(ASOUND_LIB_NAME, CallingConvention = CallingConvention.Cdecl)]
|
||||
public static extern void snd_seq_port_info_set_port (IntPtr info, int val);
|
||||
|
||||
[DllImport(ASOUND_LIB_NAME, CallingConvention = CallingConvention.Cdecl)]
|
||||
public static extern void snd_seq_query_subscribe_set_port (IntPtr info, int val);
|
||||
|
||||
[DllImport(ASOUND_LIB_NAME, CallingConvention = CallingConvention.Cdecl)]
|
||||
public static extern void snd_seq_query_subscribe_set_index (IntPtr info, int _index);
|
||||
|
||||
[DllImport(ASOUND_LIB_NAME, CallingConvention = CallingConvention.Cdecl)]
|
||||
public static extern int snd_seq_query_next_port (IntPtr seq, IntPtr info);
|
||||
|
||||
|
|
@ -72,10 +81,10 @@ namespace DMX2
|
|||
public static extern IntPtr snd_seq_port_info_get_name (IntPtr info);
|
||||
|
||||
[DllImport(ASOUND_LIB_NAME, CallingConvention = CallingConvention.Cdecl)]
|
||||
public static extern IntPtr snd_seq_get_any_client_info (IntPtr seq, int client, IntPtr info);
|
||||
public static extern int snd_seq_get_any_client_info (IntPtr seq, int client, IntPtr info);
|
||||
|
||||
[DllImport(ASOUND_LIB_NAME, CallingConvention = CallingConvention.Cdecl)]
|
||||
public static extern IntPtr snd_seq_get_any_port_info (IntPtr seq, int client, int port, IntPtr info);
|
||||
public static extern int snd_seq_get_any_port_info (IntPtr seq, int client, int port, IntPtr info);
|
||||
|
||||
[DllImport(ASOUND_LIB_NAME, CallingConvention = CallingConvention.Cdecl)]
|
||||
public static extern IntPtr snd_seq_port_info_get_addr (IntPtr info);
|
||||
|
|
@ -88,6 +97,14 @@ namespace DMX2
|
|||
|
||||
[DllImport(ASOUND_LIB_NAME, CallingConvention = CallingConvention.Cdecl)]
|
||||
public static extern int snd_seq_port_subscribe_sizeof ();
|
||||
[DllImport(ASOUND_LIB_NAME, CallingConvention = CallingConvention.Cdecl)]
|
||||
public static extern int snd_seq_query_subscribe_sizeof ();
|
||||
|
||||
[DllImport(ASOUND_LIB_NAME, CallingConvention = CallingConvention.Cdecl)]
|
||||
public static extern int snd_seq_query_subscribe_get_client (IntPtr info);
|
||||
[DllImport(ASOUND_LIB_NAME, CallingConvention = CallingConvention.Cdecl)]
|
||||
public static extern int snd_seq_query_subscribe_get_port (IntPtr info);
|
||||
|
||||
|
||||
[DllImport(ASOUND_LIB_NAME, CallingConvention = CallingConvention.Cdecl)]
|
||||
public static extern uint snd_seq_port_info_get_capability (IntPtr info);
|
||||
|
|
@ -107,9 +124,6 @@ namespace DMX2
|
|||
[DllImport(ASOUND_LIB_NAME, CallingConvention = CallingConvention.Cdecl)]
|
||||
public static extern void snd_seq_query_subscribe_set_type (IntPtr info, int type);
|
||||
|
||||
[DllImport(ASOUND_LIB_NAME, CallingConvention = CallingConvention.Cdecl)]
|
||||
public static extern void snd_seq_query_subscribe_set_index (IntPtr info, int index);
|
||||
|
||||
[DllImport(ASOUND_LIB_NAME, CallingConvention = CallingConvention.Cdecl)]
|
||||
public static extern int snd_seq_query_subscribe_get_index (IntPtr info);
|
||||
|
||||
|
|
|
|||
|
|
@ -69,8 +69,6 @@ namespace DMX2
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public static snd_seq_addr_t PtrToSndSeqAddr (this IntPtr ptr)
|
||||
{
|
||||
try {
|
||||
|
|
|
|||
|
|
@ -171,7 +171,6 @@ namespace DMX2
|
|||
|
||||
public static IEnumerable<Client> EnumClients ()
|
||||
{
|
||||
|
||||
using (PointerWrapper clientInfo = new PointerWrapper(GetClientInfoSize())) {
|
||||
Invoke.snd_seq_client_info_set_client(clientInfo.Pointer, -1);
|
||||
while (Invoke.snd_seq_query_next_client(seq_handle.Handle,clientInfo.Pointer)>=0) {
|
||||
|
|
@ -180,10 +179,40 @@ namespace DMX2
|
|||
}
|
||||
}
|
||||
|
||||
public static Client GetClientByID (int client)
|
||||
{
|
||||
using (PointerWrapper clientInfo = new PointerWrapper(GetClientInfoSize())) {
|
||||
if (Invoke.snd_seq_get_any_client_info (seq_handle.Handle, client, clientInfo.Pointer) >= 0) {
|
||||
return new Client (clientInfo);
|
||||
} else
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
public static Port GetPortByIDs(int client,int port){
|
||||
using (PointerWrapper portInfo = new PointerWrapper(GetPortInfoSize ())) {
|
||||
if(Invoke.snd_seq_get_any_port_info(seq_handle.Handle,client,port,portInfo.Pointer) >= 0) {
|
||||
return new Port(portInfo);
|
||||
}
|
||||
else
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
public static bool Connect(Port port)
|
||||
{
|
||||
// TODO : detecter le sens et se connecter au port.
|
||||
return false;
|
||||
bool isInput = (port.Caps & SND_SEQ_PORT_CAP_WRITE) == SND_SEQ_PORT_CAP_WRITE;
|
||||
bool isOutput = (port.Caps & SND_SEQ_PORT_CAP_READ) == SND_SEQ_PORT_CAP_READ;
|
||||
|
||||
if (isInput)
|
||||
if (!ConnectTo (port.ClientId, port.PortId))
|
||||
return false;
|
||||
|
||||
if (isOutput)
|
||||
if (!ConnectFrom (port.ClientId, port.PortId))
|
||||
return false;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
public static bool ConnectTo(int client, int port){
|
||||
|
|
@ -192,6 +221,24 @@ namespace DMX2
|
|||
public static bool ConnectFrom(int client, int port){
|
||||
return Invoke.snd_seq_connect_from(seq_handle.Handle,inport,client,port)==0;
|
||||
}
|
||||
|
||||
/*
|
||||
public static void GetConnections()
|
||||
{
|
||||
using(PointerWrapper subscribeInfo = new PointerWrapper(GetQuerySubscribeInfoSize())){
|
||||
int index=0;
|
||||
Invoke.snd_seq_query_subscribe_set_client (subscribeInfo.Pointer,clientId);
|
||||
Invoke.snd_seq_query_subscribe_set_port (subscribeInfo.Pointer,inport);
|
||||
Invoke.snd_seq_query_subscribe_set_index(subscribeInfo.Pointer,index++);
|
||||
Invoke.snd_seq_query_subscribe_set_type(subscribeInfo.Pointer,SND_SEQ_QUERY_SUBS_WRITE);
|
||||
|
||||
while (Invoke.snd_seq_query_port_subscribers(seq_handle.Handle,subscribeInfo.Pointer) ==0){
|
||||
|
||||
//Console.WriteLine("Remote => {0}:{1}",rclient,rport);
|
||||
Invoke.snd_seq_query_subscribe_set_index(subscribeInfo.Pointer,index++);
|
||||
}
|
||||
}
|
||||
}*/
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -161,6 +161,8 @@
|
|||
<Compile Include="AlsaSeqLib.Invoke.cs" />
|
||||
<Compile Include="AlsaSeqLib.AlsaTypes.cs" />
|
||||
<Compile Include="AlsaSeqLib.Wrappers.cs" />
|
||||
<Compile Include="GestionMidiUI.cs" />
|
||||
<Compile Include="gtk-gui\DMX2.GestionMidiUI.cs" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
|
||||
<ProjectExtensions>
|
||||
|
|
|
|||
19
DMX-2.0/GestionMidiUI.cs
Normal file
19
DMX-2.0/GestionMidiUI.cs
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
using System;
|
||||
|
||||
namespace DMX2
|
||||
{
|
||||
public partial class GestionMidiUI : Gtk.Dialog
|
||||
{
|
||||
public GestionMidiUI ()
|
||||
{
|
||||
this.Build ();
|
||||
|
||||
}
|
||||
protected void OnButtonCloseClicked (object sender, EventArgs e)
|
||||
{
|
||||
Destroy();
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -683,16 +683,12 @@ namespace DMX2
|
|||
|
||||
dDlg = new GestionDriversUI();
|
||||
dDlg.ShowAll();
|
||||
dDlg.Destroyed += dDlgDestroyed;
|
||||
dDlg.Destroyed += delegate {
|
||||
dDlg = null;
|
||||
};
|
||||
//Conduite.Courante.Drivers.Add( new DriverBoitierV1());
|
||||
|
||||
|
||||
}
|
||||
|
||||
void dDlgDestroyed (object sender, EventArgs e)
|
||||
{
|
||||
dDlg= null;
|
||||
}
|
||||
|
||||
protected void OnBtnPauseToggled (object sender, EventArgs e)
|
||||
{
|
||||
|
|
@ -749,11 +745,13 @@ namespace DMX2
|
|||
|
||||
protected void OnInfoActionActivated (object sender, EventArgs e)
|
||||
{
|
||||
if(aguiprocess!=null)
|
||||
/*if(aguiprocess!=null)
|
||||
if(!aguiprocess.HasExited)
|
||||
return;
|
||||
|
||||
aguiprocess= Process.Start("aconnectgui");
|
||||
aguiprocess= Process.Start("aconnectgui");*/
|
||||
|
||||
|
||||
}
|
||||
|
||||
protected void OnAboutActionActivated (object sender, EventArgs e)
|
||||
|
|
@ -762,8 +760,25 @@ namespace DMX2
|
|||
About dlg = new About();
|
||||
dlg.Show();
|
||||
dlg.Run ();
|
||||
}
|
||||
}
|
||||
|
||||
GestionMidiUI mDlg=null;
|
||||
|
||||
|
||||
protected void OnMidiActionActivated (object sender, EventArgs e)
|
||||
{
|
||||
if (mDlg != null) {
|
||||
mDlg.Show();
|
||||
return;
|
||||
}
|
||||
|
||||
mDlg = new GestionMidiUI();
|
||||
mDlg.ShowAll();
|
||||
mDlg.Destroyed += delegate {
|
||||
mDlg= null;
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
|
@ -60,6 +60,7 @@ namespace DMX2
|
|||
|
||||
|
||||
Dictionary<string,internalEvent> eventlist = new Dictionary<string, internalEvent>();
|
||||
List<string> midiPortAutoConnect = new List<string>();
|
||||
EventData last;
|
||||
internalEvent levent=null;
|
||||
bool connected=false;
|
||||
|
|
@ -68,14 +69,31 @@ namespace DMX2
|
|||
{
|
||||
manager.RegisterProvider (this);
|
||||
AlsaSeqLib.Init ();
|
||||
// Connection au port d'annonce pour detection auto
|
||||
//midiPortAutoConnect.Add("System:Announce");
|
||||
AlsaSeqLib.ConnectFrom(AlsaSeqLib.SND_SEQ_CLIENT_SYSTEM, AlsaSeqLib.SND_SEQ_PORT_SYSTEM_ANNOUNCE);
|
||||
|
||||
foreach (var cli in AlsaSeqLib.EnumClients()) {
|
||||
Console.WriteLine(cli.Name);
|
||||
foreach(var p in cli.Ports){
|
||||
Console.WriteLine("Port {0} - {1} => caps {2}",p.PortId,p.Name,p.Caps);
|
||||
PortDetected(cli,p);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
void PortDetected (AlsaSeqLib.Client cli, AlsaSeqLib.Port p)
|
||||
{
|
||||
// Execute a chaque 'apparition' d'un port midi
|
||||
|
||||
// teste si connection auto au port et connecte si besoin
|
||||
|
||||
string fullportname = cli.Name + ':' + p.Name;
|
||||
Console.WriteLine(fullportname);
|
||||
if(midiPortAutoConnect.Contains(fullportname))
|
||||
AlsaSeqLib.Connect(p);
|
||||
}
|
||||
|
||||
|
||||
public void SendEvent (AlsaSeqLib.snd_seq_event_t ev)
|
||||
{
|
||||
AlsaSeqLib.SendEventToSubscribers(ev);
|
||||
|
|
@ -162,13 +180,19 @@ namespace DMX2
|
|||
case AlsaSeqLib.snd_seq_event_type_t.SND_SEQ_EVENT_CLOCK:
|
||||
case AlsaSeqLib.snd_seq_event_type_t.SND_SEQ_EVENT_SENSING:
|
||||
continue;
|
||||
case AlsaSeqLib.snd_seq_event_type_t.SND_SEQ_EVENT_PORT_START:
|
||||
PortDetected(
|
||||
AlsaSeqLib.GetClientByID(evS.data_addr.client),
|
||||
AlsaSeqLib.GetPortByIDs(evS.data_addr.client,evS.data_addr.port)
|
||||
);
|
||||
continue;
|
||||
|
||||
|
||||
//TODO : Regarder si d'autres controles interessants.
|
||||
default:
|
||||
id= null;
|
||||
#if DEBUG
|
||||
Info.Publish(string.Format ("event {0}", evS.type) ); // On affiche les evenements inconnus
|
||||
Console.WriteLine(string.Format ("event {0}", evS.type) );
|
||||
#endif
|
||||
continue;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -124,7 +124,7 @@ namespace DMX2
|
|||
this.Child.ShowAll ();
|
||||
}
|
||||
this.DefaultWidth = 488;
|
||||
this.DefaultHeight = 405;
|
||||
this.DefaultHeight = 420;
|
||||
this.Show ();
|
||||
this.listeUsb.CursorChanged += new global::System.EventHandler (this.OnListeUsbCursorChanged);
|
||||
this.btnConnect.Clicked += new global::System.EventHandler (this.OnBtnConnectClicked);
|
||||
|
|
|
|||
171
DMX-2.0/gtk-gui/DMX2.GestionMidiUI.cs
Normal file
171
DMX-2.0/gtk-gui/DMX2.GestionMidiUI.cs
Normal file
|
|
@ -0,0 +1,171 @@
|
|||
|
||||
// This file has been generated by the GUI designer. Do not modify.
|
||||
namespace DMX2
|
||||
{
|
||||
public partial class GestionMidiUI
|
||||
{
|
||||
private global::Gtk.HBox hbox2;
|
||||
private global::Gtk.Label label1;
|
||||
private global::Gtk.ScrolledWindow GtkScrolledWindow;
|
||||
private global::Gtk.TreeView treeview1;
|
||||
private global::Gtk.HBox hbox1;
|
||||
private global::Gtk.Label label2;
|
||||
private global::Gtk.Button button59;
|
||||
private global::Gtk.Button button60;
|
||||
private global::Gtk.ScrolledWindow GtkScrolledWindow1;
|
||||
private global::Gtk.TreeView treeview2;
|
||||
private global::Gtk.Button buttonClose;
|
||||
|
||||
protected virtual void Build ()
|
||||
{
|
||||
global::Stetic.Gui.Initialize (this);
|
||||
// Widget DMX2.GestionMidiUI
|
||||
this.Name = "DMX2.GestionMidiUI";
|
||||
this.Title = "Connexions Midi";
|
||||
this.WindowPosition = ((global::Gtk.WindowPosition)(4));
|
||||
// Internal child DMX2.GestionMidiUI.VBox
|
||||
global::Gtk.VBox w1 = this.VBox;
|
||||
w1.Name = "dialog1_VBox";
|
||||
w1.BorderWidth = ((uint)(2));
|
||||
// Container child dialog1_VBox.Gtk.Box+BoxChild
|
||||
this.hbox2 = new global::Gtk.HBox ();
|
||||
this.hbox2.Name = "hbox2";
|
||||
this.hbox2.Spacing = 6;
|
||||
// Container child hbox2.Gtk.Box+BoxChild
|
||||
this.label1 = new global::Gtk.Label ();
|
||||
this.label1.Name = "label1";
|
||||
this.label1.LabelProp = "Ports Midi disponibles :";
|
||||
this.hbox2.Add (this.label1);
|
||||
global::Gtk.Box.BoxChild w2 = ((global::Gtk.Box.BoxChild)(this.hbox2 [this.label1]));
|
||||
w2.Position = 0;
|
||||
w2.Expand = false;
|
||||
w2.Fill = false;
|
||||
w1.Add (this.hbox2);
|
||||
global::Gtk.Box.BoxChild w3 = ((global::Gtk.Box.BoxChild)(w1 [this.hbox2]));
|
||||
w3.Position = 0;
|
||||
w3.Expand = false;
|
||||
w3.Fill = false;
|
||||
// Container child dialog1_VBox.Gtk.Box+BoxChild
|
||||
this.GtkScrolledWindow = new global::Gtk.ScrolledWindow ();
|
||||
this.GtkScrolledWindow.Name = "GtkScrolledWindow";
|
||||
this.GtkScrolledWindow.ShadowType = ((global::Gtk.ShadowType)(1));
|
||||
// Container child GtkScrolledWindow.Gtk.Container+ContainerChild
|
||||
this.treeview1 = new global::Gtk.TreeView ();
|
||||
this.treeview1.CanFocus = true;
|
||||
this.treeview1.Name = "treeview1";
|
||||
this.GtkScrolledWindow.Add (this.treeview1);
|
||||
w1.Add (this.GtkScrolledWindow);
|
||||
global::Gtk.Box.BoxChild w5 = ((global::Gtk.Box.BoxChild)(w1 [this.GtkScrolledWindow]));
|
||||
w5.Position = 1;
|
||||
// Container child dialog1_VBox.Gtk.Box+BoxChild
|
||||
this.hbox1 = new global::Gtk.HBox ();
|
||||
this.hbox1.Name = "hbox1";
|
||||
this.hbox1.Spacing = 6;
|
||||
// Container child hbox1.Gtk.Box+BoxChild
|
||||
this.label2 = new global::Gtk.Label ();
|
||||
this.label2.Name = "label2";
|
||||
this.label2.LabelProp = "Ports Midi connectés :";
|
||||
this.hbox1.Add (this.label2);
|
||||
global::Gtk.Box.BoxChild w6 = ((global::Gtk.Box.BoxChild)(this.hbox1 [this.label2]));
|
||||
w6.Position = 0;
|
||||
w6.Expand = false;
|
||||
w6.Fill = false;
|
||||
// Container child hbox1.Gtk.Box+BoxChild
|
||||
this.button59 = new global::Gtk.Button ();
|
||||
this.button59.CanFocus = true;
|
||||
this.button59.Name = "button59";
|
||||
this.button59.UseUnderline = true;
|
||||
// Container child button59.Gtk.Container+ContainerChild
|
||||
global::Gtk.Alignment w7 = new global::Gtk.Alignment (0.5F, 0.5F, 0F, 0F);
|
||||
// Container child GtkAlignment.Gtk.Container+ContainerChild
|
||||
global::Gtk.HBox w8 = new global::Gtk.HBox ();
|
||||
w8.Spacing = 2;
|
||||
// Container child GtkHBox.Gtk.Container+ContainerChild
|
||||
global::Gtk.Image w9 = new global::Gtk.Image ();
|
||||
w9.Pixbuf = global::Stetic.IconLoader.LoadIcon (this, "gtk-disconnect", global::Gtk.IconSize.Menu);
|
||||
w8.Add (w9);
|
||||
// Container child GtkHBox.Gtk.Container+ContainerChild
|
||||
global::Gtk.Label w11 = new global::Gtk.Label ();
|
||||
w11.LabelProp = "_Déconnecter";
|
||||
w11.UseUnderline = true;
|
||||
w8.Add (w11);
|
||||
w7.Add (w8);
|
||||
this.button59.Add (w7);
|
||||
this.hbox1.Add (this.button59);
|
||||
global::Gtk.Box.BoxChild w15 = ((global::Gtk.Box.BoxChild)(this.hbox1 [this.button59]));
|
||||
w15.PackType = ((global::Gtk.PackType)(1));
|
||||
w15.Position = 2;
|
||||
w15.Expand = false;
|
||||
w15.Fill = false;
|
||||
// Container child hbox1.Gtk.Box+BoxChild
|
||||
this.button60 = new global::Gtk.Button ();
|
||||
this.button60.CanFocus = true;
|
||||
this.button60.Name = "button60";
|
||||
this.button60.UseUnderline = true;
|
||||
// Container child button60.Gtk.Container+ContainerChild
|
||||
global::Gtk.Alignment w16 = new global::Gtk.Alignment (0.5F, 0.5F, 0F, 0F);
|
||||
// Container child GtkAlignment.Gtk.Container+ContainerChild
|
||||
global::Gtk.HBox w17 = new global::Gtk.HBox ();
|
||||
w17.Spacing = 2;
|
||||
// Container child GtkHBox.Gtk.Container+ContainerChild
|
||||
global::Gtk.Image w18 = new global::Gtk.Image ();
|
||||
w18.Pixbuf = global::Stetic.IconLoader.LoadIcon (this, "gtk-connect", global::Gtk.IconSize.Menu);
|
||||
w17.Add (w18);
|
||||
// Container child GtkHBox.Gtk.Container+ContainerChild
|
||||
global::Gtk.Label w20 = new global::Gtk.Label ();
|
||||
w20.LabelProp = "Connecter";
|
||||
w20.UseUnderline = true;
|
||||
w17.Add (w20);
|
||||
w16.Add (w17);
|
||||
this.button60.Add (w16);
|
||||
this.hbox1.Add (this.button60);
|
||||
global::Gtk.Box.BoxChild w24 = ((global::Gtk.Box.BoxChild)(this.hbox1 [this.button60]));
|
||||
w24.PackType = ((global::Gtk.PackType)(1));
|
||||
w24.Position = 3;
|
||||
w24.Expand = false;
|
||||
w24.Fill = false;
|
||||
w1.Add (this.hbox1);
|
||||
global::Gtk.Box.BoxChild w25 = ((global::Gtk.Box.BoxChild)(w1 [this.hbox1]));
|
||||
w25.Position = 2;
|
||||
w25.Expand = false;
|
||||
w25.Fill = false;
|
||||
// Container child dialog1_VBox.Gtk.Box+BoxChild
|
||||
this.GtkScrolledWindow1 = new global::Gtk.ScrolledWindow ();
|
||||
this.GtkScrolledWindow1.Name = "GtkScrolledWindow1";
|
||||
this.GtkScrolledWindow1.ShadowType = ((global::Gtk.ShadowType)(1));
|
||||
// Container child GtkScrolledWindow1.Gtk.Container+ContainerChild
|
||||
this.treeview2 = new global::Gtk.TreeView ();
|
||||
this.treeview2.CanFocus = true;
|
||||
this.treeview2.Name = "treeview2";
|
||||
this.GtkScrolledWindow1.Add (this.treeview2);
|
||||
w1.Add (this.GtkScrolledWindow1);
|
||||
global::Gtk.Box.BoxChild w27 = ((global::Gtk.Box.BoxChild)(w1 [this.GtkScrolledWindow1]));
|
||||
w27.Position = 3;
|
||||
// Internal child DMX2.GestionMidiUI.ActionArea
|
||||
global::Gtk.HButtonBox w28 = this.ActionArea;
|
||||
w28.Name = "dialog1_ActionArea";
|
||||
w28.Spacing = 10;
|
||||
w28.BorderWidth = ((uint)(5));
|
||||
w28.LayoutStyle = ((global::Gtk.ButtonBoxStyle)(4));
|
||||
// Container child dialog1_ActionArea.Gtk.ButtonBox+ButtonBoxChild
|
||||
this.buttonClose = new global::Gtk.Button ();
|
||||
this.buttonClose.CanDefault = true;
|
||||
this.buttonClose.CanFocus = true;
|
||||
this.buttonClose.Name = "buttonClose";
|
||||
this.buttonClose.UseStock = true;
|
||||
this.buttonClose.UseUnderline = true;
|
||||
this.buttonClose.Label = "gtk-close";
|
||||
this.AddActionWidget (this.buttonClose, -7);
|
||||
global::Gtk.ButtonBox.ButtonBoxChild w29 = ((global::Gtk.ButtonBox.ButtonBoxChild)(w28 [this.buttonClose]));
|
||||
w29.Expand = false;
|
||||
w29.Fill = false;
|
||||
if ((this.Child != null)) {
|
||||
this.Child.ShowAll ();
|
||||
}
|
||||
this.DefaultWidth = 667;
|
||||
this.DefaultHeight = 424;
|
||||
this.Show ();
|
||||
this.buttonClose.Clicked += new global::System.EventHandler (this.OnButtonCloseClicked);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -25,6 +25,8 @@ namespace DMX2
|
|||
private global::Gtk.Action selectColorAction;
|
||||
private global::Gtk.Action aguiAction;
|
||||
private global::Gtk.Action aboutAction;
|
||||
private global::Gtk.Action midiAction;
|
||||
private global::Gtk.Action connectAction1;
|
||||
private global::Gtk.VBox vbox1;
|
||||
private global::Gtk.HBox hbox1;
|
||||
private global::Gtk.VBox vbox2;
|
||||
|
|
@ -120,6 +122,11 @@ namespace DMX2
|
|||
w1.Add (this.aguiAction, null);
|
||||
this.aboutAction = new global::Gtk.Action ("aboutAction", null, null, "gtk-about");
|
||||
w1.Add (this.aboutAction, null);
|
||||
this.midiAction = new global::Gtk.Action ("midiAction", null, null, "gtk-preferences");
|
||||
w1.Add (this.midiAction, null);
|
||||
this.connectAction1 = new global::Gtk.Action ("connectAction1", "Connection Midi", null, "gtk-connect");
|
||||
this.connectAction1.ShortLabel = "Connection Midi";
|
||||
w1.Add (this.connectAction1, null);
|
||||
this.UIManager.InsertActionGroup (w1, 0);
|
||||
this.AddAccelGroup (this.UIManager.AccelGroup);
|
||||
this.Name = "DMX2.MainWindow";
|
||||
|
|
@ -423,7 +430,7 @@ namespace DMX2
|
|||
global::Gtk.Box.BoxChild w74 = ((global::Gtk.Box.BoxChild)(this.hbox4 [this.evInfo]));
|
||||
w74.Position = 1;
|
||||
// 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='aguiAction' action='aguiAction'/><toolitem name='selectColorAction' action='selectColorAction'/><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.Name = "toolbar8";
|
||||
this.toolbar8.ShowArrow = false;
|
||||
|
|
@ -462,6 +469,7 @@ namespace DMX2
|
|||
this.selectColorAction.Activated += new global::System.EventHandler (this.OnSelectColorActionActivated);
|
||||
this.aguiAction.Activated += new global::System.EventHandler (this.OnInfoActionActivated);
|
||||
this.aboutAction.Activated += new global::System.EventHandler (this.OnAboutActionActivated);
|
||||
this.midiAction.Activated += new global::System.EventHandler (this.OnMidiActionActivated);
|
||||
this.btnGo.Clicked += new global::System.EventHandler (this.OnBtnGoClicked);
|
||||
this.btnGoBack.Clicked += new global::System.EventHandler (this.OnBtnGoBackClicked);
|
||||
this.btnAjoutLigne.Clicked += new global::System.EventHandler (this.OnBtnAjoutLigneClicked);
|
||||
|
|
|
|||
|
|
@ -214,6 +214,18 @@
|
|||
<property name="StockId">gtk-about</property>
|
||||
<signal name="Activated" handler="OnAboutActionActivated" />
|
||||
</action>
|
||||
<action id="midiAction">
|
||||
<property name="Type">Action</property>
|
||||
<property name="Label" translatable="yes" />
|
||||
<property name="StockId">gtk-preferences</property>
|
||||
<signal name="Activated" handler="OnMidiActionActivated" />
|
||||
</action>
|
||||
<action id="connectAction1">
|
||||
<property name="Type">Action</property>
|
||||
<property name="Label" translatable="yes">Connection Midi</property>
|
||||
<property name="ShortLabel" translatable="yes">Connection Midi</property>
|
||||
<property name="StockId">gtk-connect</property>
|
||||
</action>
|
||||
</action-group>
|
||||
<property name="MemberName" />
|
||||
<property name="Title" translatable="yes">MainWindow</property>
|
||||
|
|
@ -548,8 +560,7 @@ celle selectionnée</property>
|
|||
<node type="Toolitem" action="saveAction" />
|
||||
<node type="Toolitem" action="saveAsAction" />
|
||||
<node type="Toolitem" action="closeAction" />
|
||||
<node type="Toolitem" action="aguiAction" />
|
||||
<node type="Toolitem" action="selectColorAction" />
|
||||
<node type="Toolitem" action="midiAction" />
|
||||
<node type="Toolitem" action="aboutAction" />
|
||||
<node type="Toolitem" action="quitAction" />
|
||||
</node>
|
||||
|
|
@ -1893,7 +1904,7 @@ au sequenceur</property>
|
|||
</widget>
|
||||
</child>
|
||||
</widget>
|
||||
<widget class="Gtk.Dialog" id="DMX2.GestionDriversUI" design-size="488 405">
|
||||
<widget class="Gtk.Dialog" id="DMX2.GestionDriversUI" design-size="488 420">
|
||||
<property name="MemberName" />
|
||||
<property name="WindowPosition">CenterOnParent</property>
|
||||
<property name="Buttons">1</property>
|
||||
|
|
@ -3068,4 +3079,168 @@ trames DMX (ms)</property>
|
|||
</widget>
|
||||
</child>
|
||||
</widget>
|
||||
<widget class="Gtk.Dialog" id="DMX2.GestionMidiUI" design-size="667 424">
|
||||
<property name="MemberName" />
|
||||
<property name="Title" translatable="yes">Connexions Midi</property>
|
||||
<property name="WindowPosition">CenterOnParent</property>
|
||||
<property name="Buttons">1</property>
|
||||
<property name="HelpButton">False</property>
|
||||
<child internal-child="VBox">
|
||||
<widget class="Gtk.VBox" id="dialog1_VBox">
|
||||
<property name="MemberName" />
|
||||
<property name="BorderWidth">2</property>
|
||||
<child>
|
||||
<widget class="Gtk.HBox" id="hbox2">
|
||||
<property name="MemberName" />
|
||||
<property name="Spacing">6</property>
|
||||
<child>
|
||||
<widget class="Gtk.Label" id="label1">
|
||||
<property name="MemberName" />
|
||||
<property name="LabelProp" translatable="yes">Ports Midi disponibles :</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>
|
||||
<placeholder />
|
||||
</child>
|
||||
<child>
|
||||
<placeholder />
|
||||
</child>
|
||||
</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.ScrolledWindow" id="GtkScrolledWindow">
|
||||
<property name="MemberName" />
|
||||
<property name="ShadowType">In</property>
|
||||
<child>
|
||||
<widget class="Gtk.TreeView" id="treeview1">
|
||||
<property name="MemberName" />
|
||||
<property name="CanFocus">True</property>
|
||||
<property name="ShowScrollbars">True</property>
|
||||
</widget>
|
||||
</child>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="Position">1</property>
|
||||
<property name="AutoSize">True</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<widget class="Gtk.HBox" id="hbox1">
|
||||
<property name="MemberName" />
|
||||
<property name="Spacing">6</property>
|
||||
<child>
|
||||
<widget class="Gtk.Label" id="label2">
|
||||
<property name="MemberName" />
|
||||
<property name="LabelProp" translatable="yes">Ports Midi connectés :</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>
|
||||
<placeholder />
|
||||
</child>
|
||||
<child>
|
||||
<widget class="Gtk.Button" id="button59">
|
||||
<property name="MemberName" />
|
||||
<property name="CanFocus">True</property>
|
||||
<property name="Type">TextAndIcon</property>
|
||||
<property name="Icon">stock:gtk-disconnect Menu</property>
|
||||
<property name="Label" translatable="yes">_Déconnecter</property>
|
||||
<property name="UseUnderline">True</property>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="PackType">End</property>
|
||||
<property name="Position">2</property>
|
||||
<property name="AutoSize">True</property>
|
||||
<property name="Expand">False</property>
|
||||
<property name="Fill">False</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<widget class="Gtk.Button" id="button60">
|
||||
<property name="MemberName" />
|
||||
<property name="CanFocus">True</property>
|
||||
<property name="Type">TextAndIcon</property>
|
||||
<property name="Icon">stock:gtk-connect Menu</property>
|
||||
<property name="Label" translatable="yes">Connecter</property>
|
||||
<property name="UseUnderline">True</property>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="PackType">End</property>
|
||||
<property name="Position">3</property>
|
||||
<property name="AutoSize">True</property>
|
||||
<property name="Expand">False</property>
|
||||
<property name="Fill">False</property>
|
||||
</packing>
|
||||
</child>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="Position">2</property>
|
||||
<property name="AutoSize">True</property>
|
||||
<property name="Expand">False</property>
|
||||
<property name="Fill">False</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<widget class="Gtk.ScrolledWindow" id="GtkScrolledWindow1">
|
||||
<property name="MemberName" />
|
||||
<property name="ShadowType">In</property>
|
||||
<child>
|
||||
<widget class="Gtk.TreeView" id="treeview2">
|
||||
<property name="MemberName" />
|
||||
<property name="CanFocus">True</property>
|
||||
<property name="ShowScrollbars">True</property>
|
||||
</widget>
|
||||
</child>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="Position">3</property>
|
||||
<property name="AutoSize">True</property>
|
||||
</packing>
|
||||
</child>
|
||||
</widget>
|
||||
</child>
|
||||
<child internal-child="ActionArea">
|
||||
<widget class="Gtk.HButtonBox" id="dialog1_ActionArea">
|
||||
<property name="MemberName" />
|
||||
<property name="Spacing">10</property>
|
||||
<property name="BorderWidth">5</property>
|
||||
<property name="Size">1</property>
|
||||
<property name="LayoutStyle">End</property>
|
||||
<child>
|
||||
<widget class="Gtk.Button" id="buttonClose">
|
||||
<property name="MemberName" />
|
||||
<property name="CanDefault">True</property>
|
||||
<property name="CanFocus">True</property>
|
||||
<property name="UseStock">True</property>
|
||||
<property name="Type">StockItem</property>
|
||||
<property name="StockId">gtk-close</property>
|
||||
<property name="ResponseId">-7</property>
|
||||
<signal name="Clicked" handler="OnButtonCloseClicked" />
|
||||
<property name="label">gtk-close</property>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="Expand">False</property>
|
||||
<property name="Fill">False</property>
|
||||
</packing>
|
||||
</child>
|
||||
</widget>
|
||||
</child>
|
||||
</widget>
|
||||
</stetic-interface>
|
||||
Loading…
Reference in a new issue