commit 7e74257c35f69fde99a2a834bcef6fdbd3888f51 Author: Hoeglinger Eugen Date: Wed Jul 6 15:50:01 2022 +0200 Initialized - Testen der Sichtbarkeitssteuerung über eine eigene Klasse diff --git a/.vs/Test_SichtbarkeitSteuern.git/FileContentIndex/19b4affa-0de2-481c-92f2-b290d8d98883.vsidx b/.vs/Test_SichtbarkeitSteuern.git/FileContentIndex/19b4affa-0de2-481c-92f2-b290d8d98883.vsidx new file mode 100644 index 0000000..afe90cb Binary files /dev/null and b/.vs/Test_SichtbarkeitSteuern.git/FileContentIndex/19b4affa-0de2-481c-92f2-b290d8d98883.vsidx differ diff --git a/.vs/Test_SichtbarkeitSteuern.git/FileContentIndex/589d6c0c-d424-47ab-a9f9-834c7f54e6b6.vsidx b/.vs/Test_SichtbarkeitSteuern.git/FileContentIndex/589d6c0c-d424-47ab-a9f9-834c7f54e6b6.vsidx new file mode 100644 index 0000000..64bfb4c Binary files /dev/null and b/.vs/Test_SichtbarkeitSteuern.git/FileContentIndex/589d6c0c-d424-47ab-a9f9-834c7f54e6b6.vsidx differ diff --git a/.vs/Test_SichtbarkeitSteuern.git/FileContentIndex/5b4b5639-8364-463a-a601-fffaaa38d917.vsidx b/.vs/Test_SichtbarkeitSteuern.git/FileContentIndex/5b4b5639-8364-463a-a601-fffaaa38d917.vsidx new file mode 100644 index 0000000..6673fcb Binary files /dev/null and b/.vs/Test_SichtbarkeitSteuern.git/FileContentIndex/5b4b5639-8364-463a-a601-fffaaa38d917.vsidx differ diff --git a/.vs/Test_SichtbarkeitSteuern.git/FileContentIndex/read.lock b/.vs/Test_SichtbarkeitSteuern.git/FileContentIndex/read.lock new file mode 100644 index 0000000..e69de29 diff --git a/.vs/Test_SichtbarkeitSteuern.git/v17/.suo b/.vs/Test_SichtbarkeitSteuern.git/v17/.suo new file mode 100644 index 0000000..1052a8c Binary files /dev/null and b/.vs/Test_SichtbarkeitSteuern.git/v17/.suo differ diff --git a/Test_SichtbarkeitSteuern.git.sln b/Test_SichtbarkeitSteuern.git.sln new file mode 100644 index 0000000..c165ab9 --- /dev/null +++ b/Test_SichtbarkeitSteuern.git.sln @@ -0,0 +1,25 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 17 +VisualStudioVersion = 17.2.32616.157 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Test_SichtbarkeitSteuern", "Test_SichtbarkeitSteuern\Test_SichtbarkeitSteuern.csproj", "{09F1E934-6FE6-4572-AE14-CE76B0463513}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {09F1E934-6FE6-4572-AE14-CE76B0463513}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {09F1E934-6FE6-4572-AE14-CE76B0463513}.Debug|Any CPU.Build.0 = Debug|Any CPU + {09F1E934-6FE6-4572-AE14-CE76B0463513}.Release|Any CPU.ActiveCfg = Release|Any CPU + {09F1E934-6FE6-4572-AE14-CE76B0463513}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {EB0030E9-3B9F-4E44-8EF8-75646500CA67} + EndGlobalSection +EndGlobal diff --git a/Test_SichtbarkeitSteuern/App.config b/Test_SichtbarkeitSteuern/App.config new file mode 100644 index 0000000..5754728 --- /dev/null +++ b/Test_SichtbarkeitSteuern/App.config @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/Test_SichtbarkeitSteuern/Form1.Designer.cs b/Test_SichtbarkeitSteuern/Form1.Designer.cs new file mode 100644 index 0000000..bfe27c5 --- /dev/null +++ b/Test_SichtbarkeitSteuern/Form1.Designer.cs @@ -0,0 +1,168 @@ +namespace Test_SichtbarkeitSteuern +{ + 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.buttonDoSomething = new System.Windows.Forms.Button(); + this.groupBox1 = new System.Windows.Forms.GroupBox(); + this.checkBoxDoIt = new System.Windows.Forms.CheckBox(); + this.radioButtonEither = new System.Windows.Forms.RadioButton(); + this.radioButtonOr = new System.Windows.Forms.RadioButton(); + this.buttonAdmin = new System.Windows.Forms.Button(); + this.buttonUser = new System.Windows.Forms.Button(); + this.buttonKeyuser = new System.Windows.Forms.Button(); + this.labelStatus = new System.Windows.Forms.Label(); + this.groupBox1.SuspendLayout(); + this.SuspendLayout(); + // + // buttonDoSomething + // + this.buttonDoSomething.Location = new System.Drawing.Point(13, 13); + this.buttonDoSomething.Name = "buttonDoSomething"; + this.buttonDoSomething.Size = new System.Drawing.Size(75, 23); + this.buttonDoSomething.TabIndex = 1; + this.buttonDoSomething.Text = "Tue etwas"; + this.buttonDoSomething.UseVisualStyleBackColor = true; + // + // groupBox1 + // + this.groupBox1.Controls.Add(this.radioButtonOr); + this.groupBox1.Controls.Add(this.radioButtonEither); + this.groupBox1.Controls.Add(this.checkBoxDoIt); + this.groupBox1.Location = new System.Drawing.Point(13, 43); + this.groupBox1.Name = "groupBox1"; + this.groupBox1.Size = new System.Drawing.Size(200, 100); + this.groupBox1.TabIndex = 2; + this.groupBox1.TabStop = false; + this.groupBox1.Text = "Gruppe"; + // + // checkBoxDoIt + // + this.checkBoxDoIt.AutoSize = true; + this.checkBoxDoIt.Location = new System.Drawing.Point(7, 20); + this.checkBoxDoIt.Name = "checkBoxDoIt"; + this.checkBoxDoIt.Size = new System.Drawing.Size(53, 17); + this.checkBoxDoIt.TabIndex = 0; + this.checkBoxDoIt.Text = "Tu es"; + this.checkBoxDoIt.UseVisualStyleBackColor = true; + // + // radioButtonEither + // + this.radioButtonEither.AutoSize = true; + this.radioButtonEither.Checked = true; + this.radioButtonEither.Location = new System.Drawing.Point(7, 44); + this.radioButtonEither.Name = "radioButtonEither"; + this.radioButtonEither.Size = new System.Drawing.Size(70, 17); + this.radioButtonEither.TabIndex = 1; + this.radioButtonEither.TabStop = true; + this.radioButtonEither.Text = "Entweder"; + this.radioButtonEither.UseVisualStyleBackColor = true; + // + // radioButtonOr + // + this.radioButtonOr.AutoSize = true; + this.radioButtonOr.Location = new System.Drawing.Point(7, 68); + this.radioButtonOr.Name = "radioButtonOr"; + this.radioButtonOr.Size = new System.Drawing.Size(48, 17); + this.radioButtonOr.TabIndex = 2; + this.radioButtonOr.Text = "Oder"; + this.radioButtonOr.UseVisualStyleBackColor = true; + // + // buttonAdmin + // + this.buttonAdmin.Enabled = false; + this.buttonAdmin.Location = new System.Drawing.Point(13, 415); + this.buttonAdmin.Name = "buttonAdmin"; + this.buttonAdmin.Size = new System.Drawing.Size(75, 23); + this.buttonAdmin.TabIndex = 3; + this.buttonAdmin.Text = "Admin"; + this.buttonAdmin.UseVisualStyleBackColor = true; + this.buttonAdmin.Click += new System.EventHandler(this.buttonAdmin_Click); + // + // buttonUser + // + this.buttonUser.Location = new System.Drawing.Point(175, 415); + this.buttonUser.Name = "buttonUser"; + this.buttonUser.Size = new System.Drawing.Size(75, 23); + this.buttonUser.TabIndex = 4; + this.buttonUser.Text = "User"; + this.buttonUser.UseVisualStyleBackColor = true; + this.buttonUser.Click += new System.EventHandler(this.buttonUser_Click); + // + // buttonKeyuser + // + this.buttonKeyuser.Location = new System.Drawing.Point(94, 415); + this.buttonKeyuser.Name = "buttonKeyuser"; + this.buttonKeyuser.Size = new System.Drawing.Size(75, 23); + this.buttonKeyuser.TabIndex = 5; + this.buttonKeyuser.Text = "Keyuser"; + this.buttonKeyuser.UseVisualStyleBackColor = true; + this.buttonKeyuser.Click += new System.EventHandler(this.buttonKeyuser_Click); + // + // labelStatus + // + this.labelStatus.AutoSize = true; + this.labelStatus.Location = new System.Drawing.Point(13, 150); + this.labelStatus.Name = "labelStatus"; + this.labelStatus.Size = new System.Drawing.Size(261, 13); + this.labelStatus.TabIndex = 6; + this.labelStatus.Text = "Status: Ein Administrator darf alles sehen und alles tun"; + // + // Form1 + // + this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.ClientSize = new System.Drawing.Size(800, 450); + this.Controls.Add(this.labelStatus); + this.Controls.Add(this.buttonKeyuser); + this.Controls.Add(this.buttonUser); + this.Controls.Add(this.buttonAdmin); + this.Controls.Add(this.groupBox1); + this.Controls.Add(this.buttonDoSomething); + this.Name = "Form1"; + this.Text = "Form1"; + this.groupBox1.ResumeLayout(false); + this.groupBox1.PerformLayout(); + this.ResumeLayout(false); + this.PerformLayout(); + + } + + #endregion + private System.Windows.Forms.Button buttonDoSomething; + private System.Windows.Forms.GroupBox groupBox1; + private System.Windows.Forms.RadioButton radioButtonOr; + private System.Windows.Forms.RadioButton radioButtonEither; + private System.Windows.Forms.CheckBox checkBoxDoIt; + private System.Windows.Forms.Button buttonAdmin; + private System.Windows.Forms.Button buttonUser; + private System.Windows.Forms.Button buttonKeyuser; + private System.Windows.Forms.Label labelStatus; + } +} + diff --git a/Test_SichtbarkeitSteuern/Form1.cs b/Test_SichtbarkeitSteuern/Form1.cs new file mode 100644 index 0000000..5704192 --- /dev/null +++ b/Test_SichtbarkeitSteuern/Form1.cs @@ -0,0 +1,177 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Data; +using System.Drawing; +using System.IO; +using System.Linq; +using System.Reflection; +using System.Text; +using System.Threading.Tasks; +using System.Windows.Forms; + +namespace Test_SichtbarkeitSteuern +{ + // Die möglichen Usermodi + enum Mode + { + Admin, + Keyuser, + User + } + + public partial class Form1 : Form + { + #region Version und Copyright + // Version und Copyright + string programName = Path.GetFileNameWithoutExtension(System.Reflection.Assembly.GetExecutingAssembly().GetName().CodeBase); //Den Programmnamen auslesen + string programVersion = System.Reflection.Assembly.GetExecutingAssembly().GetName().Version.ToString(); + static object[] attributes = Assembly.GetExecutingAssembly().GetCustomAttributes(typeof(AssemblyCopyrightAttribute), false); + string copyright = GenerateCopyright(); + string icon = Application.StartupPath + "\\Info.bmp"; + + //Assembly Datum und Zeit + static DateTime value = AssemblyDateTime(); + string date = value.ToShortDateString(); + string time = value.ToLongTimeString(); + + private static DateTime AssemblyDateTime() + { + var version = System.Reflection.Assembly.GetExecutingAssembly().GetName().Version; + var buildDateTime = new DateTime(2000, 1, 1).Add(new TimeSpan(TimeSpan.TicksPerDay * version.Build + TimeSpan.TicksPerSecond * 2 * version.Revision)); + //Tage seit dem 1. Januar 2000 und Sekunden seit Mitternacht, (multiplizier mit 2 ergibt das Original) + return buildDateTime; + } + + private static string CurrentYear() + { + DateTime dtn = DateTime.Now; + return dtn.Year.ToString(); + } + + private static string StartYear() + { + string startYear = ""; + if (((AssemblyCopyrightAttribute)attributes[0]).Copyright.Contains("Copyright © ")) + { + startYear = ((AssemblyCopyrightAttribute)attributes[0]).Copyright.Replace("Copyright © ", ""); + while (startYear.StartsWith(" ")) + { + startYear = startYear.Remove(0, 1); + } + + if (startYear.Contains("-")) + { + startYear = startYear.Remove(startYear.IndexOf("-")); + } + else + { + startYear = startYear.Remove(startYear.IndexOf(" ")); + } + return startYear; + } + else + { + DateTime dtn = DateTime.Now; + return dtn.Year.ToString(); + } + } + + private static string GenerateCopyright() + { + string startYear = StartYear(); + string currentYear = CurrentYear(); + + if (startYear == currentYear) + { + return ((AssemblyCopyrightAttribute)attributes[0]).Copyright; + } + else + { + string temp = ((AssemblyCopyrightAttribute)attributes[0]).Copyright; + string start = temp.Remove(temp.IndexOf(startYear) - 1); + string end = (temp.Remove(0, temp.IndexOf(" by"))); + + return String.Concat(start, " ", startYear, "-", currentYear, end); + } + } + #endregion + + #region Programm-Info + /// + /// Contains the name of the program file + /// + public static string ProgramName { set; get; } + + /// + /// Contains the version of the program file + /// + public static string ProgramVersion { set; get; } + + /// + /// Contains the copyright notice + /// + public static string Copyright { set; get; } + + private void SetProgramInfo() + { + //Name, Version und Copyright setzen + ProgramName = programName; + ProgramVersion = programVersion; + Copyright = copyright; + } + #endregion + public Form1() + { + SetProgramInfo(); + InitializeComponent(); + } + + private void buttonAdmin_Click(object sender, EventArgs e) + { + SetVisability(Mode.Admin); + + labelStatus.Text = "Status: Ein Administrator darf alles sehen und alles tun"; + } + + private void buttonKeyuser_Click(object sender, EventArgs e) + { + SetVisability(Mode.Keyuser); + + labelStatus.Text = "Status: Ein Keyuser darf alles sehen und manches tun"; + } + + private void buttonUser_Click(object sender, EventArgs e) + { + SetVisability(Mode.User); + + labelStatus.Text = "Status: Ein User darf manches sehen und nichts tun"; + } + + private void SetVisability(Mode mode) + { + VisibilityControl.SetVisability(mode); + + buttonDoSomething.Visible = VisibilityControl.ButtonDoSomethingVisible; + buttonDoSomething.Enabled = VisibilityControl.ButtonDoSomethingEnabled; + + checkBoxDoIt.Visible = VisibilityControl.CheckBoxDoItVisible; + checkBoxDoIt.Enabled = VisibilityControl.CheckBoxDoItEnabled; + + radioButtonEither.Visible = VisibilityControl.RadioButtonEitherVisible; + radioButtonEither.Enabled = VisibilityControl.RadioButtonEitherEnabled; + + radioButtonOr.Visible = VisibilityControl.RadioButtonOrVisible; + radioButtonOr.Enabled = VisibilityControl.RadioButtonOrEnabled; + + buttonAdmin.Visible = VisibilityControl.ButtonAdminVisible; + buttonAdmin.Enabled = VisibilityControl.ButtonAdminEnabled; + + buttonKeyuser.Visible = VisibilityControl.ButtonKeyuserVisible; + buttonKeyuser.Enabled = VisibilityControl.ButtonKeyuserEnabled; + + buttonUser.Visible = VisibilityControl.ButtonUserVisible; + buttonUser.Enabled = VisibilityControl.ButtonUserEnabled; + } + } +} diff --git a/Test_SichtbarkeitSteuern/Form1.resx b/Test_SichtbarkeitSteuern/Form1.resx new file mode 100644 index 0000000..29dcb1b --- /dev/null +++ b/Test_SichtbarkeitSteuern/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/Test_SichtbarkeitSteuern/Program.cs b/Test_SichtbarkeitSteuern/Program.cs new file mode 100644 index 0000000..a2585b6 --- /dev/null +++ b/Test_SichtbarkeitSteuern/Program.cs @@ -0,0 +1,22 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Threading.Tasks; +using System.Windows.Forms; + +namespace Test_SichtbarkeitSteuern +{ + internal 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/Test_SichtbarkeitSteuern/Properties/AssemblyInfo.cs b/Test_SichtbarkeitSteuern/Properties/AssemblyInfo.cs new file mode 100644 index 0000000..ebcdc88 --- /dev/null +++ b/Test_SichtbarkeitSteuern/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("Test_SichtbarkeitSteuern")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("Test_SichtbarkeitSteuern")] +[assembly: AssemblyCopyright("Copyright © 2022 by Eugen Höglinger")] +[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("09f1e934-6fe6-4572-ae14-ce76b0463513")] + +// 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, +// indem Sie "*" wie unten gezeigt eingeben: +// [assembly: AssemblyVersion("1.0.*")] +[assembly: AssemblyVersion("1.0.*")] +//[assembly: AssemblyFileVersion("1.0.0.0")] //Wenn auskommentiert, dann gleich wie AssemblyVersion! diff --git a/Test_SichtbarkeitSteuern/Properties/Resources.Designer.cs b/Test_SichtbarkeitSteuern/Properties/Resources.Designer.cs new file mode 100644 index 0000000..bcc600f --- /dev/null +++ b/Test_SichtbarkeitSteuern/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 Test_SichtbarkeitSteuern.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("Test_SichtbarkeitSteuern.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/Test_SichtbarkeitSteuern/Properties/Resources.resx b/Test_SichtbarkeitSteuern/Properties/Resources.resx new file mode 100644 index 0000000..ffecec8 --- /dev/null +++ b/Test_SichtbarkeitSteuern/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/Test_SichtbarkeitSteuern/Properties/Settings.Designer.cs b/Test_SichtbarkeitSteuern/Properties/Settings.Designer.cs new file mode 100644 index 0000000..8cab0d2 --- /dev/null +++ b/Test_SichtbarkeitSteuern/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 Test_SichtbarkeitSteuern.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/Test_SichtbarkeitSteuern/Properties/Settings.settings b/Test_SichtbarkeitSteuern/Properties/Settings.settings new file mode 100644 index 0000000..abf36c5 --- /dev/null +++ b/Test_SichtbarkeitSteuern/Properties/Settings.settings @@ -0,0 +1,7 @@ + + + + + + + diff --git a/Test_SichtbarkeitSteuern/Test_SichtbarkeitSteuern.csproj b/Test_SichtbarkeitSteuern/Test_SichtbarkeitSteuern.csproj new file mode 100644 index 0000000..8cb3a2b --- /dev/null +++ b/Test_SichtbarkeitSteuern/Test_SichtbarkeitSteuern.csproj @@ -0,0 +1,84 @@ + + + + + Debug + AnyCPU + {09F1E934-6FE6-4572-AE14-CE76B0463513} + WinExe + Test_SichtbarkeitSteuern + Test_SichtbarkeitSteuern + v4.7.2 + 512 + true + false + + + 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/Test_SichtbarkeitSteuern/VisibilityControl.cs b/Test_SichtbarkeitSteuern/VisibilityControl.cs new file mode 100644 index 0000000..03f24d2 --- /dev/null +++ b/Test_SichtbarkeitSteuern/VisibilityControl.cs @@ -0,0 +1,125 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace Test_SichtbarkeitSteuern +{ + internal class VisibilityControl + { + #region Values + public static bool ButtonDoSomethingVisible { private set; get; } + public static bool ButtonDoSomethingEnabled { private set; get; } + + public static bool CheckBoxDoItVisible { private set; get; } + public static bool CheckBoxDoItEnabled { private set; get; } + + public static bool RadioButtonEitherVisible { private set; get; } + public static bool RadioButtonEitherEnabled { private set; get; } + + public static bool RadioButtonOrVisible { private set; get; } + public static bool RadioButtonOrEnabled { private set; get; } + + public static bool ButtonAdminVisible { private set; get; } + public static bool ButtonAdminEnabled { private set; get; } + + public static bool ButtonKeyuserVisible { private set; get; } + public static bool ButtonKeyuserEnabled { private set; get; } + + public static bool ButtonUserVisible { private set; get; } + public static bool ButtonUserEnabled { private set; get; } + #endregion + + public static void SetVisability(Mode mode) + { + switch (mode) + { + case Mode.Admin: + SetVisToAdmin(); + break; + case Mode.Keyuser: + SetVisToKeyuser(); + break; + case Mode.User: + SetVisToUser(); + break; + default: + SetVisToUser(); + break; + } + } + + private static void SetVisToAdmin() + { + ButtonDoSomethingVisible = true; + ButtonDoSomethingEnabled = true; + + CheckBoxDoItVisible = true; + CheckBoxDoItEnabled = true; + + RadioButtonEitherVisible = true; + RadioButtonEitherEnabled = true; + + RadioButtonOrVisible = true; + RadioButtonOrEnabled = true; + + ButtonAdminVisible = true; + ButtonAdminEnabled = false; + + ButtonKeyuserVisible = true; + ButtonKeyuserEnabled = true; + + ButtonUserVisible = true; + ButtonUserEnabled = true; + } + + private static void SetVisToKeyuser() + { + ButtonDoSomethingVisible = true; + ButtonDoSomethingEnabled = false; + + CheckBoxDoItVisible = true; + CheckBoxDoItEnabled = true; + + RadioButtonEitherVisible = true; + RadioButtonEitherEnabled = false; + + RadioButtonOrVisible = true; + RadioButtonOrEnabled = false; + + ButtonAdminVisible = true; + ButtonAdminEnabled = true; + + ButtonKeyuserVisible = true; + ButtonKeyuserEnabled = false; + + ButtonUserVisible = true; + ButtonUserEnabled = true; + } + + private static void SetVisToUser() + { + ButtonDoSomethingVisible = false; + ButtonDoSomethingEnabled = false; + + CheckBoxDoItVisible = true; + CheckBoxDoItEnabled = false; + + RadioButtonEitherVisible = true; + RadioButtonEitherEnabled = false; + + RadioButtonOrVisible = true; + RadioButtonOrEnabled = false; + + ButtonAdminVisible = true; + ButtonAdminEnabled = true; + + ButtonKeyuserVisible = true; + ButtonKeyuserEnabled = true; + + ButtonUserVisible = true; + ButtonUserEnabled = false; + } + } +} diff --git a/Test_SichtbarkeitSteuern/bin/Debug/Test_SichtbarkeitSteuern.exe b/Test_SichtbarkeitSteuern/bin/Debug/Test_SichtbarkeitSteuern.exe new file mode 100644 index 0000000..d25cacd Binary files /dev/null and b/Test_SichtbarkeitSteuern/bin/Debug/Test_SichtbarkeitSteuern.exe differ diff --git a/Test_SichtbarkeitSteuern/bin/Debug/Test_SichtbarkeitSteuern.exe.config b/Test_SichtbarkeitSteuern/bin/Debug/Test_SichtbarkeitSteuern.exe.config new file mode 100644 index 0000000..5754728 --- /dev/null +++ b/Test_SichtbarkeitSteuern/bin/Debug/Test_SichtbarkeitSteuern.exe.config @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/Test_SichtbarkeitSteuern/bin/Debug/Test_SichtbarkeitSteuern.pdb b/Test_SichtbarkeitSteuern/bin/Debug/Test_SichtbarkeitSteuern.pdb new file mode 100644 index 0000000..54d57e1 Binary files /dev/null and b/Test_SichtbarkeitSteuern/bin/Debug/Test_SichtbarkeitSteuern.pdb differ diff --git a/Test_SichtbarkeitSteuern/obj/Debug/.NETFramework,Version=v4.7.2.AssemblyAttributes.cs b/Test_SichtbarkeitSteuern/obj/Debug/.NETFramework,Version=v4.7.2.AssemblyAttributes.cs new file mode 100644 index 0000000..057ed7f --- /dev/null +++ b/Test_SichtbarkeitSteuern/obj/Debug/.NETFramework,Version=v4.7.2.AssemblyAttributes.cs @@ -0,0 +1,4 @@ +// +using System; +using System.Reflection; +[assembly: global::System.Runtime.Versioning.TargetFrameworkAttribute(".NETFramework,Version=v4.7.2", FrameworkDisplayName = ".NET Framework 4.7.2")] diff --git a/Test_SichtbarkeitSteuern/obj/Debug/DesignTimeResolveAssemblyReferences.cache b/Test_SichtbarkeitSteuern/obj/Debug/DesignTimeResolveAssemblyReferences.cache new file mode 100644 index 0000000..2d8a026 Binary files /dev/null and b/Test_SichtbarkeitSteuern/obj/Debug/DesignTimeResolveAssemblyReferences.cache differ diff --git a/Test_SichtbarkeitSteuern/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache b/Test_SichtbarkeitSteuern/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache new file mode 100644 index 0000000..8233716 Binary files /dev/null and b/Test_SichtbarkeitSteuern/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache differ diff --git a/Test_SichtbarkeitSteuern/obj/Debug/Test_SichtbarkeitSteuern.Form1.resources b/Test_SichtbarkeitSteuern/obj/Debug/Test_SichtbarkeitSteuern.Form1.resources new file mode 100644 index 0000000..6c05a97 Binary files /dev/null and b/Test_SichtbarkeitSteuern/obj/Debug/Test_SichtbarkeitSteuern.Form1.resources differ diff --git a/Test_SichtbarkeitSteuern/obj/Debug/Test_SichtbarkeitSteuern.Properties.Resources.resources b/Test_SichtbarkeitSteuern/obj/Debug/Test_SichtbarkeitSteuern.Properties.Resources.resources new file mode 100644 index 0000000..6c05a97 Binary files /dev/null and b/Test_SichtbarkeitSteuern/obj/Debug/Test_SichtbarkeitSteuern.Properties.Resources.resources differ diff --git a/Test_SichtbarkeitSteuern/obj/Debug/Test_SichtbarkeitSteuern.csproj.AssemblyReference.cache b/Test_SichtbarkeitSteuern/obj/Debug/Test_SichtbarkeitSteuern.csproj.AssemblyReference.cache new file mode 100644 index 0000000..5e91601 Binary files /dev/null and b/Test_SichtbarkeitSteuern/obj/Debug/Test_SichtbarkeitSteuern.csproj.AssemblyReference.cache differ diff --git a/Test_SichtbarkeitSteuern/obj/Debug/Test_SichtbarkeitSteuern.csproj.CoreCompileInputs.cache b/Test_SichtbarkeitSteuern/obj/Debug/Test_SichtbarkeitSteuern.csproj.CoreCompileInputs.cache new file mode 100644 index 0000000..f495346 --- /dev/null +++ b/Test_SichtbarkeitSteuern/obj/Debug/Test_SichtbarkeitSteuern.csproj.CoreCompileInputs.cache @@ -0,0 +1 @@ +4b25421e892f324b2f596035a6fa3b488e418361 diff --git a/Test_SichtbarkeitSteuern/obj/Debug/Test_SichtbarkeitSteuern.csproj.FileListAbsolute.txt b/Test_SichtbarkeitSteuern/obj/Debug/Test_SichtbarkeitSteuern.csproj.FileListAbsolute.txt new file mode 100644 index 0000000..7f8eb1f --- /dev/null +++ b/Test_SichtbarkeitSteuern/obj/Debug/Test_SichtbarkeitSteuern.csproj.FileListAbsolute.txt @@ -0,0 +1,11 @@ +H:\Programmieren\Git-WorkRepository\VisualStudio\_TEST\Test_SichtbarkeitSteuern.git\Test_SichtbarkeitSteuern\bin\Debug\Test_SichtbarkeitSteuern.exe.config +H:\Programmieren\Git-WorkRepository\VisualStudio\_TEST\Test_SichtbarkeitSteuern.git\Test_SichtbarkeitSteuern\bin\Debug\Test_SichtbarkeitSteuern.exe +H:\Programmieren\Git-WorkRepository\VisualStudio\_TEST\Test_SichtbarkeitSteuern.git\Test_SichtbarkeitSteuern\bin\Debug\Test_SichtbarkeitSteuern.pdb +H:\Programmieren\Git-WorkRepository\VisualStudio\_TEST\Test_SichtbarkeitSteuern.git\Test_SichtbarkeitSteuern\obj\Debug\Test_SichtbarkeitSteuern.csproj.AssemblyReference.cache +H:\Programmieren\Git-WorkRepository\VisualStudio\_TEST\Test_SichtbarkeitSteuern.git\Test_SichtbarkeitSteuern\obj\Debug\Test_SichtbarkeitSteuern.csproj.SuggestedBindingRedirects.cache +H:\Programmieren\Git-WorkRepository\VisualStudio\_TEST\Test_SichtbarkeitSteuern.git\Test_SichtbarkeitSteuern\obj\Debug\Test_SichtbarkeitSteuern.Form1.resources +H:\Programmieren\Git-WorkRepository\VisualStudio\_TEST\Test_SichtbarkeitSteuern.git\Test_SichtbarkeitSteuern\obj\Debug\Test_SichtbarkeitSteuern.Properties.Resources.resources +H:\Programmieren\Git-WorkRepository\VisualStudio\_TEST\Test_SichtbarkeitSteuern.git\Test_SichtbarkeitSteuern\obj\Debug\Test_SichtbarkeitSteuern.csproj.GenerateResource.cache +H:\Programmieren\Git-WorkRepository\VisualStudio\_TEST\Test_SichtbarkeitSteuern.git\Test_SichtbarkeitSteuern\obj\Debug\Test_SichtbarkeitSteuern.csproj.CoreCompileInputs.cache +H:\Programmieren\Git-WorkRepository\VisualStudio\_TEST\Test_SichtbarkeitSteuern.git\Test_SichtbarkeitSteuern\obj\Debug\Test_SichtbarkeitSteuern.exe +H:\Programmieren\Git-WorkRepository\VisualStudio\_TEST\Test_SichtbarkeitSteuern.git\Test_SichtbarkeitSteuern\obj\Debug\Test_SichtbarkeitSteuern.pdb diff --git a/Test_SichtbarkeitSteuern/obj/Debug/Test_SichtbarkeitSteuern.csproj.GenerateResource.cache b/Test_SichtbarkeitSteuern/obj/Debug/Test_SichtbarkeitSteuern.csproj.GenerateResource.cache new file mode 100644 index 0000000..dd2902b Binary files /dev/null and b/Test_SichtbarkeitSteuern/obj/Debug/Test_SichtbarkeitSteuern.csproj.GenerateResource.cache differ diff --git a/Test_SichtbarkeitSteuern/obj/Debug/Test_SichtbarkeitSteuern.csproj.SuggestedBindingRedirects.cache b/Test_SichtbarkeitSteuern/obj/Debug/Test_SichtbarkeitSteuern.csproj.SuggestedBindingRedirects.cache new file mode 100644 index 0000000..e69de29 diff --git a/Test_SichtbarkeitSteuern/obj/Debug/Test_SichtbarkeitSteuern.exe b/Test_SichtbarkeitSteuern/obj/Debug/Test_SichtbarkeitSteuern.exe new file mode 100644 index 0000000..d25cacd Binary files /dev/null and b/Test_SichtbarkeitSteuern/obj/Debug/Test_SichtbarkeitSteuern.exe differ diff --git a/Test_SichtbarkeitSteuern/obj/Debug/Test_SichtbarkeitSteuern.pdb b/Test_SichtbarkeitSteuern/obj/Debug/Test_SichtbarkeitSteuern.pdb new file mode 100644 index 0000000..54d57e1 Binary files /dev/null and b/Test_SichtbarkeitSteuern/obj/Debug/Test_SichtbarkeitSteuern.pdb differ diff --git a/Test_SichtbarkeitSteuern/obj/Debug/_IsIncrementalBuild b/Test_SichtbarkeitSteuern/obj/Debug/_IsIncrementalBuild new file mode 100644 index 0000000..ff132f0 --- /dev/null +++ b/Test_SichtbarkeitSteuern/obj/Debug/_IsIncrementalBuild @@ -0,0 +1 @@ +obj\Debug\\_IsIncrementalBuild