Meine Stadionliste

master
Felix 2 years ago
commit 5521e63fe8

3
.idea/.gitignore vendored

@ -0,0 +1,3 @@
# Default ignored files
/shelf/
/workspace.xml

@ -0,0 +1,21 @@
<?xml version="1.0" encoding="UTF-8"?>
<module type="PYTHON_MODULE" version="4">
<component name="NewModuleRootManager">
<content url="file://$MODULE_DIR$">
<excludeFolder url="file://$MODULE_DIR$/Webparser/venv/Lib/site-packages/pip/_vendor/colorama" />
<excludeFolder url="file://$MODULE_DIR$/Webparser/venv/Lib/site-packages/pip/_vendor/msgpack" />
<excludeFolder url="file://$MODULE_DIR$/Webparser/venv/Lib/site-packages/pip/_vendor/packaging" />
<excludeFolder url="file://$MODULE_DIR$/Webparser/venv/Lib/site-packages/pip/_vendor/pkg_resources" />
<excludeFolder url="file://$MODULE_DIR$/Webparser/venv/Lib/site-packages/pip/_vendor/progress" />
<excludeFolder url="file://$MODULE_DIR$/Webparser/venv/Lib/site-packages/pip/_vendor/requests" />
<excludeFolder url="file://$MODULE_DIR$/Webparser/venv/Lib/site-packages/pip/_vendor/tenacity" />
<excludeFolder url="file://$MODULE_DIR$/Webparser/venv/Lib/site-packages/pip/_vendor/webencodings" />
</content>
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
</component>
<component name="PyDocumentationSettings">
<option name="format" value="PLAIN" />
<option name="myDocStringFormat" value="Plain" />
</component>
</module>

