Skip to content

Commit 3092503

Browse files
authored
Merge pull request #3 from DragonirHD/v2.0.0
V2.0.0
2 parents 51b9c1b + 0049620 commit 3092503

38 files changed

+3269
-1255
lines changed

MovementScriptGenerator.sln

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@ Global
1313
GlobalSection(ProjectConfigurationPlatforms) = postSolution
1414
{779FE5F9-F0F3-4EF3-8D9A-E8D7AEA8D29D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
1515
{779FE5F9-F0F3-4EF3-8D9A-E8D7AEA8D29D}.Debug|Any CPU.Build.0 = Debug|Any CPU
16-
{779FE5F9-F0F3-4EF3-8D9A-E8D7AEA8D29D}.Release|Any CPU.ActiveCfg = Release|Any CPU
17-
{779FE5F9-F0F3-4EF3-8D9A-E8D7AEA8D29D}.Release|Any CPU.Build.0 = Release|Any CPU
16+
{779FE5F9-F0F3-4EF3-8D9A-E8D7AEA8D29D}.Release|Any CPU.ActiveCfg = Debug|Any CPU
17+
{779FE5F9-F0F3-4EF3-8D9A-E8D7AEA8D29D}.Release|Any CPU.Build.0 = Debug|Any CPU
1818
EndGlobalSection
1919
GlobalSection(SolutionProperties) = preSolution
2020
HideSolutionNode = FALSE

MovementScriptGenerator/App.config

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,33 @@
11
<?xml version="1.0" encoding="utf-8" ?>
22
<configuration>
3+
<configSections>
4+
<sectionGroup name="userSettings" type="System.Configuration.UserSettingsGroup, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" >
5+
<section name="MovementScriptGenerator.Properties.Settings" type="System.Configuration.ClientSettingsSection, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" allowExeDefinition="MachineToLocalUser" requirePermission="false" />
6+
</sectionGroup>
7+
</configSections>
38
<startup>
49
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.8" />
510
</startup>
11+
<userSettings>
12+
<MovementScriptGenerator.Properties.Settings>
13+
<setting name="GenerateScriptPath" serializeAs="String">
14+
<value />
15+
</setting>
16+
<setting name="ChainFullName" serializeAs="String">
17+
<value />
18+
</setting>
19+
<setting name="ChainDirectoryPath" serializeAs="String">
20+
<value />
21+
</setting>
22+
<setting name="WindowLocation" serializeAs="String">
23+
<value>0, 0</value>
24+
</setting>
25+
<setting name="WindowSize" serializeAs="String">
26+
<value>923, 754</value>
27+
</setting>
28+
<setting name="WindowState" serializeAs="String">
29+
<value>0</value>
30+
</setting>
31+
</MovementScriptGenerator.Properties.Settings>
32+
</userSettings>
633
</configuration>
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+

2+
namespace MovementScriptGenerator
3+
{
4+
enum ChainElementsEnum
5+
{
6+
Circle,
7+
Spiral,
8+
JTurn,
9+
Repeat
10+
}
11+
}

MovementScriptGenerator/Circle.cs

Lines changed: 0 additions & 78 deletions
This file was deleted.

MovementScriptGenerator/CircleControl.Designer.cs

Lines changed: 31 additions & 30 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 35 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,10 @@
1-
using System;
2-
using System.Collections.Generic;
3-
using System.ComponentModel;
4-
using System.Data;
5-
using System.Drawing;
6-
using System.Linq;
7-
using System.Text;
8-
using System.Threading.Tasks;
1+
using System.Collections.Generic;
92
using System.Windows.Forms;
10-
using MovementScriptGenerator.Modules;
113

124
namespace MovementScriptGenerator
135
{
146
public partial class CircleControl : UserControl
157
{
16-
private static Circle circle = new Circle();
178

189
List<string> rotationTypes = new List<string>()
1910
{
@@ -27,34 +18,58 @@ public CircleControl()
2718
initializeComboBoxes();
2819
}
2920

21+
private void CircleControl_Load(object sender, System.EventArgs e)
22+
{
23+
ScrollEventDisable scrollEventDisable = new ScrollEventDisable();
24+
scrollEventDisable.DisableScrollForChainElementControls(sender, e, Controls[0]);
25+
}
26+
3027
private void initializeComboBoxes()
3128
{
3229
cbRotation.DataSource = rotationTypes;
3330
cbRotation.SelectedIndex = 0;
3431
}
3532

36-
public MovementScript CreateMovementScript()
33+
public bool Populate(Circle original)
3734
{
38-
MovementScript movementScript = new MovementScript();
39-
bool rotateClockwise = false;
40-
if (cbRotation.SelectedIndex == 0)
35+
try
4136
{
42-
rotateClockwise = true;
37+
numFOV.Value = original.Fov;
38+
numDuration.Value = (decimal)original.Duration;
39+
numHeight.Value = (decimal)original.Height;
40+
numRotX.Value = (decimal)original.RotX;
41+
numRotZ.Value = (decimal)original.RotZ;
42+
numDistance.Value = (decimal)original.Distance;
43+
numStartingPoint.Value = (decimal)original.StartingPointDegree;
44+
numSector.Value = (decimal)original.SectorDegrees;
45+
numIterations.Value = original.Iterations;
46+
cbRotation.SelectedIndex = original.RotateClockwise ? 0 : 1;
4347
}
44-
movementScript.frames = circle.GenerateFrames(
48+
catch
49+
{
50+
return false;
51+
}
52+
53+
return true;
54+
}
55+
56+
public Circle CreateMove(string moveName)
57+
{
58+
Circle circle = new Circle(
59+
moveName,
4560
(int)numFOV.Value,
4661
(float)numDuration.Value,
62+
(float)numHeight.Value,
4763
(float)numRotX.Value,
4864
(float)numRotZ.Value,
4965
(float)numDistance.Value,
5066
(float)numStartingPoint.Value,
5167
(float)numSector.Value,
5268
(int)numIterations.Value,
53-
(float)numHeight.Value,
54-
rotateClockwise
55-
);
69+
cbRotation.SelectedIndex == 0
70+
);
5671

57-
return movementScript;
72+
return circle;
5873
}
5974
}
6075
}

0 commit comments

Comments
 (0)