Added Scaling

This commit is contained in:
Stefan
2019-12-02 20:45:14 +01:00
parent 2169fddc3f
commit 136df98dfa
14 changed files with 117 additions and 94 deletions
Binary file not shown.
Binary file not shown.
+82 -73
View File
@@ -35,33 +35,36 @@
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.PH = new System.Windows.Forms.Panel();
this.PHdataview = new System.Windows.Forms.DataGridView();
this.toolStrip1 = new System.Windows.Forms.ToolStrip();
this.Databtn = new System.Windows.Forms.ToolStripDropDownButton();
this.modifyToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.Addentriemenuueitem = new System.Windows.Forms.ToolStripMenuItem();
this.refreshToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.timer1 = new System.Windows.Forms.Timer(this.components);
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.PH.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.PHdataview)).BeginInit();
this.toolStrip1.SuspendLayout();
this.SuspendLayout();
//
// panel1
//
this.panel1.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
| System.Windows.Forms.AnchorStyles.Left)));
this.panel1.AutoSize = true;
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.Size = new System.Drawing.Size(197, 532);
this.panel1.TabIndex = 0;
//
// Kat0btn
@@ -119,53 +122,35 @@
this.button1.Text = "Ohno Buchhaltung";
this.button1.UseVisualStyleBackColor = false;
//
// P0
// PH
//
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;
this.PH.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
| System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.PH.Controls.Add(this.PHdataview);
this.PH.Location = new System.Drawing.Point(200, 0);
this.PH.Name = "PH";
this.PH.Size = new System.Drawing.Size(919, 556);
this.PH.TabIndex = 2;
//
// P0dataview
// PHdataview
//
this.P0dataview.AllowUserToAddRows = false;
this.P0dataview.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
this.P0dataview.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] {
this.PHdataview.AllowUserToAddRows = false;
this.PHdataview.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
| System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.PHdataview.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
this.PHdataview.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;
this.PHdataview.Location = new System.Drawing.Point(0, 28);
this.PHdataview.Name = "PHdataview";
this.PHdataview.RowHeadersWidth = 10;
this.PHdataview.RowTemplate.Height = 24;
this.PHdataview.Size = new System.Drawing.Size(916, 531);
this.PHdataview.TabIndex = 0;
this.PHdataview.CellContentClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.DataGridView1_CellContentClick);
//
// toolStrip1
//
@@ -192,41 +177,65 @@
this.Databtn.Size = new System.Drawing.Size(55, 24);
this.Databtn.Text = "Data";
//
// modifyToolStripMenuItem
//
this.modifyToolStripMenuItem.Name = "modifyToolStripMenuItem";
this.modifyToolStripMenuItem.Size = new System.Drawing.Size(158, 26);
this.modifyToolStripMenuItem.Text = "Modify";
this.modifyToolStripMenuItem.Click += new System.EventHandler(this.ModifyToolStripMenuItem_Click);
//
// Addentriemenuueitem
//
this.Addentriemenuueitem.Name = "Addentriemenuueitem";
this.Addentriemenuueitem.Size = new System.Drawing.Size(224, 26);
this.Addentriemenuueitem.Size = new System.Drawing.Size(158, 26);
this.Addentriemenuueitem.Text = "Addentrie";
this.Addentriemenuueitem.Click += new System.EventHandler(this.ToolStripMenuItem1_Click);
//
// refreshToolStripMenuItem
//
this.refreshToolStripMenuItem.Name = "refreshToolStripMenuItem";
this.refreshToolStripMenuItem.Size = new System.Drawing.Size(158, 26);
this.refreshToolStripMenuItem.Text = "Refresh";
this.refreshToolStripMenuItem.Click += new System.EventHandler(this.RefreshToolStripMenuItem_Click);
//
// timer1
//
this.timer1.Enabled = true;
this.timer1.Interval = 10000;
this.timer1.Tick += new System.EventHandler(this.Timer1_Tick);
//
// refreshToolStripMenuItem
// BNummer
//
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);
this.BNummer.HeaderText = "Kontennummer";
this.BNummer.MinimumWidth = 6;
this.BNummer.Name = "BNummer";
this.BNummer.ReadOnly = true;
this.BNummer.Width = 125;
//
// modifyToolStripMenuItem
// BName
//
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);
this.BName.HeaderText = "Kontenname";
this.BName.MinimumWidth = 6;
this.BName.Name = "BName";
this.BName.ReadOnly = true;
this.BName.Width = 512;
//
// BWert
//
this.BWert.HeaderText = "Kontensumme";
this.BWert.MinimumWidth = 6;
this.BWert.Name = "BWert";
this.BWert.ReadOnly = true;
this.BWert.Width = 125;
//
// Main
//
this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 16F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.AutoScaleDimensions = new System.Drawing.SizeF(120F, 120F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Dpi;
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.PH);
this.Controls.Add(this.panel2);
this.Controls.Add(this.panel1);
this.Location = new System.Drawing.Point(200, 0);
@@ -236,8 +245,8 @@
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.PH.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)(this.PHdataview)).EndInit();
this.toolStrip1.ResumeLayout(false);
this.toolStrip1.PerformLayout();
this.ResumeLayout(false);
@@ -252,17 +261,17 @@
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.Panel PH;
private System.Windows.Forms.DataGridView PHdataview;
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;
private System.Windows.Forms.DataGridViewTextBoxColumn BNummer;
private System.Windows.Forms.DataGridViewTextBoxColumn BName;
private System.Windows.Forms.DataGridViewTextBoxColumn BWert;
}
}
+14 -11
View File
@@ -21,18 +21,19 @@ namespace Superbuchhaltung
private void Form1_Load(object sender, EventArgs e)
{
P0.Visible = false;
Refresh();
//PH.Visible = false;
Reloadview();
}
private void Changeview()
{
P0.Visible = false;
PH.Visible = false;
}
private void Homebtn_Click(object sender, EventArgs e)
{
Changeview();
PH.Visible = true;
Selection = 0;
}
@@ -44,7 +45,6 @@ namespace Superbuchhaltung
private void Kat0btn_Click(object sender, EventArgs e)
{
Changeview();
P0.Visible = true;
Selection = 1;
}
private void ToolStripMenuItem1_Click(object sender, EventArgs e)
@@ -64,18 +64,21 @@ namespace Superbuchhaltung
private void RefreshToolStripMenuItem_Click(object sender, EventArgs e)
{
Refresh();
Reloadview();
}
public void Refresh()
public void Reloadview()
{
P0dataview.Rows.Clear();
for (int i = 0; i < 10; i++)
if (Selection == 0)
{
string[] file = File.ReadAllLines(@"C:\Users\Public\TestFolder\" + i + ".txt");
foreach (string f in file)
PHdataview.Rows.Clear();
for (int i = 0; i < 10; i++)
{
P0dataview.Rows.Add(f.Split(';'));
string[] file = File.ReadAllLines(@"C:\Users\Public\TestFolder\" + i + ".txt");
foreach (string f in file)
{
PHdataview.Rows.Add(f.Split(';'));
}
}
}
}
+1
View File
@@ -99,6 +99,7 @@
this.Controls.Add(this.Kontonamebox);
this.Name = "Addentrie";
this.Text = "Addentrie";
this.Load += new System.EventHandler(this.Addentrie_Load);
this.ResumeLayout(false);
this.PerformLayout();
+8 -9
View File
@@ -41,15 +41,9 @@ namespace Superbuchhaltung
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();
}
}
goback:
Main m = new Main();
m.Reloadview();
return;
}
@@ -62,5 +56,10 @@ namespace Superbuchhaltung
{
Close();
}
private void Addentrie_Load(object sender, EventArgs e)
{
}
}
}
Binary file not shown.
Binary file not shown.
@@ -1 +1 @@
ad54fd440adbad0df441a5d0251fc94313fb0cb6
cfd3e8f2fcc198ad011582ee7adf4d72bf319ead
@@ -9,3 +9,14 @@ C:\Users\Stefan Kössner\source\repos\Superbuchhaltung\Superbuchhaltung\obj\Debu
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
C:\Users\stefa\Documents\Gitgh\Superbuchhaltung\Superbuchhaltung\bin\Debug\Superbuchhaltung.exe.config
C:\Users\stefa\Documents\Gitgh\Superbuchhaltung\Superbuchhaltung\bin\Debug\Superbuchhaltung.exe
C:\Users\stefa\Documents\Gitgh\Superbuchhaltung\Superbuchhaltung\bin\Debug\Superbuchhaltung.pdb
C:\Users\stefa\Documents\Gitgh\Superbuchhaltung\Superbuchhaltung\obj\Debug\Superbuchhaltung.csprojAssemblyReference.cache
C:\Users\stefa\Documents\Gitgh\Superbuchhaltung\Superbuchhaltung\obj\Debug\Superbuchhaltung.Main.resources
C:\Users\stefa\Documents\Gitgh\Superbuchhaltung\Superbuchhaltung\obj\Debug\Superbuchhaltung.Addentrie.resources
C:\Users\stefa\Documents\Gitgh\Superbuchhaltung\Superbuchhaltung\obj\Debug\Superbuchhaltung.Properties.Resources.resources
C:\Users\stefa\Documents\Gitgh\Superbuchhaltung\Superbuchhaltung\obj\Debug\Superbuchhaltung.csproj.GenerateResource.cache
C:\Users\stefa\Documents\Gitgh\Superbuchhaltung\Superbuchhaltung\obj\Debug\Superbuchhaltung.csproj.CoreCompileInputs.cache
C:\Users\stefa\Documents\Gitgh\Superbuchhaltung\Superbuchhaltung\obj\Debug\Superbuchhaltung.exe
C:\Users\stefa\Documents\Gitgh\Superbuchhaltung\Superbuchhaltung\obj\Debug\Superbuchhaltung.pdb
Binary file not shown.
Binary file not shown.