@ -0,0 +1,333 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Newtonsoft.Json;
using System.Windows.Forms;
using System.Drawing;
using System.Net;
using System.Diagnostics;
namespace Meine_Stadionliste_GUI
{
public class JsonParser
{
public string pfad;
public Datenbank db;
private string Get_Programmpfad()
{
string[] Programmpfad_Liste = System.Reflection.Assembly.GetExecutingAssembly().Location.Split('\\');
string Programmpfad = "";
for (int i = 0; i < Programmpfad_Liste.Length - 1; i++)
{
Programmpfad += Programmpfad_Liste[i] + '\\';
if (Programmpfad_Liste[i] == "Meine_Stadionliste") break;
}
return Programmpfad;
}
public JsonParser()
{
pfad = Get_Programmpfad();
Laden();
}
public void Laden()
{
string jsontext = System.IO.File.ReadAllText(pfad + "data.json");
db = JsonConvert.DeserializeObject<Datenbank>(jsontext);
}
public void Speichern()
{
string text = JsonConvert.SerializeObject(db, Formatting.Indented);
System.IO.File.WriteAllLines(pfad + "kopie.json", text.Split('\n'));
}
// Datenbank-Abfragen
public jsonInterf getVerein(string name)
{
if (!db.Vereine.ContainsKey(name)) Laden();
return db.Vereine[name];
}
public jsonInterf getSpiel(string name)
{
if (!db.Spiele.ContainsKey(name)) Laden();
return db.Spiele[name];
}
public jsonInterf getStadion(string name)
{
if (!db.Stadien.ContainsKey(name)) Laden();
return db.Stadien[name];
}
public jsonInterf getSpieler(string name)
{
if (!db.Spieler.ContainsKey(name)) Laden();
return db.Spieler[name];
}
public jsonInterf getSchiri(string name)
{
if (!db.Schiris.ContainsKey(name)) Laden();
return db.Schiris[name];
}
public jsonInterf getTrainer(string name)
{
if (!db.Trainer.ContainsKey(name)) Laden();
return db.Trainer[name];
}
public string getSpielerKey(string name, bool wdh = false)
{
if (!wdh && (name == "" || name.Contains("EIGENTOR"))) return "";
var keys = db.Spieler.Keys.ToList();
foreach (string key in keys)
{
if (db.Spieler[key].Name == name) return key;
}
if (!wdh)
{
Laden();
return getSpielerKey(name, true);
}
return "";
}
public List<string> alleSpieleDesBenutzers(string name)
{
var ausgabe = new List<string>();
foreach (interfSpielzuweisung spielTag in db.Benutzer[name].Spiele) ausgabe.Add(spielTag.spiel);
return ausgabe;
}
public bool benutzerExistiert(string name)
{
return db.Benutzer.ContainsKey(name);
}
}
public class Datenbank
{
public Dictionary<string, interfBenutzer> Benutzer;
public Dictionary<string, interfVerein> Vereine;
public Dictionary<string, interfSpieler> Spieler;
public Dictionary<string, interfTrainer> Trainer;
public Dictionary<string, interfSchiri> Schiris;
public Dictionary<string, interfStadion> Stadien;
public Dictionary<string, interfSpielbericht> Spiele;
}
public class jsonInterf : IComparable<jsonInterf>
{
public int CompareTo(jsonInterf other)
{
Type type = GetType();
if (type == typeof(interfSpielbericht)) return ((interfSpielbericht)this).CompareTo((interfSpielbericht)other);
if (type == typeof(interfTor)) return ((interfTor)this).CompareTo((interfTor)other);
if (type == typeof(interfKarte)) return ((interfKarte)this).CompareTo((interfKarte)other);
if (type == typeof(interfSpielerwechsel)) return ((interfSpielerwechsel)this).CompareTo((interfSpielerwechsel)other);
return 0;
}
public string getName()
{
Type type = GetType();
if (type == typeof(interfVerein)) return ((interfVerein)this).Name;
if (type == typeof(interfSpieler)) return ((interfSpieler)this).Name;
if (type == typeof(interfTrainer)) return ((interfTrainer)this).Name;
if (type == typeof(interfSchiri)) return ((interfSchiri)this).Name;
if (type == typeof(interfStadion)) return ((interfStadion)this).Name;
return "";
}
}
public class interfPerson : jsonInterf
{
public string Name;
public string geb;
public List<string> nat;
public List<string> pos;
public new string getName() { return Name; }
}
public class interfSpieler : interfPerson { }
public class interfTrainer : interfPerson { }
public class interfSchiri : interfPerson { }
public class interfVerein : jsonInterf
{
public string Name;
public string Bild;
public string Land;
public new string getName() { return Name; }
}
public class interfStadion : jsonInterf
{
public string Name;
public string Stadt;
public string Land;
public int Zuschauer;
public new string getName() { return Name; }
}
public class interfBenutzer : jsonInterf
{
public List<interfSpielzuweisung> Spiele;
}
public enum Fahrzeug
{
Auto, Bus, Fahrrad, Zug, Fuß, Flugzeug, Boot, mehrere, Sonstige
};
public class interfSpielzuweisung : jsonInterf
{
public string spiel;
public string EAN;
public string Eintrittspreis;
public string Block;
public string Anfahrt;
public string Begleiter;
public Fahrzeug getFahrzeug(string s)
{
switch (s)
{
case "Auto": return Fahrzeug.Auto;
case "Bus": return Fahrzeug.Bus;
case "Fahrrad": return Fahrzeug.Fahrrad;
case "Zug": return Fahrzeug.Zug;
case "Fuß": return Fahrzeug.Fuß;
case "Flugzeug": return Fahrzeug.Flugzeug;
case "Boot": return Fahrzeug.Boot;
case "mehrere": return Fahrzeug.mehrere;
default: return Fahrzeug.Sonstige;
}
}
}
public class interfSpielbericht : jsonInterf
{
public string Heim;
public string Gast;
public string Datum;
public string Uhr;
public string erg;
public List<interfSpielerMitNummer> Heim_Start;
public List<interfSpielerMitNummer> Gast_Start;
public List<interfSpielerMitNummer> Heim_Bank;
public List<interfSpielerMitNummer> Gast_Bank;
public List<interfSpielerwechsel> Heim_Wechsel;
public List<interfSpielerwechsel> Gast_Wechsel;
public List<interfKarte> Karten;
public List<interfTor> Tore;
public string Heim_Trainer;
public string Gast_Trainer;
public string Stadion;
public int zuschauer;
public string Schiri;
public int CompareTo(interfSpielbericht other)
{
DateTime t1 = Hilfsfunktionen.getDatum(Datum, Uhr);
DateTime t2 = Hilfsfunktionen.getDatum(other.Datum, other.Uhr);
return t1.CompareTo(t2);
}
}
public class interfSpielerMitNummer : jsonInterf
{
public int nr;
public string name;
}
public class interfSpielerwechsel : jsonInterf
{
public int min;
public string aus;
public string ein;
public int CompareTo(interfSpielerwechsel other) { return min - other.min; }
}
public class interfKarte : jsonInterf
{
public int min;
public string spi;
public string typ;
public int CompareTo(interfKarte other) { return min - other.min; }
}
public class interfTor : jsonInterf
{
public string stand;
public string spi;
public int min;
public string art;
public string vorlage;
public int CompareTo(interfTor other) { return min - other.min; }
}
public static class Hilfsfunktionen
{
public static DateTime getDatum(string Datum, string Uhrzeit)
{
try
{
string[] splitted = Datum.Split('.');
int tag = int.Parse(splitted[0]);
int monat = int.Parse(splitted[1]);
int jahr = int.Parse(splitted[2]);
int stunde, minute;
try
{
splitted = Uhrzeit.Split(':');
stunde = int.Parse(splitted[0]);
minute = int.Parse(splitted[1]);
}
catch
{
stunde = 0; minute = 0;
}
return new DateTime(jahr, monat, tag, stunde, minute, 0);
}
catch
{
return new DateTime(0);
}
}
public static string GeldString(int euro, int cent)
{
euro += cent / 100; cent %= 100;
string s = euro.ToString();
if (cent < 10) { s += "0" + cent.ToString(); } else { s += cent.ToString(); }
return s;
}
public static Image GetImageFromURL(string url)
{
HttpWebRequest httpWebRequest = (HttpWebRequest)HttpWebRequest.Create(url);
HttpWebResponse httpWebReponse = (HttpWebResponse)httpWebRequest.GetResponse();
System.IO.Stream stream = httpWebReponse.GetResponseStream();
return Image.FromStream(stream);
}
public static string Python_Ausführung(string befehl, string pfad)
{
string fileName = pfad + "Webparser\\parser.py "+befehl;
Process p = new Process();
p.StartInfo = new ProcessStartInfo(pfad + @"Webparser\\venv\\Scripts\\python.exe", fileName)
{
RedirectStandardOutput = true,
UseShellExecute = false,
CreateNoWindow = true
};
p.Start();
string output = p.StandardOutput.ReadToEnd();
p.WaitForExit();
return output.Replace("\n", "").Replace("\r", "");
}
}
}

