diff --git a/ConsoleAppDotCore/ConsoleAppDotCore.sln b/ConsoleAppDotCore/ConsoleAppDotCore.sln new file mode 100644 index 0000000..b908b49 --- /dev/null +++ b/ConsoleAppDotCore/ConsoleAppDotCore.sln @@ -0,0 +1,25 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 16 +VisualStudioVersion = 16.0.28803.352 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ConsoleAppDotCore", "ConsoleAppDotCore\ConsoleAppDotCore.csproj", "{924D4C81-89C9-46DA-901B-DD8FF8565779}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {924D4C81-89C9-46DA-901B-DD8FF8565779}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {924D4C81-89C9-46DA-901B-DD8FF8565779}.Debug|Any CPU.Build.0 = Debug|Any CPU + {924D4C81-89C9-46DA-901B-DD8FF8565779}.Release|Any CPU.ActiveCfg = Release|Any CPU + {924D4C81-89C9-46DA-901B-DD8FF8565779}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {D5361926-C00D-4A27-897E-5D0FC99AB9D1} + EndGlobalSection +EndGlobal diff --git a/ConsoleAppDotCore/ConsoleAppDotCore/ConsoleAppDotCore.csproj b/ConsoleAppDotCore/ConsoleAppDotCore/ConsoleAppDotCore.csproj new file mode 100644 index 0000000..21dff5c --- /dev/null +++ b/ConsoleAppDotCore/ConsoleAppDotCore/ConsoleAppDotCore.csproj @@ -0,0 +1,8 @@ + + + + Exe + netcoreapp2.2 + + + diff --git a/ConsoleAppDotCore/ConsoleAppDotCore/Program.cs b/ConsoleAppDotCore/ConsoleAppDotCore/Program.cs new file mode 100644 index 0000000..7e35c19 --- /dev/null +++ b/ConsoleAppDotCore/ConsoleAppDotCore/Program.cs @@ -0,0 +1,30 @@ +using System; +using System.Globalization; + +namespace ConsoleAppDotCore +{ + class Program + { + + public static object Name { get; set; } = "Hendrik"; + + static void Main(string[] args) + { + Console.WriteLine("Hello World!"); + + int y = 4; + + string s = Name?.ToString(); + + Console.WriteLine(s); + + + Console.WriteLine( nameof(y)+ ": " + y); + + + + + Console.ReadLine(); + } + } +} diff --git a/Snake/Snake.sln b/Snake/Snake.sln new file mode 100644 index 0000000..12a8fb2 --- /dev/null +++ b/Snake/Snake.sln @@ -0,0 +1,25 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 16 +VisualStudioVersion = 16.0.28803.352 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Snake", "Snake\Snake.csproj", "{F6629CD7-2952-49DD-B72F-05F4767CFC29}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {F6629CD7-2952-49DD-B72F-05F4767CFC29}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {F6629CD7-2952-49DD-B72F-05F4767CFC29}.Debug|Any CPU.Build.0 = Debug|Any CPU + {F6629CD7-2952-49DD-B72F-05F4767CFC29}.Release|Any CPU.ActiveCfg = Release|Any CPU + {F6629CD7-2952-49DD-B72F-05F4767CFC29}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {170B0253-5F30-46F7-B29B-C4CB9324CBC7} + EndGlobalSection +EndGlobal diff --git a/Snake/Snake/App.config b/Snake/Snake/App.config new file mode 100644 index 0000000..56efbc7 --- /dev/null +++ b/Snake/Snake/App.config @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/Snake/Snake/Form1.Designer.cs b/Snake/Snake/Form1.Designer.cs new file mode 100644 index 0000000..2806095 --- /dev/null +++ b/Snake/Snake/Form1.Designer.cs @@ -0,0 +1,62 @@ +namespace Snake +{ + partial class Form1 + { + /// + /// Required designer variable. + /// + private System.ComponentModel.IContainer components = null; + + /// + /// Clean up any resources being used. + /// + /// true if managed resources should be disposed; otherwise, false. + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Windows Form Designer generated code + + /// + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// + private void InitializeComponent() + { + this.panel1 = new System.Windows.Forms.Panel(); + this.SuspendLayout(); + // + // panel1 + // + this.panel1.Location = new System.Drawing.Point(-4, -2); + this.panel1.Name = "panel1"; + this.panel1.Size = new System.Drawing.Size(799, 383); + this.panel1.TabIndex = 0; + this.panel1.Paint += new System.Windows.Forms.PaintEventHandler(this.Panel1_Paint); + // + // Form1 + // + this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.ClientSize = new System.Drawing.Size(794, 378); + this.Controls.Add(this.panel1); + this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedToolWindow; + this.MaximumSize = new System.Drawing.Size(1280, 720); + this.Name = "Form1"; + this.Text = "Form1"; + this.Load += new System.EventHandler(this.Form1_Load); + this.ResumeLayout(false); + + } + + #endregion + + private System.Windows.Forms.Panel panel1; + } +} + diff --git a/Snake/Snake/Form1.cs b/Snake/Snake/Form1.cs new file mode 100644 index 0000000..f1a30a3 --- /dev/null +++ b/Snake/Snake/Form1.cs @@ -0,0 +1,80 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Data; +using System.Drawing; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows.Forms; + +namespace Snake +{ + public class PointSnake + { + public int x; + public int y; + + public PointSnake(int px, int py) + { + x = px; + y = py; + } + + + + } + + + + public partial class Form1 : Form + { + + + List list = new List(); + + + + + public Form1() + { + InitializeComponent(); + initSnake(); + + + + + } + + private void Form1_Load(object sender, EventArgs e) + { + + } + + public void initSnake() + { + PointSnake head = new PointSnake(400, 200); + + list.Add(head); + } + + + + private void Panel1_Paint(object sender, PaintEventArgs e) + { + Graphics graphics = e.Graphics; + + Pen _pen = new Pen(Color.Black); + + using (var p = _pen) + { + graphics.DrawRectangle(_pen, list[0].x , list[0].y , 10, 10); + + + + + + } + } + } +} diff --git a/Snake/Snake/Form1.resx b/Snake/Snake/Form1.resx new file mode 100644 index 0000000..1af7de1 --- /dev/null +++ b/Snake/Snake/Form1.resx @@ -0,0 +1,120 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + \ No newline at end of file diff --git a/Snake/Snake/Program.cs b/Snake/Snake/Program.cs new file mode 100644 index 0000000..a48ee5a --- /dev/null +++ b/Snake/Snake/Program.cs @@ -0,0 +1,22 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Threading.Tasks; +using System.Windows.Forms; + +namespace Snake +{ + static class Program + { + /// + /// The main entry point for the application. + /// + [STAThread] + static void Main() + { + Application.EnableVisualStyles(); + Application.SetCompatibleTextRenderingDefault(false); + Application.Run(new Form1()); + } + } +} diff --git a/Snake/Snake/Properties/AssemblyInfo.cs b/Snake/Snake/Properties/AssemblyInfo.cs new file mode 100644 index 0000000..ad8fddf --- /dev/null +++ b/Snake/Snake/Properties/AssemblyInfo.cs @@ -0,0 +1,36 @@ +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +// General Information about an assembly is controlled through the following +// set of attributes. Change these attribute values to modify the information +// associated with an assembly. +[assembly: AssemblyTitle("Snake")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("Microsoft")] +[assembly: AssemblyProduct("Snake")] +[assembly: AssemblyCopyright("Copyright © Microsoft 2019")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// Setting ComVisible to false makes the types in this assembly not visible +// to COM components. If you need to access a type in this assembly from +// COM, set the ComVisible attribute to true on that type. +[assembly: ComVisible(false)] + +// The following GUID is for the ID of the typelib if this project is exposed to COM +[assembly: Guid("f6629cd7-2952-49dd-b72f-05f4767cfc29")] + +// Version information for an assembly consists of the following four values: +// +// Major Version +// Minor Version +// Build Number +// Revision +// +// You can specify all the values or you can default the Build and Revision Numbers +// by using the '*' as shown below: +// [assembly: AssemblyVersion("1.0.*")] +[assembly: AssemblyVersion("1.0.0.0")] +[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/Snake/Snake/Properties/Resources.Designer.cs b/Snake/Snake/Properties/Resources.Designer.cs new file mode 100644 index 0000000..610ad68 --- /dev/null +++ b/Snake/Snake/Properties/Resources.Designer.cs @@ -0,0 +1,71 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// Runtime Version:4.0.30319.42000 +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +namespace Snake.Properties +{ + + + /// + /// A strongly-typed resource class, for looking up localized strings, etc. + /// + // This class was auto-generated by the StronglyTypedResourceBuilder + // class via a tool like ResGen or Visual Studio. + // To add or remove a member, edit your .ResX file then rerun ResGen + // with the /str option, or rebuild your VS project. + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")] + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] + internal class Resources + { + + private static global::System.Resources.ResourceManager resourceMan; + + private static global::System.Globalization.CultureInfo resourceCulture; + + [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] + internal Resources() + { + } + + /// + /// Returns the cached ResourceManager instance used by this class. + /// + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] + internal static global::System.Resources.ResourceManager ResourceManager + { + get + { + if ((resourceMan == null)) + { + global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("Snake.Properties.Resources", typeof(Resources).Assembly); + resourceMan = temp; + } + return resourceMan; + } + } + + /// + /// Overrides the current thread's CurrentUICulture property for all + /// resource lookups using this strongly typed resource class. + /// + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] + internal static global::System.Globalization.CultureInfo Culture + { + get + { + return resourceCulture; + } + set + { + resourceCulture = value; + } + } + } +} diff --git a/Snake/Snake/Properties/Resources.resx b/Snake/Snake/Properties/Resources.resx new file mode 100644 index 0000000..af7dbeb --- /dev/null +++ b/Snake/Snake/Properties/Resources.resx @@ -0,0 +1,117 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + \ No newline at end of file diff --git a/Snake/Snake/Properties/Settings.Designer.cs b/Snake/Snake/Properties/Settings.Designer.cs new file mode 100644 index 0000000..85b7623 --- /dev/null +++ b/Snake/Snake/Properties/Settings.Designer.cs @@ -0,0 +1,30 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// Runtime Version:4.0.30319.42000 +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +namespace Snake.Properties +{ + + + [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "11.0.0.0")] + internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase + { + + private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings()))); + + public static Settings Default + { + get + { + return defaultInstance; + } + } + } +} diff --git a/Snake/Snake/Properties/Settings.settings b/Snake/Snake/Properties/Settings.settings new file mode 100644 index 0000000..3964565 --- /dev/null +++ b/Snake/Snake/Properties/Settings.settings @@ -0,0 +1,7 @@ + + + + + + + diff --git a/Snake/Snake/Snake.csproj b/Snake/Snake/Snake.csproj new file mode 100644 index 0000000..0ff45e6 --- /dev/null +++ b/Snake/Snake/Snake.csproj @@ -0,0 +1,81 @@ + + + + + Debug + AnyCPU + {F6629CD7-2952-49DD-B72F-05F4767CFC29} + WinExe + Snake + Snake + v4.7.2 + 512 + true + true + + + AnyCPU + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + + + AnyCPU + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + + + + + + + + + + + + + + + + + + Form1.cs + + + + + Form1.cs + + + ResXFileCodeGenerator + Resources.Designer.cs + Designer + + + True + Resources.resx + + + SettingsSingleFileGenerator + Settings.Designer.cs + + + True + Settings.settings + True + + + + + + + \ No newline at end of file