diff --git a/.vs/Superbuchhaltung/v16/.suo b/.vs/Superbuchhaltung/v16/.suo new file mode 100644 index 0000000..76f71e9 Binary files /dev/null and b/.vs/Superbuchhaltung/v16/.suo differ diff --git a/.vs/Superbuchhaltung/v16/Server/sqlite3/db.lock b/.vs/Superbuchhaltung/v16/Server/sqlite3/db.lock new file mode 100644 index 0000000..e69de29 diff --git a/.vs/Superbuchhaltung/v16/Server/sqlite3/storage.ide b/.vs/Superbuchhaltung/v16/Server/sqlite3/storage.ide new file mode 100644 index 0000000..f562a68 Binary files /dev/null and b/.vs/Superbuchhaltung/v16/Server/sqlite3/storage.ide differ diff --git a/Superbuchhaltung.sln b/Superbuchhaltung.sln new file mode 100644 index 0000000..1cc66c7 --- /dev/null +++ b/Superbuchhaltung.sln @@ -0,0 +1,25 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 16 +VisualStudioVersion = 16.0.29306.81 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Superbuchhaltung", "Superbuchhaltung\Superbuchhaltung.csproj", "{24DA9ABA-0840-41FE-84AD-C60C37A188A8}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {24DA9ABA-0840-41FE-84AD-C60C37A188A8}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {24DA9ABA-0840-41FE-84AD-C60C37A188A8}.Debug|Any CPU.Build.0 = Debug|Any CPU + {24DA9ABA-0840-41FE-84AD-C60C37A188A8}.Release|Any CPU.ActiveCfg = Release|Any CPU + {24DA9ABA-0840-41FE-84AD-C60C37A188A8}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {4F37218E-DCCA-4AA1-91C2-8739FB2AE2C6} + EndGlobalSection +EndGlobal diff --git a/Superbuchhaltung/App.config b/Superbuchhaltung/App.config new file mode 100644 index 0000000..56efbc7 --- /dev/null +++ b/Superbuchhaltung/App.config @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/Superbuchhaltung/Forms/Form1.Designer.cs b/Superbuchhaltung/Forms/Form1.Designer.cs new file mode 100644 index 0000000..a1e727b --- /dev/null +++ b/Superbuchhaltung/Forms/Form1.Designer.cs @@ -0,0 +1,268 @@ +namespace Superbuchhaltung +{ + partial class Main + { + /// + /// 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.components = new System.ComponentModel.Container(); + System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(Main)); + this.panel1 = new System.Windows.Forms.Panel(); + this.Kat0btn = new System.Windows.Forms.Button(); + this.Homebtn = new System.Windows.Forms.Button(); + this.panel2 = new System.Windows.Forms.Panel(); + this.button1 = new System.Windows.Forms.Button(); + this.P0 = new System.Windows.Forms.Panel(); + this.P0dataview = new System.Windows.Forms.DataGridView(); + this.BNummer = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.BName = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.BWert = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.toolStrip1 = new System.Windows.Forms.ToolStrip(); + this.Databtn = new System.Windows.Forms.ToolStripDropDownButton(); + this.Addentriemenuueitem = new System.Windows.Forms.ToolStripMenuItem(); + this.timer1 = new System.Windows.Forms.Timer(this.components); + this.refreshToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.modifyToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.panel1.SuspendLayout(); + this.panel2.SuspendLayout(); + this.P0.SuspendLayout(); + ((System.ComponentModel.ISupportInitialize)(this.P0dataview)).BeginInit(); + this.toolStrip1.SuspendLayout(); + this.SuspendLayout(); + // + // panel1 + // + this.panel1.BackColor = System.Drawing.Color.Green; + this.panel1.Controls.Add(this.Kat0btn); + this.panel1.Controls.Add(this.Homebtn); + this.panel1.Location = new System.Drawing.Point(1, 27); + this.panel1.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2); + this.panel1.Name = "panel1"; + this.panel1.Size = new System.Drawing.Size(197, 531); + this.panel1.TabIndex = 0; + // + // Kat0btn + // + this.Kat0btn.FlatAppearance.BorderSize = 0; + this.Kat0btn.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.Kat0btn.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.Kat0btn.ForeColor = System.Drawing.Color.White; + this.Kat0btn.Location = new System.Drawing.Point(0, 147); + this.Kat0btn.Name = "Kat0btn"; + this.Kat0btn.Size = new System.Drawing.Size(194, 54); + this.Kat0btn.TabIndex = 3; + this.Kat0btn.Text = "0. Kategorie"; + this.Kat0btn.UseVisualStyleBackColor = true; + this.Kat0btn.Click += new System.EventHandler(this.Kat0btn_Click); + // + // Homebtn + // + this.Homebtn.FlatAppearance.BorderSize = 0; + this.Homebtn.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.Homebtn.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.Homebtn.ForeColor = System.Drawing.Color.White; + this.Homebtn.Location = new System.Drawing.Point(0, 87); + this.Homebtn.Name = "Homebtn"; + this.Homebtn.Size = new System.Drawing.Size(194, 54); + this.Homebtn.TabIndex = 2; + this.Homebtn.Text = "Home"; + this.Homebtn.UseVisualStyleBackColor = true; + this.Homebtn.Click += new System.EventHandler(this.Homebtn_Click); + // + // panel2 + // + this.panel2.BackColor = System.Drawing.Color.DarkGreen; + this.panel2.Controls.Add(this.button1); + this.panel2.Location = new System.Drawing.Point(1, 0); + this.panel2.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2); + this.panel2.Name = "panel2"; + this.panel2.Size = new System.Drawing.Size(197, 109); + this.panel2.TabIndex = 1; + // + // button1 + // + this.button1.BackColor = System.Drawing.Color.Transparent; + this.button1.FlatAppearance.BorderSize = 0; + this.button1.FlatAppearance.MouseDownBackColor = System.Drawing.Color.Transparent; + this.button1.FlatAppearance.MouseOverBackColor = System.Drawing.Color.Transparent; + this.button1.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.button1.Font = new System.Drawing.Font("Bahnschrift", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.button1.ForeColor = System.Drawing.SystemColors.Control; + this.button1.Location = new System.Drawing.Point(0, 27); + this.button1.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4); + this.button1.Name = "button1"; + this.button1.Size = new System.Drawing.Size(197, 78); + this.button1.TabIndex = 2; + this.button1.Text = "Ohno Buchhaltung"; + this.button1.UseVisualStyleBackColor = false; + // + // P0 + // + this.P0.Controls.Add(this.P0dataview); + this.P0.Location = new System.Drawing.Point(200, 0); + this.P0.Name = "P0"; + this.P0.Size = new System.Drawing.Size(919, 556); + this.P0.TabIndex = 2; + // + // P0dataview + // + this.P0dataview.AllowUserToAddRows = false; + this.P0dataview.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize; + this.P0dataview.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] { + this.BNummer, + this.BName, + this.BWert}); + this.P0dataview.Location = new System.Drawing.Point(0, 28); + this.P0dataview.Name = "P0dataview"; + this.P0dataview.RowHeadersWidth = 10; + this.P0dataview.RowTemplate.Height = 24; + this.P0dataview.Size = new System.Drawing.Size(916, 531); + this.P0dataview.TabIndex = 0; + this.P0dataview.CellContentClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.DataGridView1_CellContentClick); + // + // BNummer + // + this.BNummer.HeaderText = "Kontennummer"; + this.BNummer.MinimumWidth = 6; + this.BNummer.Name = "BNummer"; + this.BNummer.ReadOnly = true; + this.BNummer.Width = 125; + // + // BName + // + this.BName.HeaderText = "Kontenname"; + this.BName.MinimumWidth = 6; + this.BName.Name = "BName"; + this.BName.ReadOnly = true; + this.BName.Width = 125; + // + // BWert + // + this.BWert.HeaderText = "Kontensumme"; + this.BWert.MinimumWidth = 6; + this.BWert.Name = "BWert"; + this.BWert.ReadOnly = true; + this.BWert.Width = 125; + // + // toolStrip1 + // + this.toolStrip1.ImageScalingSize = new System.Drawing.Size(20, 20); + this.toolStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { + this.Databtn}); + this.toolStrip1.Location = new System.Drawing.Point(0, 0); + this.toolStrip1.Name = "toolStrip1"; + this.toolStrip1.Size = new System.Drawing.Size(1120, 27); + this.toolStrip1.TabIndex = 3; + this.toolStrip1.Text = "toolStrip1"; + this.toolStrip1.ItemClicked += new System.Windows.Forms.ToolStripItemClickedEventHandler(this.ToolStrip1_ItemClicked); + // + // Databtn + // + this.Databtn.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Text; + this.Databtn.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { + this.modifyToolStripMenuItem, + this.Addentriemenuueitem, + this.refreshToolStripMenuItem}); + this.Databtn.Image = ((System.Drawing.Image)(resources.GetObject("Databtn.Image"))); + this.Databtn.ImageTransparentColor = System.Drawing.Color.Magenta; + this.Databtn.Name = "Databtn"; + this.Databtn.Size = new System.Drawing.Size(55, 24); + this.Databtn.Text = "Data"; + // + // Addentriemenuueitem + // + this.Addentriemenuueitem.Name = "Addentriemenuueitem"; + this.Addentriemenuueitem.Size = new System.Drawing.Size(224, 26); + this.Addentriemenuueitem.Text = "Addentrie"; + this.Addentriemenuueitem.Click += new System.EventHandler(this.ToolStripMenuItem1_Click); + // + // timer1 + // + this.timer1.Enabled = true; + this.timer1.Interval = 10000; + this.timer1.Tick += new System.EventHandler(this.Timer1_Tick); + // + // refreshToolStripMenuItem + // + this.refreshToolStripMenuItem.Name = "refreshToolStripMenuItem"; + this.refreshToolStripMenuItem.Size = new System.Drawing.Size(224, 26); + this.refreshToolStripMenuItem.Text = "Refresh"; + this.refreshToolStripMenuItem.Click += new System.EventHandler(this.RefreshToolStripMenuItem_Click); + // + // modifyToolStripMenuItem + // + this.modifyToolStripMenuItem.Name = "modifyToolStripMenuItem"; + this.modifyToolStripMenuItem.Size = new System.Drawing.Size(224, 26); + this.modifyToolStripMenuItem.Text = "Modify"; + this.modifyToolStripMenuItem.Click += new System.EventHandler(this.ModifyToolStripMenuItem_Click); + // + // Main + // + this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 16F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.AutoScroll = true; + this.ClientSize = new System.Drawing.Size(1120, 562); + this.Controls.Add(this.toolStrip1); + this.Controls.Add(this.P0); + this.Controls.Add(this.panel2); + this.Controls.Add(this.panel1); + this.Location = new System.Drawing.Point(200, 0); + this.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2); + this.Name = "Main"; + this.Text = "Ohno Buchaltung"; + this.Load += new System.EventHandler(this.Form1_Load); + this.panel1.ResumeLayout(false); + this.panel2.ResumeLayout(false); + this.P0.ResumeLayout(false); + ((System.ComponentModel.ISupportInitialize)(this.P0dataview)).EndInit(); + this.toolStrip1.ResumeLayout(false); + this.toolStrip1.PerformLayout(); + this.ResumeLayout(false); + this.PerformLayout(); + + } + + #endregion + + private System.Windows.Forms.Panel panel1; + private System.Windows.Forms.Panel panel2; + private System.Windows.Forms.Button button1; + private System.Windows.Forms.Button Kat0btn; + private System.Windows.Forms.Button Homebtn; + private System.Windows.Forms.Panel P0; + private System.Windows.Forms.DataGridView P0dataview; + private System.Windows.Forms.ToolStrip toolStrip1; + private System.Windows.Forms.ToolStripDropDownButton Databtn; + private System.Windows.Forms.ToolStripMenuItem Addentriemenuueitem; + private System.Windows.Forms.DataGridViewTextBoxColumn BNummer; + private System.Windows.Forms.DataGridViewTextBoxColumn BName; + private System.Windows.Forms.DataGridViewTextBoxColumn BWert; + private System.Windows.Forms.Timer timer1; + private System.Windows.Forms.ToolStripMenuItem refreshToolStripMenuItem; + private System.Windows.Forms.ToolStripMenuItem modifyToolStripMenuItem; + } +} + diff --git a/Superbuchhaltung/Forms/Form1.cs b/Superbuchhaltung/Forms/Form1.cs new file mode 100644 index 0000000..5446f0d --- /dev/null +++ b/Superbuchhaltung/Forms/Form1.cs @@ -0,0 +1,88 @@ +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; +using System.IO; + +namespace Superbuchhaltung +{ + public partial class Main : Form + { + private int Selection = 0; + public Main() + { + InitializeComponent(); + } + + private void Form1_Load(object sender, EventArgs e) + { + P0.Visible = false; + Refresh(); + + } + private void Changeview() + { + P0.Visible = false; + } + + private void Homebtn_Click(object sender, EventArgs e) + { + Changeview(); + Selection = 0; + } + + private void DataGridView1_CellContentClick(object sender, DataGridViewCellEventArgs e) + { + + } + + private void Kat0btn_Click(object sender, EventArgs e) + { + Changeview(); + P0.Visible = true; + Selection = 1; + } + private void ToolStripMenuItem1_Click(object sender, EventArgs e) + { + Addentrie f = new Addentrie(); + f.Show(); + } + + private void Timer1_Tick(object sender, EventArgs e) + { + } + + private void ToolStrip1_ItemClicked(object sender, ToolStripItemClickedEventArgs e) + { + + } + + private void RefreshToolStripMenuItem_Click(object sender, EventArgs e) + { + Refresh(); + } + public void Refresh() + { + P0dataview.Rows.Clear(); + for (int i = 0; i < 10; i++) + { + string[] file = File.ReadAllLines(@"C:\Users\Public\TestFolder\" + i + ".txt"); + foreach (string f in file) + { + P0dataview.Rows.Add(f.Split(';')); + + } + } + } + + private void ModifyToolStripMenuItem_Click(object sender, EventArgs e) + { + + } + } +} diff --git a/Superbuchhaltung/Forms/Form1.resx b/Superbuchhaltung/Forms/Form1.resx new file mode 100644 index 0000000..c822201 --- /dev/null +++ b/Superbuchhaltung/Forms/Form1.resx @@ -0,0 +1,151 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 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 + + + True + + + True + + + True + + + 16, 13 + + + + + iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8 + YQUAAAAJcEhZcwAAEnQAABJ0Ad5mH3gAAAIDSURBVDhPpZLrS5NhGMb3j4SWh0oRQVExD4gonkDpg4hG + YKxG6WBogkMZKgPNCEVJFBGdGETEvgwyO9DJE5syZw3PIlPEE9pgBCLZ5XvdMB8Ew8gXbl54nuf63dd9 + 0OGSnwCahxbPRNPAPMw9Xpg6ZmF46kZZ0xSKzJPIrhpDWsVnpBhGkKx3nAX8Pv7z1zg8OoY/cITdn4fw + bf/C0kYAN3Ma/w3gWfZL5kzTKBxjWyK2DftwI9tyMYCZKXbNHaD91bLYJrDXsYbrWfUKwJrPE9M2M1Oc + VzOOpHI7Jr376Hi9ogHqFIANO0/MmmmbmSmm9a8ze+I4MrNWAdjtoJgWcx+PSzg166yZZ8xM8XvXDix9 + c4jIqFYAjoriBV9AhEPv1mH/sonogha0afbZMMZz+yreTGyhpusHwtNNCsA5U1zS4BLxzJIfg299qO32 + Ir7UJtZfftyATqeT+8o2D8JSjQrAJblrncYL7ZJ2+bfaFnC/1S1NjL3diRat7qrO7wLRP3HjWsojBeCo + mDEo5mNjuweFGvjWg2EBhCbpkW78htSHHwRyNdmgAFzPEee2iFkzayy2OLXzT4gr6UdUnlXrullsxxQ+ + kx0g8BTA3aZlButjSTyjODq/WcQcW/B/Je4OQhLvKQDnzN1mp0nnkvAhR8VuMzNrpm1mpjgkoVwB/v8D + TgDQASA1MVpwzwAAAABJRU5ErkJggg== + + + + 140, 13 + + \ No newline at end of file diff --git a/Superbuchhaltung/Forms/Prompts/Addentrie.Designer.cs b/Superbuchhaltung/Forms/Prompts/Addentrie.Designer.cs new file mode 100644 index 0000000..97f122b --- /dev/null +++ b/Superbuchhaltung/Forms/Prompts/Addentrie.Designer.cs @@ -0,0 +1,116 @@ +namespace Superbuchhaltung +{ + partial class Addentrie + { + /// + /// 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.Kontonamebox = new System.Windows.Forms.TextBox(); + this.Kontonummerbox = new System.Windows.Forms.TextBox(); + this.Bestätigungsbutton = new System.Windows.Forms.Button(); + this.CancelBtn = new System.Windows.Forms.Button(); + this.Kontolabel1 = new System.Windows.Forms.Label(); + this.Kontolabel2 = new System.Windows.Forms.Label(); + this.SuspendLayout(); + // + // Kontonamebox + // + this.Kontonamebox.Location = new System.Drawing.Point(168, 31); + this.Kontonamebox.Name = "Kontonamebox"; + this.Kontonamebox.Size = new System.Drawing.Size(156, 22); + this.Kontonamebox.TabIndex = 1; + // + // Kontonummerbox + // + this.Kontonummerbox.Location = new System.Drawing.Point(6, 31); + this.Kontonummerbox.Name = "Kontonummerbox"; + this.Kontonummerbox.Size = new System.Drawing.Size(156, 22); + this.Kontonummerbox.TabIndex = 2; + // + // Bestätigungsbutton + // + this.Bestätigungsbutton.Location = new System.Drawing.Point(341, 12); + this.Bestätigungsbutton.Name = "Bestätigungsbutton"; + this.Bestätigungsbutton.Size = new System.Drawing.Size(108, 25); + this.Bestätigungsbutton.TabIndex = 3; + this.Bestätigungsbutton.Text = "Add"; + this.Bestätigungsbutton.UseVisualStyleBackColor = true; + this.Bestätigungsbutton.Click += new System.EventHandler(this.Bestätigungsbutton_Click); + // + // CancelBtn + // + this.CancelBtn.Location = new System.Drawing.Point(341, 43); + this.CancelBtn.Name = "CancelBtn"; + this.CancelBtn.Size = new System.Drawing.Size(108, 25); + this.CancelBtn.TabIndex = 4; + this.CancelBtn.Text = "Cancel"; + this.CancelBtn.UseVisualStyleBackColor = true; + this.CancelBtn.Click += new System.EventHandler(this.CancelBtn_Click); + // + // Kontolabel1 + // + this.Kontolabel1.Location = new System.Drawing.Point(12, 5); + this.Kontolabel1.Name = "Kontolabel1"; + this.Kontolabel1.Size = new System.Drawing.Size(100, 23); + this.Kontolabel1.TabIndex = 0; + this.Kontolabel1.Text = "Kontonummer"; + // + // Kontolabel2 + // + this.Kontolabel2.Location = new System.Drawing.Point(195, 5); + this.Kontolabel2.Name = "Kontolabel2"; + this.Kontolabel2.Size = new System.Drawing.Size(100, 23); + this.Kontolabel2.TabIndex = 5; + this.Kontolabel2.Text = "Kontoname"; + // + // Addentrie + // + this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 16F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.ClientSize = new System.Drawing.Size(461, 78); + this.Controls.Add(this.Kontolabel2); + this.Controls.Add(this.Kontolabel1); + this.Controls.Add(this.CancelBtn); + this.Controls.Add(this.Bestätigungsbutton); + this.Controls.Add(this.Kontonummerbox); + this.Controls.Add(this.Kontonamebox); + this.Name = "Addentrie"; + this.Text = "Addentrie"; + this.ResumeLayout(false); + this.PerformLayout(); + + } + + #endregion + + private System.Windows.Forms.TextBox Kontonamebox; + private System.Windows.Forms.TextBox Kontonummerbox; + private System.Windows.Forms.Button Bestätigungsbutton; + private System.Windows.Forms.Button CancelBtn; + private System.Windows.Forms.Label Kontolabel1; + private System.Windows.Forms.Label Kontolabel2; + } +} \ No newline at end of file diff --git a/Superbuchhaltung/Forms/Prompts/Addentrie.cs b/Superbuchhaltung/Forms/Prompts/Addentrie.cs new file mode 100644 index 0000000..79b994c --- /dev/null +++ b/Superbuchhaltung/Forms/Prompts/Addentrie.cs @@ -0,0 +1,66 @@ +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; +using System.IO; + +namespace Superbuchhaltung +{ + public partial class Addentrie : Form + { + public Addentrie() + { + InitializeComponent(); + } + + private void Bestätigungsbutton_Click(object sender, EventArgs e) + { + string[] write = { Kontonummerbox.Text + ";" +Kontonamebox.Text}; + if (!Directory.Exists(@"C:\Users\Public\TestFolder\")) { + Directory.CreateDirectory(@"C:\Users\Public\TestFolder"); + } + string fi = File.ReadAllText(@"C:\Users\Public\TestFolder\" + Kontonummerbox.Text.Substring(0, 1) + @".txt"); + if (fi.IndexOf(Kontonummerbox.Text) != 0) { + + if (MessageBox.Show("Der Kontonummer Existiert bereits!\nWollen sie diese überschreiben?", "Konto existiert bereits",MessageBoxButtons.YesNo, MessageBoxIcon.Error) == DialogResult.No) goto goback; + int index = fi.IndexOf(Kontonummerbox.Text); + string sfi = fi.Substring(index,fi.Length-index); + sfi = sfi.Substring(0,sfi.IndexOf("\n")); + Console.WriteLine(sfi); + fi = fi.Replace(sfi, Kontonummerbox.Text + ";"+Kontonamebox.Text); + Console.WriteLine(fi); + File.WriteAllText(@"C:\Users\Public\TestFolder\" + Kontonummerbox.Text.Substring(0, 1) + @".txt", fi); + goto goback; + } + if (fi.Contains(Kontonamebox.Text)) { + if (MessageBox.Show("Der Kontoname Existiert bereits!\nWollen sie eine zweite Instanz erstellen?", "Konto existiert bereits", MessageBoxButtons.YesNo, MessageBoxIcon.Error) == DialogResult.No) goto goback; + } + File.AppendAllLines(@"C:\Users\Public\TestFolder\" + Kontonummerbox.Text.Substring(0,1) + @".txt", write); + goback: + FormCollection fc = Application.OpenForms; + foreach(Form frm in fc) + { + if(frm.Name == "Ohno Buchaltung") + { + frm.Refresh(); + } + } + return; + } + + private void Label1_Click(object sender, EventArgs e) + { + + } + + private void CancelBtn_Click(object sender, EventArgs e) + { + Close(); + } + } +} diff --git a/Superbuchhaltung/Forms/Prompts/Addentrie.resx b/Superbuchhaltung/Forms/Prompts/Addentrie.resx new file mode 100644 index 0000000..1af7de1 --- /dev/null +++ b/Superbuchhaltung/Forms/Prompts/Addentrie.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/Superbuchhaltung/Forms/Prompts/Modify.Designer.cs b/Superbuchhaltung/Forms/Prompts/Modify.Designer.cs new file mode 100644 index 0000000..770ed67 --- /dev/null +++ b/Superbuchhaltung/Forms/Prompts/Modify.Designer.cs @@ -0,0 +1,39 @@ +namespace Superbuchhaltung.Forms.Prompts +{ + partial class Modify + { + /// + /// 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.components = new System.ComponentModel.Container(); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.ClientSize = new System.Drawing.Size(800, 450); + this.Text = "Modify"; + } + + #endregion + } +} \ No newline at end of file diff --git a/Superbuchhaltung/Forms/Prompts/Modify.cs b/Superbuchhaltung/Forms/Prompts/Modify.cs new file mode 100644 index 0000000..d0d5c30 --- /dev/null +++ b/Superbuchhaltung/Forms/Prompts/Modify.cs @@ -0,0 +1,20 @@ +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 Superbuchhaltung.Forms.Prompts +{ + public partial class Modify : Form + { + public Modify() + { + InitializeComponent(); + } + } +} diff --git a/Superbuchhaltung/Program.cs b/Superbuchhaltung/Program.cs new file mode 100644 index 0000000..ee8635f --- /dev/null +++ b/Superbuchhaltung/Program.cs @@ -0,0 +1,22 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Threading.Tasks; +using System.Windows.Forms; + +namespace Superbuchhaltung +{ + static class Program + { + /// + /// Der Haupteinstiegspunkt für die Anwendung. + /// + [STAThread] + static void Main() + { + Application.EnableVisualStyles(); + Application.SetCompatibleTextRenderingDefault(false); + Application.Run(new Main()); + } + } +} diff --git a/Superbuchhaltung/Properties/AssemblyInfo.cs b/Superbuchhaltung/Properties/AssemblyInfo.cs new file mode 100644 index 0000000..42a8a8a --- /dev/null +++ b/Superbuchhaltung/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("Superbuchhaltung")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("Superbuchhaltung")] +[assembly: AssemblyCopyright("Copyright © 2019")] +[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("24da9aba-0840-41fe-84ad-c60c37a188a8")] + +// 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.0.0")] +[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/Superbuchhaltung/Properties/Resources.Designer.cs b/Superbuchhaltung/Properties/Resources.Designer.cs new file mode 100644 index 0000000..9405547 --- /dev/null +++ b/Superbuchhaltung/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 Superbuchhaltung.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("Superbuchhaltung.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/Superbuchhaltung/Properties/Resources.resx b/Superbuchhaltung/Properties/Resources.resx new file mode 100644 index 0000000..af7dbeb --- /dev/null +++ b/Superbuchhaltung/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/Superbuchhaltung/Properties/Settings.Designer.cs b/Superbuchhaltung/Properties/Settings.Designer.cs new file mode 100644 index 0000000..f04dd6d --- /dev/null +++ b/Superbuchhaltung/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 Superbuchhaltung.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/Superbuchhaltung/Properties/Settings.settings b/Superbuchhaltung/Properties/Settings.settings new file mode 100644 index 0000000..3964565 --- /dev/null +++ b/Superbuchhaltung/Properties/Settings.settings @@ -0,0 +1,7 @@ + + + + + + + diff --git a/Superbuchhaltung/Superbuchhaltung.csproj b/Superbuchhaltung/Superbuchhaltung.csproj new file mode 100644 index 0000000..4c40bf4 --- /dev/null +++ b/Superbuchhaltung/Superbuchhaltung.csproj @@ -0,0 +1,101 @@ + + + + + Debug + AnyCPU + {24DA9ABA-0840-41FE-84AD-C60C37A188A8} + WinExe + Superbuchhaltung + Superbuchhaltung + v4.7.2 + 512 + true + true + + + AnyCPU + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + + + AnyCPU + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + + + + + + + + + + + + + + + + + Form + + + Form1.cs + + + Form + + + Addentrie.cs + + + Form + + + Modify.cs + + + + + Form1.cs + + + Addentrie.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/Superbuchhaltung/bin/Debug/Superbuchhaltung.exe b/Superbuchhaltung/bin/Debug/Superbuchhaltung.exe new file mode 100644 index 0000000..9d5aba7 Binary files /dev/null and b/Superbuchhaltung/bin/Debug/Superbuchhaltung.exe differ diff --git a/Superbuchhaltung/bin/Debug/Superbuchhaltung.exe.config b/Superbuchhaltung/bin/Debug/Superbuchhaltung.exe.config new file mode 100644 index 0000000..56efbc7 --- /dev/null +++ b/Superbuchhaltung/bin/Debug/Superbuchhaltung.exe.config @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/Superbuchhaltung/bin/Debug/Superbuchhaltung.pdb b/Superbuchhaltung/bin/Debug/Superbuchhaltung.pdb new file mode 100644 index 0000000..fd7910c Binary files /dev/null and b/Superbuchhaltung/bin/Debug/Superbuchhaltung.pdb differ diff --git a/Superbuchhaltung/obj/Debug/DesignTimeResolveAssemblyReferences.cache b/Superbuchhaltung/obj/Debug/DesignTimeResolveAssemblyReferences.cache new file mode 100644 index 0000000..d277094 Binary files /dev/null and b/Superbuchhaltung/obj/Debug/DesignTimeResolveAssemblyReferences.cache differ diff --git a/Superbuchhaltung/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache b/Superbuchhaltung/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache new file mode 100644 index 0000000..33b15f3 Binary files /dev/null and b/Superbuchhaltung/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache differ diff --git a/Superbuchhaltung/obj/Debug/Superbuchhaltung.Addentrie.resources b/Superbuchhaltung/obj/Debug/Superbuchhaltung.Addentrie.resources new file mode 100644 index 0000000..6c05a97 Binary files /dev/null and b/Superbuchhaltung/obj/Debug/Superbuchhaltung.Addentrie.resources differ diff --git a/Superbuchhaltung/obj/Debug/Superbuchhaltung.Main.resources b/Superbuchhaltung/obj/Debug/Superbuchhaltung.Main.resources new file mode 100644 index 0000000..511998e Binary files /dev/null and b/Superbuchhaltung/obj/Debug/Superbuchhaltung.Main.resources differ diff --git a/Superbuchhaltung/obj/Debug/Superbuchhaltung.Properties.Resources.resources b/Superbuchhaltung/obj/Debug/Superbuchhaltung.Properties.Resources.resources new file mode 100644 index 0000000..6c05a97 Binary files /dev/null and b/Superbuchhaltung/obj/Debug/Superbuchhaltung.Properties.Resources.resources differ diff --git a/Superbuchhaltung/obj/Debug/Superbuchhaltung.csproj.CoreCompileInputs.cache b/Superbuchhaltung/obj/Debug/Superbuchhaltung.csproj.CoreCompileInputs.cache new file mode 100644 index 0000000..1f63a0d --- /dev/null +++ b/Superbuchhaltung/obj/Debug/Superbuchhaltung.csproj.CoreCompileInputs.cache @@ -0,0 +1 @@ +ad54fd440adbad0df441a5d0251fc94313fb0cb6 diff --git a/Superbuchhaltung/obj/Debug/Superbuchhaltung.csproj.FileListAbsolute.txt b/Superbuchhaltung/obj/Debug/Superbuchhaltung.csproj.FileListAbsolute.txt new file mode 100644 index 0000000..d52b428 --- /dev/null +++ b/Superbuchhaltung/obj/Debug/Superbuchhaltung.csproj.FileListAbsolute.txt @@ -0,0 +1,11 @@ +C:\Users\Stefan Kössner\source\repos\Superbuchhaltung\Superbuchhaltung\bin\Debug\Superbuchhaltung.exe.config +C:\Users\Stefan Kössner\source\repos\Superbuchhaltung\Superbuchhaltung\bin\Debug\Superbuchhaltung.exe +C:\Users\Stefan Kössner\source\repos\Superbuchhaltung\Superbuchhaltung\bin\Debug\Superbuchhaltung.pdb +C:\Users\Stefan Kössner\source\repos\Superbuchhaltung\Superbuchhaltung\obj\Debug\Superbuchhaltung.Properties.Resources.resources +C:\Users\Stefan Kössner\source\repos\Superbuchhaltung\Superbuchhaltung\obj\Debug\Superbuchhaltung.csproj.GenerateResource.cache +C:\Users\Stefan Kössner\source\repos\Superbuchhaltung\Superbuchhaltung\obj\Debug\Superbuchhaltung.csproj.CoreCompileInputs.cache +C:\Users\Stefan Kössner\source\repos\Superbuchhaltung\Superbuchhaltung\obj\Debug\Superbuchhaltung.exe +C:\Users\Stefan Kössner\source\repos\Superbuchhaltung\Superbuchhaltung\obj\Debug\Superbuchhaltung.pdb +C:\Users\Stefan Kössner\source\repos\Superbuchhaltung\Superbuchhaltung\obj\Debug\Superbuchhaltung.Main.resources +C:\Users\Stefan Kössner\source\repos\Superbuchhaltung\Superbuchhaltung\obj\Debug\Superbuchhaltung.Addentrie.resources +C:\Users\Stefan Kössner\source\repos\Superbuchhaltung\Superbuchhaltung\obj\Debug\Superbuchhaltung.csprojAssemblyReference.cache diff --git a/Superbuchhaltung/obj/Debug/Superbuchhaltung.csproj.GenerateResource.cache b/Superbuchhaltung/obj/Debug/Superbuchhaltung.csproj.GenerateResource.cache new file mode 100644 index 0000000..a3787d2 Binary files /dev/null and b/Superbuchhaltung/obj/Debug/Superbuchhaltung.csproj.GenerateResource.cache differ diff --git a/Superbuchhaltung/obj/Debug/Superbuchhaltung.csprojAssemblyReference.cache b/Superbuchhaltung/obj/Debug/Superbuchhaltung.csprojAssemblyReference.cache new file mode 100644 index 0000000..e3f6cf1 Binary files /dev/null and b/Superbuchhaltung/obj/Debug/Superbuchhaltung.csprojAssemblyReference.cache differ diff --git a/Superbuchhaltung/obj/Debug/Superbuchhaltung.exe b/Superbuchhaltung/obj/Debug/Superbuchhaltung.exe new file mode 100644 index 0000000..9d5aba7 Binary files /dev/null and b/Superbuchhaltung/obj/Debug/Superbuchhaltung.exe differ diff --git a/Superbuchhaltung/obj/Debug/Superbuchhaltung.pdb b/Superbuchhaltung/obj/Debug/Superbuchhaltung.pdb new file mode 100644 index 0000000..fd7910c Binary files /dev/null and b/Superbuchhaltung/obj/Debug/Superbuchhaltung.pdb differ