Files
Tritone/HorseRacingPredictor/HorseRacingPredictor/Main.Designer.cs
T

361 lines
17 KiB
C#

using System;
using System.Data;
using System.Windows.Forms;
namespace BettingPredictor
{
partial class Main
{
// Container
private System.ComponentModel.IContainer components = null;
// Grafica
private TabControl tabControl;
// Horse tab
private TabPage tabPageHorse;
private TextBox textBoxFolderPath;
private Button buttonBrowse;
private Button buttonPredict; // New button for predictions
private Button buttonImport; // New button for import
private ProgressBar progressBarHorse;
private Label labelStatusHorse;
private DataGridView dataGridViewHorse;
// Replace the buttonLoadFootball with buttonImportFootball and add buttonDownloadFootball
// Football tab
private TabPage tabPageFootball;
private DateTimePicker dateTimePicker;
private Button buttonImportFootball;
private Button buttonDownloadFootball;
private DataGridView dataGridViewFootball;
private ProgressBar progressBarFootball;
private Label labelStatusFootball;
// ApiOptions class definition - rimosso GetLeagueData
public static class ApiOptions
{
public const string GetLeagueFixtures = "Visualizza elenco partite alla data";
public const string GetLeagueOdds = "Visualizza elenco quote partite";
public static readonly string[] AllOptions = { GetLeagueFixtures, GetLeagueOdds };
}
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
private void InitializeComponent()
{
this.components = new System.ComponentModel.Container();
this.tabControl = new System.Windows.Forms.TabControl();
// Horse Tab
this.tabPageHorse = new System.Windows.Forms.TabPage();
this.textBoxFolderPath = new System.Windows.Forms.TextBox();
this.buttonBrowse = new System.Windows.Forms.Button();
this.buttonPredict = new System.Windows.Forms.Button(); // New button for predictions
this.buttonImport = new System.Windows.Forms.Button(); // New button for import
this.progressBarHorse = new System.Windows.Forms.ProgressBar();
this.labelStatusHorse = new System.Windows.Forms.Label();
this.dataGridViewHorse = new System.Windows.Forms.DataGridView();
// In the InitializeComponent method, update:
// Football Tab
this.tabPageFootball = new System.Windows.Forms.TabPage();
this.dateTimePicker = new System.Windows.Forms.DateTimePicker();
this.buttonImportFootball = new System.Windows.Forms.Button();
this.buttonDownloadFootball = new System.Windows.Forms.Button();
this.progressBarFootball = new System.Windows.Forms.ProgressBar();
this.labelStatusFootball = new System.Windows.Forms.Label();
this.dataGridViewFootball = new System.Windows.Forms.DataGridView();
this.tabControl.SuspendLayout();
this.tabPageHorse.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.dataGridViewHorse)).BeginInit();
this.tabPageFootball.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.dataGridViewFootball)).BeginInit();
this.SuspendLayout();
//
// tabControl
//
this.tabControl.Controls.Add(this.tabPageHorse);
this.tabControl.Controls.Add(this.tabPageFootball);
this.tabControl.Dock = System.Windows.Forms.DockStyle.Fill;
this.tabControl.Location = new System.Drawing.Point(0, 0);
this.tabControl.Name = "tabControl";
this.tabControl.SelectedIndex = 0;
this.tabControl.Size = new System.Drawing.Size(800, 450);
this.tabControl.TabIndex = 0;
//
// tabPageHorse
//
this.tabPageHorse.Controls.Add(this.dataGridViewHorse);
this.tabPageHorse.Controls.Add(this.labelStatusHorse);
this.tabPageHorse.Controls.Add(this.progressBarHorse);
this.tabPageHorse.Controls.Add(this.buttonPredict); // Add new button
this.tabPageHorse.Controls.Add(this.buttonImport); // Add new button
this.tabPageHorse.Controls.Add(this.buttonBrowse);
this.tabPageHorse.Controls.Add(this.textBoxFolderPath);
this.tabPageHorse.Location = new System.Drawing.Point(4, 22);
this.tabPageHorse.Name = "tabPageHorse";
this.tabPageHorse.Padding = new System.Windows.Forms.Padding(3);
this.tabPageHorse.Size = new System.Drawing.Size(792, 424);
this.tabPageHorse.TabIndex = 0;
this.tabPageHorse.Text = "Horse";
this.tabPageHorse.UseVisualStyleBackColor = true;
//
// textBoxFolderPath
//
this.textBoxFolderPath.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.textBoxFolderPath.Location = new System.Drawing.Point(8, 8);
this.textBoxFolderPath.Name = "textBoxFolderPath";
this.textBoxFolderPath.ReadOnly = true;
this.textBoxFolderPath.Size = new System.Drawing.Size(510, 20);
this.textBoxFolderPath.TabIndex = 0;
//
// buttonBrowse
//
this.buttonBrowse.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.buttonBrowse.Location = new System.Drawing.Point(524, 6); // Moved position to make room for Predict button
this.buttonBrowse.Size = new System.Drawing.Size(80, 23);
this.buttonBrowse.Name = "buttonBrowse";
this.buttonBrowse.TabIndex = 1;
this.buttonBrowse.Text = "Sfoglia...";
this.buttonBrowse.UseVisualStyleBackColor = true;
this.buttonBrowse.Click += new System.EventHandler(this.buttonBrowse_Click);
//
// buttonImport
//
this.buttonImport.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.buttonImport.Location = new System.Drawing.Point(610, 6);
this.buttonImport.Name = "buttonImport";
this.buttonImport.Size = new System.Drawing.Size(80, 23);
this.buttonImport.TabIndex = 6;
this.buttonImport.Text = "Importa";
this.buttonImport.UseVisualStyleBackColor = true;
this.buttonImport.Click += new System.EventHandler(this.buttonImport_Click);
//
// buttonPredict
//
this.buttonPredict.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.buttonPredict.Location = new System.Drawing.Point(696, 6);
this.buttonPredict.Name = "buttonPredict";
this.buttonPredict.Size = new System.Drawing.Size(80, 23);
this.buttonPredict.TabIndex = 5;
this.buttonPredict.Text = "Predici";
this.buttonPredict.UseVisualStyleBackColor = true;
this.buttonPredict.Click += new System.EventHandler(this.buttonPredict_Click);
//
// progressBarHorse
//
this.progressBarHorse.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.progressBarHorse.Location = new System.Drawing.Point(8, 34);
this.progressBarHorse.Name = "progressBarHorse";
this.progressBarHorse.Size = new System.Drawing.Size(762, 20);
this.progressBarHorse.TabIndex = 2;
//
// labelStatusHorse
//
this.labelStatusHorse.AutoSize = true;
this.labelStatusHorse.Location = new System.Drawing.Point(8, 57);
this.labelStatusHorse.Name = "labelStatusHorse";
this.labelStatusHorse.Size = new System.Drawing.Size(38, 13);
this.labelStatusHorse.TabIndex = 3;
this.labelStatusHorse.Text = "Pronto";
//
// dataGridViewHorse
//
this.dataGridViewHorse.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.dataGridViewHorse.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
this.dataGridViewHorse.Location = new System.Drawing.Point(8, 73);
this.dataGridViewHorse.Name = "dataGridViewHorse";
this.dataGridViewHorse.ReadOnly = true;
this.dataGridViewHorse.Size = new System.Drawing.Size(762, 343);
this.dataGridViewHorse.TabIndex = 4;
// Update controls add to the tab page:
this.tabPageFootball.Controls.Add(this.dataGridViewFootball);
this.tabPageFootball.Controls.Add(this.labelStatusFootball);
this.tabPageFootball.Controls.Add(this.progressBarFootball);
this.tabPageFootball.Controls.Add(this.buttonImportFootball);
this.tabPageFootball.Controls.Add(this.buttonDownloadFootball);
this.tabPageFootball.Controls.Add(this.dateTimePicker);
this.tabPageFootball.Location = new System.Drawing.Point(4, 22);
this.tabPageFootball.Name = "tabPageFootball";
this.tabPageFootball.Padding = new System.Windows.Forms.Padding(3);
this.tabPageFootball.Size = new System.Drawing.Size(792, 424);
this.tabPageFootball.TabIndex = 1;
this.tabPageFootball.Text = "Football";
this.tabPageFootball.UseVisualStyleBackColor = true;
//
// dateTimePicker
//
this.dateTimePicker.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.dateTimePicker.Format = System.Windows.Forms.DateTimePickerFormat.Short;
this.dateTimePicker.Location = new System.Drawing.Point(8, 8);
this.dateTimePicker.Name = "dateTimePicker";
// Update dateTimePicker size to make room for two buttons
this.dateTimePicker.Size = new System.Drawing.Size(596, 20);
this.dateTimePicker.TabIndex = 1;
this.dateTimePicker.Value = System.DateTime.Today;
// buttonDownloadFootball properties
this.buttonDownloadFootball.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.buttonDownloadFootball.Location = new System.Drawing.Point(610, 6);
this.buttonDownloadFootball.Name = "buttonDownloadFootball";
this.buttonDownloadFootball.Size = new System.Drawing.Size(75, 23);
this.buttonDownloadFootball.TabIndex = 6;
this.buttonDownloadFootball.Text = "Scarica";
this.buttonDownloadFootball.UseVisualStyleBackColor = true;
this.buttonDownloadFootball.Click += new System.EventHandler(this.buttonDownloadFootball_Click);
// buttonImportFootball properties (replace buttonLoadFootball)
this.buttonImportFootball.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.buttonImportFootball.Location = new System.Drawing.Point(695, 6);
this.buttonImportFootball.Name = "buttonImportFootball";
this.buttonImportFootball.Size = new System.Drawing.Size(75, 23);
this.buttonImportFootball.TabIndex = 2;
this.buttonImportFootball.Text = "Importa";
this.buttonImportFootball.UseVisualStyleBackColor = true;
this.buttonImportFootball.Click += new System.EventHandler(this.buttonImportFootball_Click);
//
// progressBarFootball
//
this.progressBarFootball.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.progressBarFootball.Location = new System.Drawing.Point(8, 35);
this.progressBarFootball.Name = "progressBarFootball";
this.progressBarFootball.Size = new System.Drawing.Size(762, 20);
this.progressBarFootball.TabIndex = 3;
//
// labelStatusFootball
//
this.labelStatusFootball.AutoSize = true;
this.labelStatusFootball.Location = new System.Drawing.Point(8, 58);
this.labelStatusFootball.Name = "labelStatusFootball";
this.labelStatusFootball.Size = new System.Drawing.Size(38, 13);
this.labelStatusFootball.TabIndex = 4;
this.labelStatusFootball.Text = "Pronto";
//
// dataGridViewFootball
//
this.dataGridViewFootball.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.dataGridViewFootball.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
this.dataGridViewFootball.Location = new System.Drawing.Point(8, 74);
this.dataGridViewFootball.Name = "dataGridViewFootball";
this.dataGridViewFootball.ReadOnly = true;
this.dataGridViewFootball.Size = new System.Drawing.Size(762, 342);
this.dataGridViewFootball.TabIndex = 5;
//
// Main
//
this.ClientSize = new System.Drawing.Size(800, 450);
this.Controls.Add(this.tabControl);
this.Name = "Main";
this.Text = "Betting Predictor";
this.Load += new System.EventHandler(this.Main_Load);
this.tabControl.ResumeLayout(false);
this.tabPageHorse.ResumeLayout(false);
this.tabPageHorse.PerformLayout();
((System.ComponentModel.ISupportInitialize)(this.dataGridViewHorse)).EndInit();
this.tabPageFootball.ResumeLayout(false);
this.tabPageFootball.PerformLayout();
((System.ComponentModel.ISupportInitialize)(this.dataGridViewFootball)).EndInit();
this.ResumeLayout(false);
}
}
public partial class ProgressDialog : Form
{
public ProgressDialog()
{
InitializeComponent();
}
public void UpdateProgress(int currentPage, int totalPages)
{
progressBar.Maximum = totalPages;
progressBar.Value = currentPage;
labelProgress.Text = $"Scaricamento pagina {currentPage} di {totalPages}";
}
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
private void InitializeComponent()
{
this.progressBar = new System.Windows.Forms.ProgressBar();
this.labelProgress = new System.Windows.Forms.Label();
this.SuspendLayout();
//
// progressBar
//
this.progressBar.Location = new System.Drawing.Point(12, 12);
this.progressBar.Name = "progressBar";
this.progressBar.Size = new System.Drawing.Size(360, 23);
this.progressBar.TabIndex = 0;
//
// labelProgress
//
this.labelProgress.AutoSize = true;
this.labelProgress.Location = new System.Drawing.Point(12, 38);
this.labelProgress.Name = "labelProgress";
this.labelProgress.Size = new System.Drawing.Size(0, 13);
this.labelProgress.TabIndex = 1;
//
// ProgressDialog
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(384, 61);
this.Controls.Add(this.labelProgress);
this.Controls.Add(this.progressBar);
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog;
this.MaximizeBox = false;
this.MinimizeBox = false;
this.Name = "ProgressDialog";
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
this.Text = "Scaricamento in corso...";
this.ResumeLayout(false);
this.PerformLayout();
}
private System.ComponentModel.IContainer components = null;
private ProgressBar progressBar;
private Label labelProgress;
}
}