Skip to content

Commit

Permalink
Migrated to use Planimate Loader library
Browse files Browse the repository at this point in the history
initial renaming of classes and namespaces (moving away from pl5engine
  • Loading branch information
craigchandler committed Aug 5, 2014
1 parent 918eb19 commit a7aa693
Show file tree
Hide file tree
Showing 13 changed files with 2,108 additions and 2,111 deletions.
2 changes: 1 addition & 1 deletion pl5engine.sln → PL.Net.sln
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ VisualStudioVersion = 12.0.21005.1
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WindowsFormsApplication1", "WindowsFormsApplication1\WindowsFormsApplication1.csproj", "{6F3E695F-A476-4387-A83E-145597EFDDF5}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "pl5engine", "pl5engine\pl5engine.csproj", "{0D9A8225-58D7-4F5C-9251-2D1734553752}"
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "PLEngine", "pl5engine\PLEngine.csproj", "{0D9A8225-58D7-4F5C-9251-2D1734553752}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Expand Down
429 changes: 218 additions & 211 deletions WindowsFormsApplication1/Form1.Designer.cs

Large diffs are not rendered by default.

25 changes: 13 additions & 12 deletions WindowsFormsApplication1/Form1.cs
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
using System.Runtime.InteropServices;
using System.Text;
using System.Windows.Forms;
using Planimate5engine;
using Planimate.Engine;

namespace WindowsFormsApplication1
{
Expand All @@ -36,11 +36,12 @@ public partial class Form1 : Form
public Form1()
{
InitializeComponent();
pl5engine1.EngineInit("demo", this.Handle);
dataGridView1.DataSource = pl5engine1.GetDataTable("Input_1", true);
dataGridView2.DataSource = pl5engine1.GetDataTable("Formats", true);
PLLoader1.InitPLLoader();
PLLoader1.CreatePL("demo.mdl /debugdll");
dataGridView1.DataSource = PLLoader1.GetEngine().GetDataTable("Input_1", true);
dataGridView2.DataSource = PLLoader1.GetEngine().GetDataTable("Formats", true);
DataTable dt = (DataTable)dataGridView2.DataSource;
pl5engine1.SetDataTable(ref dt,pl5engine1.FindDataObjectName("formats_copy"));
PLLoader1.GetEngine().SetDataTable(ref dt, PLLoader1.GetEngine().FindDataObjectName("formats_copy"));
}

public ePLRESULT broadcast_callback_function(IntPtr broadcast, int no_params, string[] tuple_names, double[] tuple_values)
Expand All @@ -51,27 +52,27 @@ public ePLRESULT broadcast_callback_function(IntPtr broadcast, int no_params, st

private void button3_Click(object sender, EventArgs e)
{
IntPtr broadcast = pl5engine1.FindBroadcastName("Process");
IntPtr broadcast = PLLoader1.GetEngine().FindBroadcastName("Process");
if (broadcast == IntPtr.Zero)
{
MessageBox.Show("Broadcast Not Found");
return;
}
pl5engine.tPL_BroadcastCallback callback;
callback = new pl5engine.tPL_BroadcastCallback(broadcast_callback_function);
ePLRESULT reg_res = pl5engine1.RegisterBroadcastCallback(broadcast, callback);
ePLRESULT brd_res = pl5engine1.SendBroadcast(broadcast, 1, new string[] { "_height" }, new double[] { Convert.ToDouble(numericUpDown1.Value) });
PLEngine.tPL_BroadcastCallback callback;
callback = new PLEngine.tPL_BroadcastCallback(broadcast_callback_function);
ePLRESULT reg_res = PLLoader1.GetEngine().RegisterBroadcastCallback(broadcast, callback);
ePLRESULT brd_res = PLLoader1.GetEngine().SendBroadcast(broadcast, 1, new string[] { "_height" }, new double[] { Convert.ToDouble(numericUpDown1.Value) });
}

private void button1_Click(object sender, EventArgs e)
{
dataGridView2.DataSource = pl5engine1.GetDataTable("Formats", true);
dataGridView2.DataSource = PLLoader1.GetEngine().GetDataTable("Formats", true);
}

private void button2_Click(object sender, EventArgs e)
{
DataTable dt = (DataTable)dataGridView2.DataSource;
pl5engine1.SetDataTable(ref dt, pl5engine1.FindDataObjectName("formats_copy"));
PLLoader1.GetEngine().SetDataTable(ref dt, PLLoader1.GetEngine().FindDataObjectName("formats_copy"));
}
}
}
4 changes: 2 additions & 2 deletions WindowsFormsApplication1/Form1.resx
Original file line number Diff line number Diff line change
Expand Up @@ -112,9 +112,9 @@
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
</root>
4 changes: 2 additions & 2 deletions WindowsFormsApplication1/WindowsFormsApplication1.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -107,9 +107,9 @@
</Compile>
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\pl5engine\pl5engine.csproj">
<ProjectReference Include="..\pl5engine\PLEngine.csproj">
<Project>{0D9A8225-58D7-4F5C-9251-2D1734553752}</Project>
<Name>pl5engine</Name>
<Name>PLEngine</Name>
</ProjectReference>
</ItemGroup>
<ItemGroup>
Expand Down

This file was deleted.

Loading

0 comments on commit a7aa693

Please sign in to comment.