@ -0,0 +1,92 @@
namespace Meine_Stadionliste_GUI
{
partial class Form1
{
/// <summary>
/// Erforderliche Designervariable.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Verwendete Ressourcen bereinigen.
/// </summary>
/// <param name="disposing">True, wenn verwaltete Ressourcen gelöscht werden sollen; andernfalls False.</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Vom Windows Form-Designer generierter Code
/// <summary>
/// Erforderliche Methode für die Designerunterstützung.
/// Der Inhalt der Methode darf nicht mit dem Code-Editor geändert werden.
/// </summary>
private void InitializeComponent()
{
this.label1 = new System.Windows.Forms.Label();
this.textBox1 = new System.Windows.Forms.TextBox();
this.button1 = new System.Windows.Forms.Button();
this.SuspendLayout();
//
// label1
//
this.label1.AutoSize = true;
this.label1.Font = new System.Drawing.Font("Times New Roman", 13.8F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.label1.Location = new System.Drawing.Point(174, 17);
this.label1.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(114, 21);
this.label1.TabIndex = 0;
this.label1.Text = "Benutzername";
//
// textBox1
//
this.textBox1.Font = new System.Drawing.Font("Times New Roman", 12F, System.Drawing.FontStyle.Italic, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.textBox1.Location = new System.Drawing.Point(122, 55);
this.textBox1.Margin = new System.Windows.Forms.Padding(2);
this.textBox1.Name = "textBox1";
this.textBox1.Size = new System.Drawing.Size(229, 26);
this.textBox1.TabIndex = 1;
this.textBox1.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.TextBox1_KeyPress);
//
// button1
//
this.button1.Location = new System.Drawing.Point(158, 104);
this.button1.Margin = new System.Windows.Forms.Padding(2);
this.button1.Name = "button1";
this.button1.Size = new System.Drawing.Size(163, 28);
this.button1.TabIndex = 2;
this.button1.Text = "Login";
this.button1.UseVisualStyleBackColor = true;
this.button1.Click += new System.EventHandler(this.Button1_Click);
//
// Form1
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(466, 167);
this.Controls.Add(this.button1);
this.Controls.Add(this.textBox1);
this.Controls.Add(this.label1);
this.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
this.Name = "Form1";
this.Text = "Meine Stadionliste";
this.Load += new System.EventHandler(this.Form1_Load);
this.ResumeLayout(false);
this.PerformLayout();
}
#endregion
private System.Windows.Forms.Label label1;
private System.Windows.Forms.TextBox textBox1;
private System.Windows.Forms.Button button1;
}
}

@ -0,0 +1,59 @@
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 Meine_Stadionliste_GUI
{
public partial class Form1 : Form
{
private JsonParser parser;
public Form1()
{
InitializeComponent();
}
private void TextBox1_KeyPress(object sender, KeyPressEventArgs e)
{
if (e.KeyChar == 13) Button1_Click(null, null);
}
private void Button1_Click(object sender, EventArgs e)
{
string name = textBox1.Text;
if (parser.benutzerExistiert(name))
{
Visible = false;
Form2 GUI = new Form2
{
Json = parser,
Loginseite = this,
Benutzer = name
};
GUI.Visible = true;
} else
{
MessageBox.Show("Dieser Benutzer existiert nicht.");
textBox1.Focus();
}
}
private void Form1_Load(object sender, EventArgs e)
{
textBox1.Focus();
parser = new JsonParser();
// Übergangsweise
textBox1.Text = "Felix";
}
private void DataGridView1_CellValueChanged(object sender, DataGridViewCellEventArgs e)
{
MessageBox.Show("gufhdghfuihg");
}
}
}

@ -0,0 +1,120 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
</root>

@ -0,0 +1,303 @@
namespace Meine_Stadionliste_GUI
{
partial class Form2
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Windows Form Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
this.panel1 = new System.Windows.Forms.Panel();
this.label1 = new System.Windows.Forms.Label();
this.panel2 = new System.Windows.Forms.Panel();
this.dataGridView1 = new System.Windows.Forms.DataGridView();
this.Datum = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.Uhrzeit = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.W1 = new System.Windows.Forms.DataGridViewImageColumn();
this.Heimmannschaft = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.W2 = new System.Windows.Forms.DataGridViewImageColumn();
this.Gastmannschaft = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.Ergebnis = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.Stadion = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.Ort = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.Spielbericht = new System.Windows.Forms.DataGridViewButtonColumn();
this.löschen = new System.Windows.Forms.DataGridViewButtonColumn();
this.ID = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.panel3 = new System.Windows.Forms.Panel();
this.button2 = new System.Windows.Forms.Button();
this.button1 = new System.Windows.Forms.Button();
this.label2 = new System.Windows.Forms.Label();
this.panel1.SuspendLayout();
this.panel2.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.dataGridView1)).BeginInit();
this.panel3.SuspendLayout();
this.SuspendLayout();
//
// panel1
//
this.panel1.BackColor = System.Drawing.Color.PaleGreen;
this.panel1.Controls.Add(this.label1);
this.panel1.Location = new System.Drawing.Point(8, 10);
this.panel1.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
this.panel1.Name = "panel1";
this.panel1.Size = new System.Drawing.Size(1340, 55);
this.panel1.TabIndex = 0;
//
// label1
//
this.label1.AutoSize = true;
this.label1.Font = new System.Drawing.Font("Felix Titling", 24F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.label1.Location = new System.Drawing.Point(498, 8);
this.label1.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(341, 38);
this.label1.TabIndex = 0;
this.label1.Text = "Meine Stadionliste";
//
// panel2
//
this.panel2.BackColor = System.Drawing.Color.PaleGreen;
this.panel2.Controls.Add(this.dataGridView1);
this.panel2.Location = new System.Drawing.Point(9, 70);
this.panel2.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
this.panel2.Name = "panel2";
this.panel2.Size = new System.Drawing.Size(1027, 523);
this.panel2.TabIndex = 1;
//
// dataGridView1
//
this.dataGridView1.AllowUserToAddRows = false;
this.dataGridView1.AllowUserToDeleteRows = false;
this.dataGridView1.AllowUserToResizeColumns = false;
this.dataGridView1.AllowUserToResizeRows = false;
this.dataGridView1.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
this.dataGridView1.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] {
this.Datum,
this.Uhrzeit,
this.W1,
this.Heimmannschaft,
this.W2,
this.Gastmannschaft,
this.Ergebnis,
this.Stadion,
this.Ort,
this.Spielbericht,
this.löschen,
this.ID});
this.dataGridView1.Location = new System.Drawing.Point(3, 5);
this.dataGridView1.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
this.dataGridView1.Name = "dataGridView1";
this.dataGridView1.RowHeadersVisible = false;
this.dataGridView1.RowTemplate.Height = 24;
this.dataGridView1.ShowEditingIcon = false;
this.dataGridView1.Size = new System.Drawing.Size(1017, 516);
this.dataGridView1.TabIndex = 0;
//
// Datum
//
this.Datum.HeaderText = "Datum";
this.Datum.Name = "Datum";
this.Datum.ReadOnly = true;
this.Datum.Resizable = System.Windows.Forms.DataGridViewTriState.False;
this.Datum.Width = 80;
//
// Uhrzeit
//
this.Uhrzeit.HeaderText = "Uhrzeit";
this.Uhrzeit.Name = "Uhrzeit";
this.Uhrzeit.ReadOnly = true;
this.Uhrzeit.Resizable = System.Windows.Forms.DataGridViewTriState.False;
this.Uhrzeit.Width = 60;
//
// W1
//
this.W1.HeaderText = "W";
this.W1.ImageLayout = System.Windows.Forms.DataGridViewImageCellLayout.Zoom;
this.W1.Name = "W1";
this.W1.ReadOnly = true;
this.W1.Resizable = System.Windows.Forms.DataGridViewTriState.False;
this.W1.Width = 25;
//
// Heimmannschaft
//
this.Heimmannschaft.HeaderText = "Heimmannschaft";
this.Heimmannschaft.Name = "Heimmannschaft";
this.Heimmannschaft.ReadOnly = true;
this.Heimmannschaft.Resizable = System.Windows.Forms.DataGridViewTriState.False;
this.Heimmannschaft.Width = 150;
//
// W2
//
this.W2.HeaderText = "W";
this.W2.ImageLayout = System.Windows.Forms.DataGridViewImageCellLayout.Zoom;
this.W2.Name = "W2";
this.W2.ReadOnly = true;
this.W2.Resizable = System.Windows.Forms.DataGridViewTriState.False;
this.W2.Width = 25;
//
// Gastmannschaft
//
this.Gastmannschaft.HeaderText = "Gastmannschaft";
this.Gastmannschaft.Name = "Gastmannschaft";
this.Gastmannschaft.ReadOnly = true;
this.Gastmannschaft.Resizable = System.Windows.Forms.DataGridViewTriState.False;
this.Gastmannschaft.Width = 150;
//
// Ergebnis
//
this.Ergebnis.HeaderText = "Ergebnis";
this.Ergebnis.Name = "Ergebnis";
this.Ergebnis.ReadOnly = true;
this.Ergebnis.Resizable = System.Windows.Forms.DataGridViewTriState.False;
this.Ergebnis.Width = 60;
//
// Stadion
//
this.Stadion.HeaderText = "Stadion";
this.Stadion.Name = "Stadion";
this.Stadion.ReadOnly = true;
this.Stadion.Resizable = System.Windows.Forms.DataGridViewTriState.False;
this.Stadion.Width = 170;
//
// Ort
//
this.Ort.HeaderText = "Ort";
this.Ort.Name = "Ort";
this.Ort.ReadOnly = true;
this.Ort.Resizable = System.Windows.Forms.DataGridViewTriState.False;
//
// Spielbericht
//
this.Spielbericht.HeaderText = "Spielbericht";
this.Spielbericht.Name = "Spielbericht";
this.Spielbericht.ReadOnly = true;
this.Spielbericht.Resizable = System.Windows.Forms.DataGridViewTriState.False;
this.Spielbericht.Text = "Bericht";
//
// löschen
//
this.löschen.HeaderText = "löschen";
this.löschen.Name = "löschen";
this.löschen.ReadOnly = true;
this.löschen.Resizable = System.Windows.Forms.DataGridViewTriState.False;
this.löschen.Text = "X";
this.löschen.Width = 50;
//
// ID
//
this.ID.HeaderText = "id";
this.ID.MinimumWidth = 2;
this.ID.Name = "ID";
this.ID.Visible = false;
this.ID.Width = 2;
//
// panel3
//
this.panel3.BackColor = System.Drawing.Color.PaleGreen;
this.panel3.Controls.Add(this.button2);
this.panel3.Controls.Add(this.button1);
this.panel3.Controls.Add(this.label2);
this.panel3.Location = new System.Drawing.Point(1041, 70);
this.panel3.Name = "panel3";
this.panel3.Size = new System.Drawing.Size(307, 64);
this.panel3.TabIndex = 2;
//
// button2
//
this.button2.Location = new System.Drawing.Point(155, 25);
this.button2.Name = "button2";
this.button2.Size = new System.Drawing.Size(149, 36);
this.button2.TabIndex = 2;
this.button2.Text = "manuell";
this.button2.UseVisualStyleBackColor = true;
this.button2.Click += new System.EventHandler(this.Button2_Click);
//
// button1
//
this.button1.Location = new System.Drawing.Point(3, 25);
this.button1.Name = "button1";
this.button1.Size = new System.Drawing.Size(149, 36);
this.button1.TabIndex = 1;
this.button1.Text = "von weltfussball.de";
this.button1.UseVisualStyleBackColor = true;
this.button1.Click += new System.EventHandler(this.Button1_Click);
//
// label2
//
this.label2.AutoSize = true;
this.label2.Font = new System.Drawing.Font("Times New Roman", 11.25F, System.Drawing.FontStyle.Underline, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.label2.Location = new System.Drawing.Point(69, 5);
this.label2.Name = "label2";
this.label2.Size = new System.Drawing.Size(189, 17);
this.label2.TabIndex = 0;
this.label2.Text = "Neuen Spielbericht hinzufügen:";
//
// Form2
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(192)))), ((int)(((byte)(255)))), ((int)(((byte)(192)))));
this.ClientSize = new System.Drawing.Size(1355, 603);
this.Controls.Add(this.panel3);
this.Controls.Add(this.panel2);
this.Controls.Add(this.panel1);
this.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
this.Name = "Form2";
this.Text = "Meine Stadionliste";
this.FormClosed += new System.Windows.Forms.FormClosedEventHandler(this.Form2_FormClosed);
this.VisibleChanged += new System.EventHandler(this.Form2_Load);
this.panel1.ResumeLayout(false);
this.panel1.PerformLayout();
this.panel2.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)(this.dataGridView1)).EndInit();
this.panel3.ResumeLayout(false);
this.panel3.PerformLayout();
this.ResumeLayout(false);
}
#endregion
private System.Windows.Forms.Panel panel1;
private System.Windows.Forms.Label label1;
private System.Windows.Forms.Panel panel2;
private System.Windows.Forms.DataGridView dataGridView1;
private System.Windows.Forms.DataGridViewTextBoxColumn Datum;
private System.Windows.Forms.DataGridViewTextBoxColumn Uhrzeit;
private System.Windows.Forms.DataGridViewImageColumn W1;
private System.Windows.Forms.DataGridViewTextBoxColumn Heimmannschaft;
private System.Windows.Forms.DataGridViewImageColumn W2;
private System.Windows.Forms.DataGridViewTextBoxColumn Gastmannschaft;
private System.Windows.Forms.DataGridViewTextBoxColumn Ergebnis;
private System.Windows.Forms.DataGridViewTextBoxColumn Stadion;
private System.Windows.Forms.DataGridViewTextBoxColumn Ort;
private System.Windows.Forms.DataGridViewButtonColumn Spielbericht;
private System.Windows.Forms.DataGridViewButtonColumn löschen;
private System.Windows.Forms.DataGridViewTextBoxColumn ID;
private System.Windows.Forms.Panel panel3;
private System.Windows.Forms.Button button2;
private System.Windows.Forms.Button button1;
private System.Windows.Forms.Label label2;
}
}

