summaryrefslogtreecommitdiff
path: root/Aktywator
diff options
context:
space:
mode:
authoremkael <emkael@tlen.pl>2017-07-30 03:40:03 +0200
committeremkael <emkael@tlen.pl>2017-07-30 13:47:47 +0200
commit31d54d28ef5f19e114427e477097416ef2b8aefe (patch)
tree04797f9c12531fbd95fb2346e4edc184cbeb1b38 /Aktywator
parent618dad37ac9fa986facdcc21c1faa277f760dcb2 (diff)
Loading RRB tournament files in names panel
Diffstat (limited to 'Aktywator')
-rw-r--r--Aktywator/MainForm.Designer.cs21
-rw-r--r--Aktywator/MainForm.cs19
2 files changed, 30 insertions, 10 deletions
diff --git a/Aktywator/MainForm.Designer.cs b/Aktywator/MainForm.Designer.cs
index efcfed7..54a0dd9 100644
--- a/Aktywator/MainForm.Designer.cs
+++ b/Aktywator/MainForm.Designer.cs
@@ -77,6 +77,7 @@
this.xShowResults = new System.Windows.Forms.CheckBox();
this.label1 = new System.Windows.Forms.Label();
this.tabPage2 = new System.Windows.Forms.TabPage();
+ this.bRRBTournament = new System.Windows.Forms.Button();
this.label9 = new System.Windows.Forms.Label();
this.eOomRounds = new System.Windows.Forms.TextBox();
this.bForceSync = new System.Windows.Forms.Button();
@@ -111,7 +112,6 @@
this.bLoadHands = new System.Windows.Forms.Button();
this.timer = new System.Windows.Forms.Timer(this.components);
this.openPBN = new System.Windows.Forms.OpenFileDialog();
- this.bRRBTournament = new System.Windows.Forms.Button();
this.groupBoxTop.SuspendLayout();
this.menu.SuspendLayout();
this.statusStrip1.SuspendLayout();
@@ -646,6 +646,16 @@
this.tabPage2.Text = "Nazwiska";
this.tabPage2.UseVisualStyleBackColor = true;
//
+ // bRRBTournament
+ //
+ this.bRRBTournament.Location = new System.Drawing.Point(54, 51);
+ this.bRRBTournament.Name = "bRRBTournament";
+ this.bRRBTournament.Size = new System.Drawing.Size(89, 23);
+ this.bRRBTournament.TabIndex = 25;
+ this.bRRBTournament.Text = "wybierz (RRB)";
+ this.bRRBTournament.UseVisualStyleBackColor = true;
+ this.bRRBTournament.Click += new System.EventHandler(this.bRRBTournament_Click);
+ //
// label9
//
this.label9.AutoSize = true;
@@ -969,15 +979,6 @@
//
this.openPBN.Filter = "PBN|*.pbn";
//
- // bRRBTournament
- //
- this.bRRBTournament.Location = new System.Drawing.Point(54, 51);
- this.bRRBTournament.Name = "bRRBTournament";
- this.bRRBTournament.Size = new System.Drawing.Size(89, 23);
- this.bRRBTournament.TabIndex = 25;
- this.bRRBTournament.Text = "wybierz (RRB)";
- this.bRRBTournament.UseVisualStyleBackColor = true;
- //
// MainForm
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
diff --git a/Aktywator/MainForm.cs b/Aktywator/MainForm.cs
index e2e87db..c3119d8 100644
--- a/Aktywator/MainForm.cs
+++ b/Aktywator/MainForm.cs
@@ -181,6 +181,25 @@ namespace Aktywator
}
}
+ private void bRRBTournament_Click(object sender, EventArgs e)
+ {
+ try
+ {
+ OpenFileDialog fDialog = new OpenFileDialog();
+ fDialog.Filter = "RRBrigde tournament files (*.rrt)|*.rrt";
+ fDialog.RestoreDirectory = true;
+ if (fDialog.ShowDialog() == DialogResult.OK)
+ {
+ tournament = new RRBTournament(fDialog.FileName);
+ updateTournamentInfo(tournament);
+ }
+ }
+ catch (Exception ee)
+ {
+ MessageBox.Show(ee.Message, "Błąd", MessageBoxButtons.OK, MessageBoxIcon.Stop);
+ }
+ }
+
private void updateTournamentInfo(Tournament tournament)
{
if (tournament != null)