Ajout initial

This commit is contained in:
tzim 2013-04-08 15:27:18 +00:00
commit 78b66f26ac
12 changed files with 373 additions and 0 deletions

20
DMX-2.0.sln Normal file
View file

@ -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

15
DMX-2.0.userprefs Normal file
View file

@ -0,0 +1,15 @@
<Properties>
<MonoDevelop.Ide.Workspace ActiveConfiguration="Debug|x86" />
<MonoDevelop.Ide.Workbench ActiveDocument="DMX-2.0/AssemblyInfo.cs">
<Files>
<File FileName="DMX-2.0/Main.cs" Line="4" Column="15" />
<File FileName="DMX-2.0/MainWindow.cs" Line="17" Column="1" />
<File FileName="DMX-2.0/Conduite.cs" Line="5" Column="15" />
<File FileName="DMX-2.0/AssemblyInfo.cs" Line="1" Column="1" />
</Files>
</MonoDevelop.Ide.Workbench>
<MonoDevelop.Ide.DebuggingService.Breakpoints>
<BreakpointStore />
</MonoDevelop.Ide.DebuggingService.Breakpoints>
<MonoDevelop.Ide.DebuggingService.PinnedWatches />
</Properties>

27
DMX-2.0/AssemblyInfo.cs Normal file
View file

@ -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("")]

128
DMX-2.0/Conduite.cs Normal file
View file

@ -0,0 +1,128 @@
using System;
using System.Collections.Generic;
using System.Diagnostics;
namespace DMX2
{
public class Conduite
{
public Conduite()
{
}
List<Circuit> circuits = new List<Circuit>();
public List<Circuit> Circuits {
get {
return circuits;
}
private set {
circuits = value;
}
}
Dictionary<string, Sequenceur> sequenceurs= new Dictionary<string, Sequenceur>();
public Dictionary<string, Sequenceur> Sequenceurs {
get {
return sequenceurs;
}
private set {
sequenceurs = value;
}
}
List<UniversDMX> univers;
public List<UniversDMX> 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 ();
}
}
}
}
}

75
DMX-2.0/DMX-2.0.csproj Normal file
View file

@ -0,0 +1,75 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">x86</Platform>
<ProductVersion>10.0.0</ProductVersion>
<SchemaVersion>2.0</SchemaVersion>
<ProjectGuid>{2CB55300-0A5B-4DFA-8984-B7EC4C455962}</ProjectGuid>
<OutputType>WinExe</OutputType>
<RootNamespace>DMX2</RootNamespace>
<AssemblyName>DMX-2.0</AssemblyName>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug</OutputPath>
<DefineConstants>DEBUG;</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<PlatformTarget>x86</PlatformTarget>
<ConsolePause>false</ConsolePause>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x86' ">
<DebugType>none</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release</OutputPath>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<PlatformTarget>x86</PlatformTarget>
<ConsolePause>false</ConsolePause>
</PropertyGroup>
<ItemGroup>
<Reference Include="System" />
<Reference Include="gtk-sharp, Version=2.12.0.0, Culture=neutral, PublicKeyToken=35e10195dab3c99f">
<SpecificVersion>False</SpecificVersion>
<Package>gtk-sharp-2.0</Package>
</Reference>
<Reference Include="gdk-sharp, Version=2.12.0.0, Culture=neutral, PublicKeyToken=35e10195dab3c99f">
<SpecificVersion>False</SpecificVersion>
<Package>gtk-sharp-2.0</Package>
</Reference>
<Reference Include="glib-sharp, Version=2.12.0.0, Culture=neutral, PublicKeyToken=35e10195dab3c99f">
<SpecificVersion>False</SpecificVersion>
<Package>glib-sharp-2.0</Package>
</Reference>
<Reference Include="glade-sharp, Version=2.12.0.0, Culture=neutral, PublicKeyToken=35e10195dab3c99f">
<SpecificVersion>False</SpecificVersion>
<Package>glade-sharp-2.0</Package>
</Reference>
<Reference Include="pango-sharp, Version=2.12.0.0, Culture=neutral, PublicKeyToken=35e10195dab3c99f">
<SpecificVersion>False</SpecificVersion>
<Package>gtk-sharp-2.0</Package>
</Reference>
<Reference Include="atk-sharp, Version=2.12.0.0, Culture=neutral, PublicKeyToken=35e10195dab3c99f">
<SpecificVersion>False</SpecificVersion>
<Package>gtk-sharp-2.0</Package>
</Reference>
<Reference Include="Mono.Posix" />
</ItemGroup>
<ItemGroup>
<EmbeddedResource Include="gtk-gui\gui.stetic">
<LogicalName>gui.stetic</LogicalName>
</EmbeddedResource>
</ItemGroup>
<ItemGroup>
<Compile Include="gtk-gui\generated.cs" />
<Compile Include="MainWindow.cs" />
<Compile Include="Main.cs" />
<Compile Include="AssemblyInfo.cs" />
<Compile Include="Conduite.cs" />
<Compile Include="gtk-gui\DMX2.MainWindow.cs" />
</ItemGroup>
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
</Project>

16
DMX-2.0/Main.cs Normal file
View file

@ -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 ();
}
}
}

20
DMX-2.0/MainWindow.cs Normal file
View file

@ -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;
}
}
}

BIN
DMX-2.0/bin/Debug/DMX-2.0.exe Executable file

Binary file not shown.

Binary file not shown.

View file

@ -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);
}
}
}

View file

@ -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;
}
}
}

View file

@ -0,0 +1,20 @@
<?xml version="1.0" encoding="utf-8"?>
<stetic-interface>
<configuration>
<images-root-path>..</images-root-path>
<target-gtk-version>2.12</target-gtk-version>
</configuration>
<import>
<widget-library name="glade-sharp, Version=2.12.0.0, Culture=neutral, PublicKeyToken=35e10195dab3c99f" />
<widget-library name="../bin/Debug/DMX-2.0.exe" internal="true" />
</import>
<widget class="Gtk.Window" id="DMX2.MainWindow" design-size="400 300">
<property name="MemberName" />
<property name="Title" translatable="yes">MainWindow</property>
<property name="WindowPosition">CenterOnParent</property>
<signal name="DeleteEvent" handler="OnDeleteEvent" />
<child>
<placeholder />
</child>
</widget>
</stetic-interface>