@ -0,0 +1,81 @@
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 Meine_Stadionliste_GUI
{
public partial class Form2 : Form
{
public JsonParser Json;
public Form1 Loginseite;
public string Benutzer;
public Form2()
{
InitializeComponent();
}
public void Form2_Load(object sender, EventArgs e)
{
// Einfügen der Spielberichte
dataGridView1.Rows.Clear();
var Spielberichte = Json.alleSpieleDesBenutzers(Benutzer);
Spielberichte.Sort((s1, s2)=>-Json.getSpiel(s1).CompareTo(Json.getSpiel(s2)));
foreach (string spielname in Spielberichte)
{
var bericht = (interfSpielbericht)Json.getSpiel(spielname);
var stadion = (interfStadion)Json.getStadion(bericht.Stadion);
interfVerein heim = (interfVerein)Json.getVerein(bericht.Heim);
interfVerein gast = (interfVerein)Json.getVerein(bericht.Gast);
dataGridView1.Rows.Add(new object[]
{
bericht.Datum,
bericht.Uhr,
Hilfsfunktionen.GetImageFromURL(heim.Bild),
heim.Name,
Hilfsfunktionen.GetImageFromURL(gast.Bild),
gast.Name,
bericht.erg,
stadion.Name,
stadion.Stadt,
"Bericht",
"X",
spielname
});
}
}
private void Form2_FormClosed(object sender, FormClosedEventArgs e)
{
Loginseite.Close();
}
private void Button1_Click(object sender, EventArgs e)
{
_ = new Form3
{
GUI = this,
Benutzer = Benutzer,
Visible = true,
Pfad = Json.pfad
};
}
private void Button2_Click(object sender, EventArgs e)
{
_ = new Form4(Json)
{
GUI = this,
Benutzer = Benutzer,
Visible = true,
Pfad = Json.pfad
};
}
}
}

