summaryrefslogtreecommitdiff
path: root/Aktywator/RRBTournament.cs
diff options
context:
space:
mode:
authoremkael <emkael@tlen.pl>2017-12-28 02:13:55 +0100
committeremkael <emkael@tlen.pl>2017-12-28 02:13:55 +0100
commit511333516d2e08daa9d6b148f5e908d63dc89238 (patch)
tree0b97188580d01b2b42e4515dfca96faebf286cd6 /Aktywator/RRBTournament.cs
parent80cd31c1c8e7cef2cfbf6148df3d9ec2d2a23279 (diff)
parent4f5d46d5a077fa47b44f8987552f7e58a7e2f65d (diff)
Merge branch '1.1-beta' into emkaelv1.1.2.9
Diffstat (limited to 'Aktywator/RRBTournament.cs')
-rw-r--r--Aktywator/RRBTournament.cs26
1 files changed, 15 insertions, 11 deletions
diff --git a/Aktywator/RRBTournament.cs b/Aktywator/RRBTournament.cs
index 48040ee..3e73d43 100644
--- a/Aktywator/RRBTournament.cs
+++ b/Aktywator/RRBTournament.cs
@@ -54,25 +54,29 @@ namespace Aktywator
override internal Dictionary<int, List<string>> getNameList()
{
- this._xml.Load(this._name);
Dictionary<int, List<string>> names = new Dictionary<int, List<string>>();
- foreach (XmlNode pair in this._xml.SelectNodes("//lista/para"))
+ try
{
- int pairNo = Int32.Parse(pair.SelectSingleNode("numer").InnerText);
- names.Add(pairNo, new List<string>());
- foreach (XmlNode player in pair.SelectNodes("gracz/nazwisko"))
+ this._xml.Load(this._name);
+ foreach (XmlNode pair in this._xml.SelectNodes("//lista/para"))
{
- names[pairNo].Add(player.InnerText);
+ int pairNo = Int32.Parse(pair.SelectSingleNode("numer").InnerText);
+ names.Add(pairNo, new List<string>());
+ foreach (XmlNode player in pair.SelectNodes("gracz/nazwisko"))
+ {
+ names[pairNo].Add(player.InnerText);
+ }
}
- }
- foreach (KeyValuePair<int, List<string>> pair in names)
- {
- while (pair.Value.Count < 2)
+ foreach (KeyValuePair<int, List<string>> pair in names)
{
- pair.Value.Add(" ");
+ while (pair.Value.Count < 2)
+ {
+ pair.Value.Add(" ");
+ }
}
}
+ catch (Exception) { }
return names;
}
}