Skip to content

Commit 7e67e01

Browse files
authored
Add files via upload
1 parent fe49e2e commit 7e67e01

31 files changed

+2063
-0
lines changed

AOS_Project.sln

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
2+
Microsoft Visual Studio Solution File, Format Version 12.00
3+
# Visual Studio Version 16
4+
VisualStudioVersion = 16.0.30413.136
5+
MinimumVisualStudioVersion = 10.0.40219.1
6+
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AOS_Project", "AOS_Project\AOS_Project.csproj", "{BAC04A28-64BB-421D-A30F-A73E8B702EAE}"
7+
EndProject
8+
Global
9+
GlobalSection(SolutionConfigurationPlatforms) = preSolution
10+
Debug|Any CPU = Debug|Any CPU
11+
Release|Any CPU = Release|Any CPU
12+
EndGlobalSection
13+
GlobalSection(ProjectConfigurationPlatforms) = postSolution
14+
{BAC04A28-64BB-421D-A30F-A73E8B702EAE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
15+
{BAC04A28-64BB-421D-A30F-A73E8B702EAE}.Debug|Any CPU.Build.0 = Debug|Any CPU
16+
{BAC04A28-64BB-421D-A30F-A73E8B702EAE}.Release|Any CPU.ActiveCfg = Release|Any CPU
17+
{BAC04A28-64BB-421D-A30F-A73E8B702EAE}.Release|Any CPU.Build.0 = Release|Any CPU
18+
EndGlobalSection
19+
GlobalSection(SolutionProperties) = preSolution
20+
HideSolutionNode = FALSE
21+
EndGlobalSection
22+
GlobalSection(ExtensibilityGlobals) = postSolution
23+
SolutionGuid = {61278000-4AB5-444A-B44A-6A7190712398}
24+
EndGlobalSection
25+
EndGlobal

AOS_Project/AOS_Project.csproj

Lines changed: 97 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,97 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
3+
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
4+
<PropertyGroup>
5+
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
6+
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
7+
<ProjectGuid>{BAC04A28-64BB-421D-A30F-A73E8B702EAE}</ProjectGuid>
8+
<OutputType>WinExe</OutputType>
9+
<RootNamespace>AOS_Project</RootNamespace>
10+
<AssemblyName>AOS_Project</AssemblyName>
11+
<TargetFrameworkVersion>v4.7.2</TargetFrameworkVersion>
12+
<FileAlignment>512</FileAlignment>
13+
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
14+
<Deterministic>true</Deterministic>
15+
</PropertyGroup>
16+
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
17+
<PlatformTarget>AnyCPU</PlatformTarget>
18+
<DebugSymbols>true</DebugSymbols>
19+
<DebugType>full</DebugType>
20+
<Optimize>false</Optimize>
21+
<OutputPath>bin\Debug\</OutputPath>
22+
<DefineConstants>DEBUG;TRACE</DefineConstants>
23+
<ErrorReport>prompt</ErrorReport>
24+
<WarningLevel>4</WarningLevel>
25+
</PropertyGroup>
26+
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
27+
<PlatformTarget>AnyCPU</PlatformTarget>
28+
<DebugType>pdbonly</DebugType>
29+
<Optimize>true</Optimize>
30+
<OutputPath>bin\Release\</OutputPath>
31+
<DefineConstants>TRACE</DefineConstants>
32+
<ErrorReport>prompt</ErrorReport>
33+
<WarningLevel>4</WarningLevel>
34+
</PropertyGroup>
35+
<PropertyGroup>
36+
<ApplicationManifest>app.manifest</ApplicationManifest>
37+
</PropertyGroup>
38+
<ItemGroup>
39+
<Reference Include="System" />
40+
<Reference Include="System.Core" />
41+
<Reference Include="System.Xml.Linq" />
42+
<Reference Include="System.Data.DataSetExtensions" />
43+
<Reference Include="Microsoft.CSharp" />
44+
<Reference Include="System.Data" />
45+
<Reference Include="System.Deployment" />
46+
<Reference Include="System.Drawing" />
47+
<Reference Include="System.Net.Http" />
48+
<Reference Include="System.Windows.Forms" />
49+
<Reference Include="System.Xml" />
50+
</ItemGroup>
51+
<ItemGroup>
52+
<Compile Include="DDALine.cs" />
53+
<Compile Include="Form1.cs">
54+
<SubType>Form</SubType>
55+
</Compile>
56+
<Compile Include="Form1.Designer.cs">
57+
<DependentUpon>Form1.cs</DependentUpon>
58+
</Compile>
59+
<Compile Include="Form2.cs">
60+
<SubType>Form</SubType>
61+
</Compile>
62+
<Compile Include="Form2.Designer.cs">
63+
<DependentUpon>Form2.cs</DependentUpon>
64+
</Compile>
65+
<Compile Include="Program.cs" />
66+
<Compile Include="Properties\AssemblyInfo.cs" />
67+
<EmbeddedResource Include="Form1.resx">
68+
<DependentUpon>Form1.cs</DependentUpon>
69+
</EmbeddedResource>
70+
<EmbeddedResource Include="Form2.resx">
71+
<DependentUpon>Form2.cs</DependentUpon>
72+
</EmbeddedResource>
73+
<EmbeddedResource Include="Properties\Resources.resx">
74+
<Generator>ResXFileCodeGenerator</Generator>
75+
<LastGenOutput>Resources.Designer.cs</LastGenOutput>
76+
<SubType>Designer</SubType>
77+
</EmbeddedResource>
78+
<Compile Include="Properties\Resources.Designer.cs">
79+
<AutoGen>True</AutoGen>
80+
<DependentUpon>Resources.resx</DependentUpon>
81+
</Compile>
82+
<None Include="app.manifest" />
83+
<None Include="Properties\Settings.settings">
84+
<Generator>SettingsSingleFileGenerator</Generator>
85+
<LastGenOutput>Settings.Designer.cs</LastGenOutput>
86+
</None>
87+
<Compile Include="Properties\Settings.Designer.cs">
88+
<AutoGen>True</AutoGen>
89+
<DependentUpon>Settings.settings</DependentUpon>
90+
<DesignTimeSharedInput>True</DesignTimeSharedInput>
91+
</Compile>
92+
</ItemGroup>
93+
<ItemGroup>
94+
<None Include="App.config" />
95+
</ItemGroup>
96+
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
97+
</Project>

AOS_Project/App.config

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
<?xml version="1.0" encoding="utf-8" ?>
2+
<configuration>
3+
<startup>
4+
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.7.2" />
5+
</startup>
6+
<System.Windows.Forms.ApplicationConfigurationSection>
7+
<add key="DpiAwareness" value="PerMonitorV2" />
8+
<add key="EnableWindowsFormsHighDpiAutoResizing" value="false" />
9+
</System.Windows.Forms.ApplicationConfigurationSection>
10+
</configuration>

AOS_Project/DDALine.cs

Lines changed: 75 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,75 @@
1+
using System;
2+
using System.Collections.Generic;
3+
using System.Linq;
4+
using System.Text;
5+
using System.Threading.Tasks;
6+
using System.Drawing;
7+
8+
namespace Graphics_Assignments
9+
{
10+
class DDALine
11+
{
12+
public float xs, ys, xe, ye;
13+
public bool flagStop = false;
14+
15+
public DDALine(float xst, float yst, float xend, float yend)
16+
{
17+
xs = xst;
18+
ys = yst;
19+
xe = xend;
20+
ye = yend;
21+
}
22+
23+
public PointF getNextPoint(float cx, float cy, int speed)
24+
{
25+
float dx = xe - xs;
26+
float dy = ye - ys;
27+
float m = dy / dx;
28+
if (Math.Abs(dx) > Math.Abs(dy))
29+
{
30+
if (xs < xe)
31+
{
32+
cx += speed;
33+
cy += m * speed;
34+
if (cx >= xe)
35+
{
36+
flagStop = true;
37+
}
38+
}
39+
else
40+
{
41+
cx -= speed;
42+
cy -= m * speed;
43+
if (cx <= xe)
44+
{
45+
flagStop = true;
46+
}
47+
}
48+
49+
}
50+
if (Math.Abs(dx) < Math.Abs(dy))
51+
{
52+
if (ys < ye)
53+
{
54+
cy += speed;
55+
cx += (1 / m) * speed;
56+
if (cy >= ye)
57+
{
58+
flagStop = true;
59+
}
60+
}
61+
else
62+
{
63+
cy -= speed;
64+
cx -= (1 / m) * speed;
65+
if (cy <= ye)
66+
{
67+
flagStop = true;
68+
}
69+
}
70+
}
71+
PointF pnn = new PointF(cx, cy);
72+
return pnn;
73+
}
74+
}
75+
}

0 commit comments

Comments
 (0)