@ -0,0 +1,156 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<metadata name="Datum.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="Uhrzeit.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="W1.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="Heimmannschaft.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="W2.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="Gastmannschaft.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="Ergebnis.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="Stadion.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="Ort.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="Spielbericht.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="löschen.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="ID.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
</root>

@ -0,0 +1,221 @@
namespace Meine_Stadionliste_GUI
{
partial class Form3
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Windows Form Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
this.label1 = new System.Windows.Forms.Label();
this.textBox1 = new System.Windows.Forms.TextBox();
this.button1 = new System.Windows.Forms.Button();
this.label2 = new System.Windows.Forms.Label();
this.label3 = new System.Windows.Forms.Label();
this.label4 = new System.Windows.Forms.Label();
this.label5 = new System.Windows.Forms.Label();
this.label6 = new System.Windows.Forms.Label();
this.label7 = new System.Windows.Forms.Label();
this.textBox2 = new System.Windows.Forms.TextBox();
this.textBox3 = new System.Windows.Forms.TextBox();
this.textBox4 = new System.Windows.Forms.TextBox();
this.comboBox1 = new System.Windows.Forms.ComboBox();
this.textBox5 = new System.Windows.Forms.TextBox();
this.SuspendLayout();
//
// label1
//
this.label1.AutoSize = true;
this.label1.Location = new System.Drawing.Point(12, 9);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(30, 13);
this.label1.TabIndex = 0;
this.label1.Text = "Link:";
//
// textBox1
//
this.textBox1.Location = new System.Drawing.Point(48, 6);
this.textBox1.Name = "textBox1";
this.textBox1.Size = new System.Drawing.Size(537, 20);
this.textBox1.TabIndex = 1;
this.textBox1.KeyPress += new System.Windows.Forms.KeyPressEventHandler(this.TextBox1_KeyPress);
//
// button1
//
this.button1.Location = new System.Drawing.Point(219, 278);
this.button1.Name = "button1";
this.button1.Size = new System.Drawing.Size(178, 32);
this.button1.TabIndex = 2;
this.button1.Text = "Eintragen";
this.button1.UseVisualStyleBackColor = true;
this.button1.Click += new System.EventHandler(this.Button1_Click);
//
// label2
//
this.label2.AutoSize = true;
this.label2.Location = new System.Drawing.Point(12, 83);
this.label2.Name = "label2";
this.label2.Size = new System.Drawing.Size(147, 13);
this.label2.TabIndex = 3;
this.label2.Text = "Barcode auf der Eintrittskarte:";
//
// label3
//
this.label3.AutoSize = true;
this.label3.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Underline, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.label3.Location = new System.Drawing.Point(228, 45);
this.label3.Name = "label3";
this.label3.Size = new System.Drawing.Size(139, 20);
this.label3.TabIndex = 4;
this.label3.Text = "Persönliche Daten";
//
// label4
//
this.label4.AutoSize = true;
this.label4.Location = new System.Drawing.Point(12, 116);
this.label4.Name = "label4";
this.label4.Size = new System.Drawing.Size(66, 13);
this.label4.TabIndex = 5;
this.label4.Text = "Eintrittspreis:";
//
// label5
//
this.label5.AutoSize = true;
this.label5.Location = new System.Drawing.Point(12, 148);
this.label5.Name = "label5";
this.label5.Size = new System.Drawing.Size(37, 13);
this.label5.TabIndex = 6;
this.label5.Text = "Block:";
//
// label6
//
this.label6.AutoSize = true;
this.label6.Location = new System.Drawing.Point(12, 180);
this.label6.Name = "label6";
this.label6.Size = new System.Drawing.Size(44, 13);
this.label6.TabIndex = 7;
this.label6.Text = "Anfahrt:";
//
// label7
//
this.label7.AutoSize = true;
this.label7.Location = new System.Drawing.Point(13, 213);
this.label7.Name = "label7";
this.label7.Size = new System.Drawing.Size(86, 13);
this.label7.TabIndex = 8;
this.label7.Text = "Begleitpersonen:";
//
// textBox2
//
this.textBox2.Location = new System.Drawing.Point(175, 80);
this.textBox2.Name = "textBox2";
this.textBox2.Size = new System.Drawing.Size(166, 20);
this.textBox2.TabIndex = 9;
//
// textBox3
//
this.textBox3.Location = new System.Drawing.Point(175, 113);
this.textBox3.Name = "textBox3";
this.textBox3.Size = new System.Drawing.Size(166, 20);
this.textBox3.TabIndex = 10;
//
// textBox4
//
this.textBox4.Location = new System.Drawing.Point(175, 145);
this.textBox4.Name = "textBox4";
this.textBox4.Size = new System.Drawing.Size(166, 20);
this.textBox4.TabIndex = 11;
//
// comboBox1
//
this.comboBox1.FormattingEnabled = true;
this.comboBox1.Items.AddRange(new object[] {
"Auto",
"Bus",
"Fahrrad",
"Zug",
"Fuß",
"Flugzeug",
"Boot",
"mehrere",
"Sonstige"});
this.comboBox1.Location = new System.Drawing.Point(175, 177);
this.comboBox1.Name = "comboBox1";
this.comboBox1.Size = new System.Drawing.Size(166, 21);
this.comboBox1.TabIndex = 12;
//
// textBox5
//
this.textBox5.Location = new System.Drawing.Point(175, 210);
this.textBox5.Name = "textBox5";
this.textBox5.Size = new System.Drawing.Size(166, 20);
this.textBox5.TabIndex = 13;
//
// Form3
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(597, 322);
this.Controls.Add(this.textBox5);
this.Controls.Add(this.comboBox1);
this.Controls.Add(this.textBox4);
this.Controls.Add(this.textBox3);
this.Controls.Add(this.textBox2);
this.Controls.Add(this.label7);
this.Controls.Add(this.label6);
this.Controls.Add(this.label5);
this.Controls.Add(this.label4);
this.Controls.Add(this.label3);
this.Controls.Add(this.label2);
this.Controls.Add(this.button1);
this.Controls.Add(this.textBox1);
this.Controls.Add(this.label1);
this.Name = "Form3";
this.Text = "Meine Stadionliste: Spielbericht von weltfussball.de";
this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.Form3_FormClosing);
this.Load += new System.EventHandler(this.Form3_Load);
this.VisibleChanged += new System.EventHandler(this.Form3_VisibleChanged);
this.ResumeLayout(false);
this.PerformLayout();
}
#endregion
private System.Windows.Forms.Label label1;
private System.Windows.Forms.TextBox textBox1;
private System.Windows.Forms.Button button1;
private System.Windows.Forms.Label label2;
private System.Windows.Forms.Label label3;
private System.Windows.Forms.Label label4;
private System.Windows.Forms.Label label5;
private System.Windows.Forms.Label label6;
private System.Windows.Forms.Label label7;
private System.Windows.Forms.TextBox textBox2;
private System.Windows.Forms.TextBox textBox3;
private System.Windows.Forms.TextBox textBox4;
private System.Windows.Forms.ComboBox comboBox1;
private System.Windows.Forms.TextBox textBox5;
}
}

