From e64c2cb4c0d4347fcbe75b2711fffea952e2c7fe Mon Sep 17 00:00:00 2001 From: BRNSystems Date: Wed, 4 Aug 2021 07:54:55 +0200 Subject: [PATCH] Add project files. --- Form1.Designer.cs | 80 ++++++++++++++++++++ Form1.cs | 37 +++++++++ Form1.resx | 60 +++++++++++++++ HusaMK.3.csproj | 39 ++++++++++ HusaMK.3.sln | 25 +++++++ Program.cs | 87 ++++++++++++++++++++++ Properties/Resources.Designer.cs | 73 ++++++++++++++++++ Properties/Resources.resx | 124 +++++++++++++++++++++++++++++++ Resources/smol_brn.png | Bin 0 -> 9136 bytes 9 files changed, 525 insertions(+) create mode 100644 Form1.Designer.cs create mode 100644 Form1.cs create mode 100644 Form1.resx create mode 100644 HusaMK.3.csproj create mode 100644 HusaMK.3.sln create mode 100644 Program.cs create mode 100644 Properties/Resources.Designer.cs create mode 100644 Properties/Resources.resx create mode 100644 Resources/smol_brn.png diff --git a/Form1.Designer.cs b/Form1.Designer.cs new file mode 100644 index 0000000..506f313 --- /dev/null +++ b/Form1.Designer.cs @@ -0,0 +1,80 @@ + +namespace HusaMK._3 +{ + 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.pictureBox1 = new System.Windows.Forms.PictureBox(); + ((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).BeginInit(); + this.SuspendLayout(); + // + // pictureBox1 + // + this.pictureBox1.BackColor = System.Drawing.Color.Transparent; + this.pictureBox1.InitialImage = global::HusaMK._3.Properties.Resources.smol_brn; + this.pictureBox1.Location = new System.Drawing.Point(12, 12); + this.pictureBox1.Name = "pictureBox1"; + this.pictureBox1.Size = new System.Drawing.Size(160, 58); + this.pictureBox1.TabIndex = 0; + this.pictureBox1.TabStop = false; + // + // Form1 + // + this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 15F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.AutoValidate = System.Windows.Forms.AutoValidate.Disable; + this.BackColor = System.Drawing.Color.White; + this.BackgroundImageLayout = System.Windows.Forms.ImageLayout.None; + this.CausesValidation = false; + this.ClientSize = new System.Drawing.Size(960, 497); + this.ControlBox = false; + this.Controls.Add(this.pictureBox1); + this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None; + this.ImeMode = System.Windows.Forms.ImeMode.Off; + this.MaximizeBox = false; + this.MinimizeBox = false; + this.Name = "Form1"; + this.ShowIcon = false; + this.ShowInTaskbar = false; + this.SizeGripStyle = System.Windows.Forms.SizeGripStyle.Hide; + this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen; + this.TopMost = true; + this.TransparencyKey = System.Drawing.Color.White; + this.WindowState = System.Windows.Forms.FormWindowState.Maximized; + this.Load += new System.EventHandler(this.Form1_Load); + ((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).EndInit(); + this.ResumeLayout(false); + + } + + #endregion + + private System.Windows.Forms.PictureBox pictureBox1; + } +} + diff --git a/Form1.cs b/Form1.cs new file mode 100644 index 0000000..3ea1317 --- /dev/null +++ b/Form1.cs @@ -0,0 +1,37 @@ +using Microsoft.CodeAnalysis; +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 HusaMK._3 +{ + public partial class Form1 : Form + { + public volatile PictureBox obrazok; + public Size plocha; + public bool ready = false; + public Form1() + { + InitializeComponent(); + } + + + private void Form1_Load(object sender, EventArgs e) + { + plocha = new Size(Screen.FromControl(this).Bounds.Width, Screen.FromControl(this).Bounds.Height); + this.TabStop = false; + this.AllowTransparency = true; + this.Size = plocha; + pictureBox1.Image = HusaMK._3.Properties.Resources.smol_brn; + this.FormBorderStyle = FormBorderStyle.None; + obrazok = pictureBox1; + this.ready = true; + } + } +} diff --git a/Form1.resx b/Form1.resx new file mode 100644 index 0000000..f298a7b --- /dev/null +++ b/Form1.resx @@ -0,0 +1,60 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 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/HusaMK.3.csproj b/HusaMK.3.csproj new file mode 100644 index 0000000..476ffa0 --- /dev/null +++ b/HusaMK.3.csproj @@ -0,0 +1,39 @@ + + + + WinExe + net5.0-windows + HusaMK._3 + true + + + + + True + True + Resources.resx + + + + + + ResXFileCodeGenerator + Resources.Designer.cs + + + + + + + + + + + + + + Never + + + + \ No newline at end of file diff --git a/HusaMK.3.sln b/HusaMK.3.sln new file mode 100644 index 0000000..83382fb --- /dev/null +++ b/HusaMK.3.sln @@ -0,0 +1,25 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 16 +VisualStudioVersion = 16.0.31515.178 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "HusaMK.3", "HusaMK.3.csproj", "{5D7EEAC9-C8AF-4BDE-B49B-E3B0EB9811B0}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {5D7EEAC9-C8AF-4BDE-B49B-E3B0EB9811B0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {5D7EEAC9-C8AF-4BDE-B49B-E3B0EB9811B0}.Debug|Any CPU.Build.0 = Debug|Any CPU + {5D7EEAC9-C8AF-4BDE-B49B-E3B0EB9811B0}.Release|Any CPU.ActiveCfg = Release|Any CPU + {5D7EEAC9-C8AF-4BDE-B49B-E3B0EB9811B0}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {DE71C24F-509D-4FB0-AE5F-861BD28ECE8C} + EndGlobalSection +EndGlobal diff --git a/Program.cs b/Program.cs new file mode 100644 index 0000000..dc4427f --- /dev/null +++ b/Program.cs @@ -0,0 +1,87 @@ +using System; +using System.Collections.Generic; +using System.Diagnostics; +using System.Drawing; +using System.Linq; +using System.Threading; +using System.Threading.Tasks; +using System.Windows.Forms; + +namespace HusaMK._3 +{ + static class Program + { + /// + /// The main entry point for the application. + /// + /// + + public static volatile Form1 form; + + public const int smoothingx = 10; + + static void runform(object data) + { + + Application.Run((Form1) data); + + } + + + static void movechar(object data) + { + Form1 formx = (Form1)data; + int xdif; + int ydif; + int xpos = 0; + int ypos = 0; + int steps = 1; + while (true) + { + xdif = formx.obrazok.Location.X - Cursor.Position.X; + ydif = formx.obrazok.Location.Y - Cursor.Position.Y; + + + if (xdif > 0 && xdif > 5) + { + xpos = formx.obrazok.Location.X - steps; + } + else if (xdif < 0 && xdif < -5) + { + xpos = formx.obrazok.Location.X + steps; + } + if (ydif > 0 && xdif > 5) + { + ypos = formx.obrazok.Location.Y - steps; + } + else if (ydif < 0 && ydif < -5) + { + ypos = formx.obrazok.Location.Y + steps; + } + formx.obrazok.Location = new Point(xpos, ypos); + Thread.Sleep(1); + } + + } + + static void Main() + { + Application.SetHighDpiMode(HighDpiMode.SystemAware); + Application.EnableVisualStyles(); + Application.SetCompatibleTextRenderingDefault(false); + Control.CheckForIllegalCrossThreadCalls = false; // daj sa vypchat c# + + form = new Form1(); + Thread thread = new Thread(runform); + Thread movchr = new Thread(movechar); + thread.Start(form); + + + while (!form.ready) { + Thread.Sleep(10); + } + movchr.Start(form); + + } + } +} diff --git a/Properties/Resources.Designer.cs b/Properties/Resources.Designer.cs new file mode 100644 index 0000000..00af444 --- /dev/null +++ b/Properties/Resources.Designer.cs @@ -0,0 +1,73 @@ +//------------------------------------------------------------------------------ +// +// 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 HusaMK._3.Properties { + using System; + + + /// + /// 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", "16.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 (object.ReferenceEquals(resourceMan, null)) { + global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("HusaMK._3.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; + } + } + + /// + /// Looks up a localized resource of type System.Drawing.Bitmap. + /// + internal static System.Drawing.Bitmap smol_brn { + get { + object obj = ResourceManager.GetObject("smol_brn", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + } +} diff --git a/Properties/Resources.resx b/Properties/Resources.resx new file mode 100644 index 0000000..41815c7 --- /dev/null +++ b/Properties/Resources.resx @@ -0,0 +1,124 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 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 + + + + ..\Resources\smol_brn.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + \ No newline at end of file diff --git a/Resources/smol_brn.png b/Resources/smol_brn.png new file mode 100644 index 0000000000000000000000000000000000000000..7d7199ec0b6fee3fde94f92abf0d168c5c3223b1 GIT binary patch literal 9136 zcmeAS@N?(olHy`uVBq!ia0y~yU|7Jwz+lC}%)r3F@Me(}1A|a`RY*ihP-3}4K~a8M zW=^U?No7H*LTW{38UsVct+g{VCn;O@x&8kvQp}R4aN@B*%$a9w#eXUb!c$z+TzgAz zm$FRxo?nvt{~KONU-U@()Sesj z8;_+gm~@~2QhLMB$V}G+l~A8AMk(sx~@j=-{beIBJ#OEPnqNIsrqS# zcddB9AM-@zxG&EQixaEjo?oh%Vq~X%P{IDDW?gjXkIUNoGJ9*!rjJp2+~39So!x(J(!9#!#&^Buc9uUnHAh0{W3SAghxQ*o z_cPyp{m<`YujYE@i12Sq5+vVQ)<4mbne;AP=4A4N_4Doj?~Lb`n{xcjT;6jT?*-Ie z3P;PiKP@bI==AXC*{w@{8#AaS9l? z`~AY_`s9ASwOww(9#xH|;CW_pH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