From faa641b7d7d7931d78ac39a1c5bac2cc04dcd18a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Eugen=20H=C3=B6glinger?= Date: Wed, 26 Feb 2020 15:11:07 +0100 Subject: [PATCH] Projekt neu angelegt. --- .gitignore | 32 +++++ DynamischeForm.sln | 25 ++++ DynamischeForm/App.config | 6 + DynamischeForm/DynamischeForm.csproj | 83 ++++++++++++ DynamischeForm/Form1.Designer.cs | 89 +++++++++++++ DynamischeForm/Form1.cs | 74 +++++++++++ DynamischeForm/Form1.resx | 120 ++++++++++++++++++ DynamischeForm/Program.cs | 22 ++++ DynamischeForm/Properties/AssemblyInfo.cs | 36 ++++++ .../Properties/Resources.Designer.cs | 71 +++++++++++ DynamischeForm/Properties/Resources.resx | 117 +++++++++++++++++ .../Properties/Settings.Designer.cs | 30 +++++ DynamischeForm/Properties/Settings.settings | 7 + 13 files changed, 712 insertions(+) create mode 100644 .gitignore create mode 100644 DynamischeForm.sln create mode 100644 DynamischeForm/App.config create mode 100644 DynamischeForm/DynamischeForm.csproj create mode 100644 DynamischeForm/Form1.Designer.cs create mode 100644 DynamischeForm/Form1.cs create mode 100644 DynamischeForm/Form1.resx create mode 100644 DynamischeForm/Program.cs create mode 100644 DynamischeForm/Properties/AssemblyInfo.cs create mode 100644 DynamischeForm/Properties/Resources.Designer.cs create mode 100644 DynamischeForm/Properties/Resources.resx create mode 100644 DynamischeForm/Properties/Settings.Designer.cs create mode 100644 DynamischeForm/Properties/Settings.settings diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..5a5f80a --- /dev/null +++ b/.gitignore @@ -0,0 +1,32 @@ + +#Ignore thumbnails created by Windows +Thumbs.db +#Ignore files built by Visual Studio +*.obj +*.exe +*.pdb +*.user +*.aps +*.pch +*.vspscc +*_i.c +*_p.c +*.ncb +*.suo +*.tlb +*.tlh +*.bak +*.cache +*.ilk +*.log +[Bb]in +[Dd]ebug*/ +*.lib +*.sbr +obj/ +[Rr]elease*/ +_ReSharper*/ +[Tt]est[Rr]esult* +.vs/ +#Nuget packages folder +packages/ diff --git a/DynamischeForm.sln b/DynamischeForm.sln new file mode 100644 index 0000000..5e46c7a --- /dev/null +++ b/DynamischeForm.sln @@ -0,0 +1,25 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio 15 +VisualStudioVersion = 15.0.28010.2036 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "DynamischeForm", "DynamischeForm\DynamischeForm.csproj", "{7978B0AF-94DB-440E-9582-8A062E5AEADB}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {7978B0AF-94DB-440E-9582-8A062E5AEADB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {7978B0AF-94DB-440E-9582-8A062E5AEADB}.Debug|Any CPU.Build.0 = Debug|Any CPU + {7978B0AF-94DB-440E-9582-8A062E5AEADB}.Release|Any CPU.ActiveCfg = Release|Any CPU + {7978B0AF-94DB-440E-9582-8A062E5AEADB}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {F1221351-BEE9-49BB-BE81-B24CA1404FC7} + EndGlobalSection +EndGlobal diff --git a/DynamischeForm/App.config b/DynamischeForm/App.config new file mode 100644 index 0000000..731f6de --- /dev/null +++ b/DynamischeForm/App.config @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/DynamischeForm/DynamischeForm.csproj b/DynamischeForm/DynamischeForm.csproj new file mode 100644 index 0000000..5faad79 --- /dev/null +++ b/DynamischeForm/DynamischeForm.csproj @@ -0,0 +1,83 @@ + + + + + Debug + AnyCPU + {7978B0AF-94DB-440E-9582-8A062E5AEADB} + WinExe + DynamischeForm + DynamischeForm + v4.6.1 + 512 + true + true + + + AnyCPU + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + + + AnyCPU + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + + + + + + + + + + + + + + + + + Form + + + 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 diff --git a/DynamischeForm/Form1.Designer.cs b/DynamischeForm/Form1.Designer.cs new file mode 100644 index 0000000..e20c882 --- /dev/null +++ b/DynamischeForm/Form1.Designer.cs @@ -0,0 +1,89 @@ +namespace DynamischeForm +{ + partial class Form1 + { + /// + /// Erforderliche Designervariable. + /// + private System.ComponentModel.IContainer components = null; + + /// + /// Verwendete Ressourcen bereinigen. + /// + /// True, wenn verwaltete Ressourcen gelöscht werden sollen; andernfalls False. + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Vom Windows Form-Designer generierter Code + + /// + /// Erforderliche Methode für die Designerunterstützung. + /// Der Inhalt der Methode darf nicht mit dem Code-Editor geändert werden. + /// + private void InitializeComponent() + { + this.labelDyn = new System.Windows.Forms.Label(); + this.buttonStart = new System.Windows.Forms.Button(); + this.buttonChangeResolution = new System.Windows.Forms.Button(); + this.SuspendLayout(); + // + // labelDyn + // + this.labelDyn.Location = new System.Drawing.Point(12, 9); + this.labelDyn.Name = "labelDyn"; + this.labelDyn.Size = new System.Drawing.Size(376, 203); + this.labelDyn.TabIndex = 0; + this.labelDyn.Text = "OOOOOOOOO=OOOOOOOOO=OOOOOOOOO=OOOOOOOOO=OOOOOOOOO=OOOOOOOOO=\r\na\r\na\r\na\r\n5\r\nA\r\nA\r\nA" + + "\r\nA\r\n0\r\n1\r\n2\r\n3\r\n4\r\n5\r\n6"; + // + // buttonStart + // + this.buttonStart.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); + this.buttonStart.Location = new System.Drawing.Point(13, 215); + this.buttonStart.Name = "buttonStart"; + this.buttonStart.Size = new System.Drawing.Size(75, 23); + this.buttonStart.TabIndex = 1; + this.buttonStart.Text = "Start"; + this.buttonStart.UseVisualStyleBackColor = true; + this.buttonStart.Click += new System.EventHandler(this.buttonStart_Click); + // + // buttonChangeResolution + // + this.buttonChangeResolution.Location = new System.Drawing.Point(260, 215); + this.buttonChangeResolution.Name = "buttonChangeResolution"; + this.buttonChangeResolution.Size = new System.Drawing.Size(128, 23); + this.buttonChangeResolution.TabIndex = 2; + this.buttonChangeResolution.Text = "Change Resolution"; + this.buttonChangeResolution.UseVisualStyleBackColor = true; + this.buttonChangeResolution.Click += new System.EventHandler(this.buttonChangeResolution_Click); + // + // Form1 + // + this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.ClientSize = new System.Drawing.Size(400, 250); + this.Controls.Add(this.buttonChangeResolution); + this.Controls.Add(this.buttonStart); + this.Controls.Add(this.labelDyn); + this.MaximumSize = new System.Drawing.Size(408, 281); + this.MinimumSize = new System.Drawing.Size(200, 85); + this.Name = "Form1"; + this.Text = "Form1"; + this.ResumeLayout(false); + + } + + #endregion + + private System.Windows.Forms.Label labelDyn; + private System.Windows.Forms.Button buttonStart; + private System.Windows.Forms.Button buttonChangeResolution; + } +} + diff --git a/DynamischeForm/Form1.cs b/DynamischeForm/Form1.cs new file mode 100644 index 0000000..e6d1228 --- /dev/null +++ b/DynamischeForm/Form1.cs @@ -0,0 +1,74 @@ +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 DynamischeForm +{ + public partial class Form1 : Form + { + public Form1() + { + InitializeComponent(); + } + + enum Resolution + { + Mini, + Midi, + Maxi + } + + private void buttonStart_Click(object sender, EventArgs e) + { + string text = "123 45678 90 abcd efghijk lmnop qrst uvw xyz 123 45678 90 abcd efghijk lmnop qrst uvw xyz 123 45678 90 abcd efghijk lmnop qrst uvw xyz\n2\n3"; + + //SetResolution(Resolution.Maxi); + this.WindowState = FormWindowState.Normal; + this.Size = new System.Drawing.Size(1024,768); + + + labelDyn.Width = this.Width - 33; + labelDyn.Height = this.Height - 78; + labelDyn.Text = text; + labelDyn.Refresh(); + } + + private void buttonChangeResolution_Click(object sender, EventArgs e) + { + this.Size = new Size(1024, 768); + } + + private void SetResolution(Resolution resolution) + { + switch (resolution) + { + case Resolution.Mini: + //this.Width = 480; + //this.Height = 360; + this.Size = new Size(480, 360); + break; + case Resolution.Midi: + //this.Width = 640; + //this.Height = 480; + this.Size = new Size(640, 480); + break; + case Resolution.Maxi: + //this.Width = 1024; + //this.Height = 768; + this.Size = new Size(1024, 768); + break; + default: + //this.Width = 480; + //this.Height = 360; + this.Size = new Size(480, 360); + break; + } + } + } +} diff --git a/DynamischeForm/Form1.resx b/DynamischeForm/Form1.resx new file mode 100644 index 0000000..1af7de1 --- /dev/null +++ b/DynamischeForm/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/DynamischeForm/Program.cs b/DynamischeForm/Program.cs new file mode 100644 index 0000000..9657b5e --- /dev/null +++ b/DynamischeForm/Program.cs @@ -0,0 +1,22 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Threading.Tasks; +using System.Windows.Forms; + +namespace DynamischeForm +{ + static class Program + { + /// + /// Der Haupteinstiegspunkt für die Anwendung. + /// + [STAThread] + static void Main() + { + Application.EnableVisualStyles(); + Application.SetCompatibleTextRenderingDefault(false); + Application.Run(new Form1()); + } + } +} diff --git a/DynamischeForm/Properties/AssemblyInfo.cs b/DynamischeForm/Properties/AssemblyInfo.cs new file mode 100644 index 0000000..f9e20ec --- /dev/null +++ b/DynamischeForm/Properties/AssemblyInfo.cs @@ -0,0 +1,36 @@ +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +// Allgemeine Informationen über eine Assembly werden über die folgenden +// Attribute gesteuert. Ändern Sie diese Attributwerte, um die Informationen zu ändern, +// die einer Assembly zugeordnet sind. +[assembly: AssemblyTitle("DynamischeForm")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("DynamischeForm")] +[assembly: AssemblyCopyright("Copyright © 2018")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// Durch Festlegen von ComVisible auf FALSE werden die Typen in dieser Assembly +// für COM-Komponenten unsichtbar. Wenn Sie auf einen Typ in dieser Assembly von +// COM aus zugreifen müssen, sollten Sie das ComVisible-Attribut für diesen Typ auf "True" festlegen. +[assembly: ComVisible(false)] + +// Die folgende GUID bestimmt die ID der Typbibliothek, wenn dieses Projekt für COM verfügbar gemacht wird +[assembly: Guid("7978b0af-94db-440e-9582-8a062e5aeadb")] + +// Versionsinformationen für eine Assembly bestehen aus den folgenden vier Werten: +// +// Hauptversion +// Nebenversion +// Buildnummer +// Revision +// +// Sie können alle Werte angeben oder Standardwerte für die Build- und Revisionsnummern verwenden, +// übernehmen, indem Sie "*" eingeben: +// [assembly: AssemblyVersion("1.0.*")] +[assembly: AssemblyVersion("1.0.0.0")] +[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/DynamischeForm/Properties/Resources.Designer.cs b/DynamischeForm/Properties/Resources.Designer.cs new file mode 100644 index 0000000..7c6098a --- /dev/null +++ b/DynamischeForm/Properties/Resources.Designer.cs @@ -0,0 +1,71 @@ +//------------------------------------------------------------------------------ +// +// Dieser Code wurde von einem Tool generiert. +// Laufzeitversion: 4.0.30319.42000 +// +// Änderungen an dieser Datei können fehlerhaftes Verhalten verursachen und gehen verloren, wenn +// der Code neu generiert wird. +// +//------------------------------------------------------------------------------ + +namespace DynamischeForm.Properties +{ + + + /// + /// Eine stark typisierte Ressourcenklasse zum Suchen von lokalisierten Zeichenfolgen usw. + /// + // Diese Klasse wurde von der StronglyTypedResourceBuilder-Klasse + // über ein Tool wie ResGen oder Visual Studio automatisch generiert. + // Um einen Member hinzuzufügen oder zu entfernen, bearbeiten Sie die .ResX-Datei und führen dann ResGen + // mit der Option /str erneut aus, oder erstellen Sie Ihr VS-Projekt neu. + [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() + { + } + + /// + /// Gibt die zwischengespeicherte ResourceManager-Instanz zurück, die von dieser Klasse verwendet wird. + /// + [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("DynamischeForm.Properties.Resources", typeof(Resources).Assembly); + resourceMan = temp; + } + return resourceMan; + } + } + + /// + /// Überschreibt die CurrentUICulture-Eigenschaft des aktuellen Threads für alle + /// Ressourcenlookups, die diese stark typisierte Ressourcenklasse verwenden. + /// + [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/DynamischeForm/Properties/Resources.resx b/DynamischeForm/Properties/Resources.resx new file mode 100644 index 0000000..af7dbeb --- /dev/null +++ b/DynamischeForm/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/DynamischeForm/Properties/Settings.Designer.cs b/DynamischeForm/Properties/Settings.Designer.cs new file mode 100644 index 0000000..8fb1e66 --- /dev/null +++ b/DynamischeForm/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 DynamischeForm.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/DynamischeForm/Properties/Settings.settings b/DynamischeForm/Properties/Settings.settings new file mode 100644 index 0000000..3964565 --- /dev/null +++ b/DynamischeForm/Properties/Settings.settings @@ -0,0 +1,7 @@ + + + + + + +