@ -0,0 +1,77 @@
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 Meine_Stadionliste_GUI
{
public partial class Form3 : Form
{
public Form2 GUI;
public string Benutzer;
public string Pfad;
public Form3() { InitializeComponent(); }
private void TextBox1_KeyPress(object sender, KeyPressEventArgs e)
{
if (e.KeyChar == 13) Button1_Click(null, null);
}
private void Button1_Click(object sender, EventArgs e)
{
try
{
string url = textBox1.Text;
string daten = "";
if (textBox2.Text != "") daten += "\"EAN\":\"" + textBox2.Text + "\",";
if (textBox3.Text != "") daten += "\"Eintrittspreis\":\"" + textBox3.Text + "\",";
if (textBox4.Text != "") daten += "\"Block\":\"" + textBox4.Text + "\",";
if (textBox5.Text != "") daten += "\"Begleiter\":\"" + textBox5.Text + "\",";
if (comboBox1.Text != "") daten += "\"Anfahrt\":\"" + comboBox1.Text + "\",";
daten = daten.Replace(" ", "_");
string neu = "";
for (int i = 0; i < daten.Length - 1; i++) neu += daten[i];
url = "{\"benutzer\":\"" + Benutzer + "\",\"daten\":{"+neu+"},\"url\":\"" + url + "\"}";
url = url.Replace("\"", "\\\"");
//string befehl = "./Webparser/venv/Scripts/python.exe ./Webparser/main.py spielzuordnung '" + url + "'";
string Antwort = Hilfsfunktionen.Python_Ausführung("spielzuordnung '"+url+"'", "");
if (Antwort.Contains("GESCHEITERT"))
{
MessageBox.Show("Gescheitert!");
}