commit 78b66f26ac93a0115bb0512380d2e55be08a0c46 Author: tzim Date: Mon Apr 8 15:27:18 2013 +0000 Ajout initial diff --git a/DMX-2.0.sln b/DMX-2.0.sln new file mode 100644 index 0000000..d843fd5 --- /dev/null +++ b/DMX-2.0.sln @@ -0,0 +1,20 @@ + +Microsoft Visual Studio Solution File, Format Version 11.00 +# Visual Studio 2010 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "DMX-2.0", "DMX-2.0\DMX-2.0.csproj", "{2CB55300-0A5B-4DFA-8984-B7EC4C455962}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|x86 = Debug|x86 + Release|x86 = Release|x86 + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {2CB55300-0A5B-4DFA-8984-B7EC4C455962}.Debug|x86.ActiveCfg = Debug|x86 + {2CB55300-0A5B-4DFA-8984-B7EC4C455962}.Debug|x86.Build.0 = Debug|x86 + {2CB55300-0A5B-4DFA-8984-B7EC4C455962}.Release|x86.ActiveCfg = Release|x86 + {2CB55300-0A5B-4DFA-8984-B7EC4C455962}.Release|x86.Build.0 = Release|x86 + EndGlobalSection + GlobalSection(MonoDevelopProperties) = preSolution + StartupItem = DMX-2.0\DMX-2.0.csproj + EndGlobalSection +EndGlobal diff --git a/DMX-2.0.userprefs b/DMX-2.0.userprefs new file mode 100644 index 0000000..5b700b5 --- /dev/null +++ b/DMX-2.0.userprefs @@ -0,0 +1,15 @@ + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/DMX-2.0/AssemblyInfo.cs b/DMX-2.0/AssemblyInfo.cs new file mode 100644 index 0000000..766e439 --- /dev/null +++ b/DMX-2.0/AssemblyInfo.cs @@ -0,0 +1,27 @@ +using System.Reflection; +using System.Runtime.CompilerServices; + +// Information about this assembly is defined by the following attributes. +// Change them to the values specific to your project. + +[assembly: AssemblyTitle("DMX-2.0")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("")] +[assembly: AssemblyCopyright("arnaud")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// The assembly version has the format "{Major}.{Minor}.{Build}.{Revision}". +// The form "{Major}.{Minor}.*" will automatically update the build and revision, +// and "{Major}.{Minor}.{Build}.*" will update just the revision. + +[assembly: AssemblyVersion("1.0.*")] + +// The following attributes are used to specify the signing key for the assembly, +// if desired. See the Mono documentation for more information about signing. + +//[assembly: AssemblyDelaySign(false)] +//[assembly: AssemblyKeyFile("")] + diff --git a/DMX-2.0/Conduite.cs b/DMX-2.0/Conduite.cs new file mode 100644 index 0000000..05bf37a --- /dev/null +++ b/DMX-2.0/Conduite.cs @@ -0,0 +1,128 @@ +using System; +using System.Collections.Generic; +using System.Diagnostics; + + +namespace DMX2 +{ + public class Conduite + { + public Conduite() + { + + } + + List circuits = new List(); + + public List Circuits { + get { + return circuits; + } + private set { + circuits = value; + } + } + + Dictionary sequenceurs= new Dictionary(); + + public Dictionary Sequenceurs { + get { + return sequenceurs; + } + private set { + sequenceurs = value; + } + } + + List univers; + + public List Patch { + get { + return univers; + } + private set { + univers = value; + } + } + + } + + public abstract class Sequenceur + { + } + + public class Circuit + { + string name; + + public string Name { + get { + return name; + } + set { + name = value; + } + } + + int _curval; + + public int ValeurCourante { + get { + return _curval; + } + set { + _curval = value; + } + } + + } + + public class UniversDMX + { + + Grada[] _gradas = new Grada[512]; + + public enum FTransfer { + lineaire, + log, + exp + } + public struct Grada { + public Circuit circuitAssocié; + public FTransfer fonctionTransfert; + public float param1; // Paramètres pour fonction de transfert + public float param2; + } + + public Grada[] Gradas { + get + { + return _gradas; + } + } + + public void CalculUnivers(int[] valeurs) + { + Grada g; + Debug.Assert(valeurs.Length == _gradas.Length); + for(int i = 0 ; i<512; i++) + { + g= _gradas[i]; + switch (g.fonctionTransfert) { + case FTransfer.lineaire: + valeurs[i] = g.circuitAssocié.ValeurCourante; + break; + case FTransfer.log: + break; + case FTransfer.exp: + break; + default: + throw new ArgumentOutOfRangeException (); + } + } + } + + } + +} + diff --git a/DMX-2.0/DMX-2.0.csproj b/DMX-2.0/DMX-2.0.csproj new file mode 100644 index 0000000..ea7d1f7 --- /dev/null +++ b/DMX-2.0/DMX-2.0.csproj @@ -0,0 +1,75 @@ + + + + Debug + x86 + 10.0.0 + 2.0 + {2CB55300-0A5B-4DFA-8984-B7EC4C455962} + WinExe + DMX2 + DMX-2.0 + + + true + full + false + bin\Debug + DEBUG; + prompt + 4 + x86 + false + + + none + true + bin\Release + prompt + 4 + x86 + false + + + + + False + gtk-sharp-2.0 + + + False + gtk-sharp-2.0 + + + False + glib-sharp-2.0 + + + False + glade-sharp-2.0 + + + False + gtk-sharp-2.0 + + + False + gtk-sharp-2.0 + + + + + + gui.stetic + + + + + + + + + + + + \ No newline at end of file diff --git a/DMX-2.0/Main.cs b/DMX-2.0/Main.cs new file mode 100644 index 0000000..586ada4 --- /dev/null +++ b/DMX-2.0/Main.cs @@ -0,0 +1,16 @@ +using System; +using Gtk; + +namespace DMX2 +{ + class MainClass + { + public static void Main (string[] args) + { + Application.Init (); + MainWindow win = new MainWindow (); + win.Show (); + Application.Run (); + } + } +} diff --git a/DMX-2.0/MainWindow.cs b/DMX-2.0/MainWindow.cs new file mode 100644 index 0000000..25b181e --- /dev/null +++ b/DMX-2.0/MainWindow.cs @@ -0,0 +1,20 @@ +using System; +using Gtk; + + +namespace DMX2 +{ + public partial class MainWindow: Gtk.Window + { + public MainWindow (): base (Gtk.WindowType.Toplevel) + { + Build (); + } + + protected void OnDeleteEvent (object sender, DeleteEventArgs a) + { + Application.Quit (); + a.RetVal = true; + } + } +} \ No newline at end of file diff --git a/DMX-2.0/bin/Debug/DMX-2.0.exe b/DMX-2.0/bin/Debug/DMX-2.0.exe new file mode 100755 index 0000000..414720b Binary files /dev/null and b/DMX-2.0/bin/Debug/DMX-2.0.exe differ diff --git a/DMX-2.0/bin/Debug/DMX-2.0.exe.mdb b/DMX-2.0/bin/Debug/DMX-2.0.exe.mdb new file mode 100644 index 0000000..7110967 Binary files /dev/null and b/DMX-2.0/bin/Debug/DMX-2.0.exe.mdb differ diff --git a/DMX-2.0/gtk-gui/DMX2.MainWindow.cs b/DMX-2.0/gtk-gui/DMX2.MainWindow.cs new file mode 100644 index 0000000..32830db --- /dev/null +++ b/DMX-2.0/gtk-gui/DMX2.MainWindow.cs @@ -0,0 +1,23 @@ + +// This file has been generated by the GUI designer. Do not modify. +namespace DMX2 +{ + public partial class MainWindow + { + protected virtual void Build () + { + global::Stetic.Gui.Initialize (this); + // Widget DMX2.MainWindow + this.Name = "DMX2.MainWindow"; + this.Title = global::Mono.Unix.Catalog.GetString ("MainWindow"); + this.WindowPosition = ((global::Gtk.WindowPosition)(4)); + if ((this.Child != null)) { + this.Child.ShowAll (); + } + this.DefaultWidth = 400; + this.DefaultHeight = 300; + this.Show (); + this.DeleteEvent += new global::Gtk.DeleteEventHandler (this.OnDeleteEvent); + } + } +} diff --git a/DMX-2.0/gtk-gui/generated.cs b/DMX-2.0/gtk-gui/generated.cs new file mode 100644 index 0000000..9636f6f --- /dev/null +++ b/DMX-2.0/gtk-gui/generated.cs @@ -0,0 +1,29 @@ + +// This file has been generated by the GUI designer. Do not modify. +namespace Stetic +{ + internal class Gui + { + private static bool initialized; + + internal static void Initialize (Gtk.Widget iconRenderer) + { + if ((Stetic.Gui.initialized == false)) { + Stetic.Gui.initialized = true; + } + } + } + + internal class ActionGroups + { + public static Gtk.ActionGroup GetActionGroup (System.Type type) + { + return Stetic.ActionGroups.GetActionGroup (type.FullName); + } + + public static Gtk.ActionGroup GetActionGroup (string name) + { + return null; + } + } +} diff --git a/DMX-2.0/gtk-gui/gui.stetic b/DMX-2.0/gtk-gui/gui.stetic new file mode 100644 index 0000000..bd8cb6f --- /dev/null +++ b/DMX-2.0/gtk-gui/gui.stetic @@ -0,0 +1,20 @@ + + + + .. + 2.12 + + + + + + + + MainWindow + CenterOnParent + + + + + + \ No newline at end of file