diff options
Diffstat (limited to 'Aktywator')
29 files changed, 4146 insertions, 1038 deletions
diff --git a/Aktywator/Aktywator.csproj b/Aktywator/Aktywator.csproj index edee3c0..bdcdba6 100644 --- a/Aktywator/Aktywator.csproj +++ b/Aktywator/Aktywator.csproj @@ -86,6 +86,12 @@ <Compile Include="Common.cs" /> <Compile Include="DDTable.cs" /> <Compile Include="HandRecord.cs" /> + <Compile Include="HandRecordPreview.cs"> + <SubType>Form</SubType> + </Compile> + <Compile Include="HandRecordPreview.Designer.cs"> + <DependentUpon>HandRecordPreview.cs</DependentUpon> + </Compile> <Compile Include="MainForm.cs"> <SubType>Form</SubType> </Compile> @@ -99,18 +105,31 @@ <Compile Include="MysqlSettings.Designer.cs"> <DependentUpon>MysqlSettings.cs</DependentUpon> </Compile> + <Compile Include="ParyTournament.cs" /> <Compile Include="PBN.cs" /> <Compile Include="PBNBoard.cs" /> <Compile Include="PBNFile.cs" /> <Compile Include="Program.cs" /> <Compile Include="Properties\AssemblyInfo.cs" /> + <Compile Include="RRBTournament.cs" /> <Compile Include="Setting.cs" /> <Compile Include="Settings.cs" /> <Compile Include="Sql.cs" /> + <Compile Include="MySQLTournament.cs" /> + <Compile Include="TeamNamesSettings.cs"> + <SubType>Form</SubType> + </Compile> + <Compile Include="TeamNamesSettings.Designer.cs"> + <DependentUpon>TeamNamesSettings.cs</DependentUpon> + </Compile> + <Compile Include="TeamyTournament.cs" /> <Compile Include="Tournament.cs" /> <EmbeddedResource Include="ChooseTournament.resx"> <DependentUpon>ChooseTournament.cs</DependentUpon> </EmbeddedResource> + <EmbeddedResource Include="HandRecordPreview.resx"> + <DependentUpon>HandRecordPreview.cs</DependentUpon> + </EmbeddedResource> <EmbeddedResource Include="MainForm.resx"> <DependentUpon>MainForm.cs</DependentUpon> </EmbeddedResource> @@ -118,14 +137,18 @@ <DependentUpon>MysqlSettings.cs</DependentUpon> </EmbeddedResource> <EmbeddedResource Include="Properties\Resources.resx"> - <Generator>ResXFileCodeGenerator</Generator> + <Generator>PublicResXFileCodeGenerator</Generator> <LastGenOutput>Resources.Designer.cs</LastGenOutput> <SubType>Designer</SubType> </EmbeddedResource> <Compile Include="Properties\Resources.Designer.cs"> <AutoGen>True</AutoGen> <DependentUpon>Resources.resx</DependentUpon> + <DesignTime>True</DesignTime> </Compile> + <EmbeddedResource Include="TeamNamesSettings.resx"> + <DependentUpon>TeamNamesSettings.cs</DependentUpon> + </EmbeddedResource> <None Include="app.config" /> <None Include="Properties\Settings.settings"> <Generator>SettingsSingleFileGenerator</Generator> @@ -139,6 +162,7 @@ </ItemGroup> <ItemGroup> <Content Include="aktywator.ico" /> + <None Include="Resources\BuildDate.txt" /> </ItemGroup> <ItemGroup> <BootstrapperPackage Include="Microsoft.Net.Client.3.5"> @@ -158,6 +182,10 @@ </BootstrapperPackage> </ItemGroup> <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> + <PropertyGroup> + <PreBuildEvent>echo %25date%25 > "$(ProjectDir)\Resources\BuildDate.txt" +</PreBuildEvent> + </PropertyGroup> <!-- To modify your build process, add your task inside one of the targets below and uncomment it. Other similar extension points exist, see Microsoft.Common.targets. <Target Name="BeforeBuild"> diff --git a/Aktywator/Bws.cs b/Aktywator/Bws.cs index 1cc5e07..9dedb84 100644 --- a/Aktywator/Bws.cs +++ b/Aktywator/Bws.cs @@ -3,9 +3,7 @@ using System.Collections.Generic; using System.Text; using System.Data.OleDb; using System.Windows.Forms; -using MySql.Data.MySqlClient; -using mydata = MySql.Data.MySqlClient.MySqlDataReader; -using data = System.Data.OleDb.OleDbDataReader; +using System.Drawing; namespace Aktywator { @@ -23,57 +21,205 @@ namespace Aktywator public bool settingsChanged = false; private static string applicationPath = Common.ProgramFilesx86() + "\\Bridgemate Pro\\"; + class HandInfo + { + public List<string> record; + public bool analysis = false; + } + public Bws(string filename, MainForm main) { this._filename = filename; sql = new Sql(filename); this.main = main; string[] sections = this.getSections().Split(','); - main.lWczytywane.Text = this.getBoardRangeText(sections); + this.displaySectionBoardsInfo(sections); + } + + private void displaySectionBoardsInfo(string[] sections) + { + main.gwSections.Columns.Add(new DataGridViewCheckBoxColumn { Frozen = true, Width = 20, DefaultCellStyle = { ForeColor = Color.White, Alignment = DataGridViewContentAlignment.MiddleCenter } }); foreach (string section in sections) { - main.cblSections.Items.Add(this.sectorNumberToLetter(Int16.Parse(section))); + DataGridViewRow row = new DataGridViewRow(); + row.Height = 20; + row.HeaderCell.Value = this.sectorNumberToLetter(Int16.Parse(section)); + main.gwSections.Rows.Add(row); + } + SortedDictionary<int, List<string>> boards = this.loadSectionBoards(sections); + foreach (KeyValuePair<int, List<string>> boardList in boards) + { + main.gwSections.Columns.Add(new DataGridViewTextBoxColumn { HeaderText = boardList.Key.ToString(), Width = 22, DefaultCellStyle = { ForeColor = Color.White, Alignment = DataGridViewContentAlignment.MiddleCenter } }); + foreach (DataGridViewRow row in main.gwSections.Rows) + { + if (boardList.Value.Contains(row.HeaderCell.Value.ToString())) + { + row.Cells[row.Cells.Count - 1].Style.BackColor = Color.White; + } + else + { + row.Cells[row.Cells.Count - 1].Style.BackColor = Color.Gray; + } + row.Cells[row.Cells.Count - 1].ReadOnly = true; + } } - for (int i = 0; i < main.cblSections.Items.Count; i++) + foreach (DataGridViewRow row in main.gwSections.Rows) { - main.cblSections.SetItemChecked(i, true); + row.Cells[0].Value = true; + ((DataGridViewCheckBoxCell)row.Cells[0]).TrueValue = true; + ((DataGridViewCheckBoxCell)row.Cells[0]).FalseValue = false; } + this.displayHandRecordInfo(boards); } - private int sectorLetterToNumber(string sector) + private SortedDictionary<int, List<string>> loadSectionBoards(string[] sections) { + SortedDictionary<int, List<string>> boards = new SortedDictionary<int, List<string>>(); + foreach (string section in sections) + { + string sectionLetter = this.sectorNumberToLetter(Int16.Parse(section)); + int lowBoard = this.lowBoard(section); + int highBoard = this.highBoard(section); + for (int board = lowBoard; board <= highBoard; board++) + { + if (!boards.ContainsKey(board)) + { + boards.Add(board, new List<string>()); + } + boards[board].Add(sectionLetter); + } + } + return boards; + } + + private void displayHandRecordInfo(SortedDictionary<int, List<string>> boards) { - return sector[0] - 'A' + 1; + Dictionary<int, Dictionary<string, HandInfo>> handInfo = this.loadHandRecordInfo(); + foreach (KeyValuePair<int, List<string>> board in boards) + { + if (handInfo.ContainsKey(board.Key)) + { + foreach (string section in board.Value) + { + this.setHandRecordInfo(board.Key, section, (board.Value.Contains(section) && handInfo[board.Key].ContainsKey(section)) ? handInfo[board.Key][section].record : null, handInfo[board.Key].ContainsKey(section) && handInfo[board.Key][section].analysis); + } + } + else + { + this.setHandRecordInfo(board.Key); + } + } } - private string sectorNumberToLetter(int sector) + private void setHandRecordInfo(int board, string section = null, List<string> layout = null, bool analysis = false) { - char character = (char)('A' - 1 + sector); - return character.ToString(); + foreach (DataGridViewColumn column in main.gwSections.Columns) + { + if (column.HeaderText.Equals(board.ToString())) + { + foreach (DataGridViewRow row in main.gwSections.Rows) + { + if (row.HeaderCell.Value.Equals(section) || section == null) + { + if (row.Cells[column.Index].Style.BackColor != Color.Gray) + { + if (layout != null) + { + row.Cells[column.Index].Style.BackColor = Color.LimeGreen; + row.Cells[column.Index].Tag = new HandRecord(String.Join(" ", layout.ToArray())); + row.Cells[column.Index].Value = analysis ? "A" : ""; + row.Cells[column.Index].ToolTipText = "Dwukliknij, by podejrzeć rozkład"; + } + else + { + row.Cells[column.Index].Style.BackColor = Color.Crimson; + row.Cells[column.Index].Tag = null; + row.Cells[column.Index].Value = ""; + row.Cells[column.Index].ToolTipText = ""; + } + } + } + } + } + } } - public string getBoardRangeText(string[] sectors) + private Dictionary<int, Dictionary<string, HandInfo>> loadHandRecordInfo() { - StringBuilder sb = new StringBuilder(); - sb.Append("Wczytywane rozkłady:"); - foreach (string sector in sectors) + Dictionary<int, Dictionary<string, HandInfo>> info = new Dictionary<int, Dictionary<string, HandInfo>>(); + try { - sb.Append("\n "); - sb.Append(this.lowBoard(sector)); - sb.Append("-"); - sb.Append(this.highBoard(sector)); - sb.Append(" (sektor "); - sb.Append(this.sectorNumberToLetter(Int16.Parse(sector))); - sb.Append(")"); + OleDbDataReader handData = sql.select("SELECT `Section`, Board, NorthSpades, NorthHearts, NorthDiamonds, NorthClubs, EastSpades, EastHearts, EastDiamonds, EastClubs, SouthSpades, SouthHearts, SouthDiamonds, SouthClubs, WestSpades, WestHearts, WestDiamonds, WestClubs FROM HandRecord"); + while (handData.Read()) + { + int boardNumber = Int16.Parse(handData[1].ToString()); + if (!info.ContainsKey(boardNumber)) + { + info.Add(boardNumber, new Dictionary<string, HandInfo>()); + } + string section = this.sectorNumberToLetter(Int16.Parse(handData[0].ToString())); + info[boardNumber].Add(section, new HandInfo { record = new List<string>(), analysis = false }); + for (int i = 0; i < 4; i++) + { + StringBuilder singleHand = new StringBuilder(); + for (int j = 0; j < 4; j++) + { + singleHand.Append(handData[2 + i * 4 + j].ToString()); + if (j != 3) + { + singleHand.Append('.'); + } + } + info[boardNumber][section].record.Add(singleHand.ToString().Trim()); + } + } + handData.Close(); + } + catch (OleDbException) + { + } + try + { + OleDbDataReader handData = sql.select("SELECT `Section`, Board FROM HandEvaluation"); + while (handData.Read()) + { + int boardNumber = Int16.Parse(handData[1].ToString()); + string section = this.sectorNumberToLetter(Int16.Parse(handData[0].ToString())); + try + { + info[boardNumber][section].analysis = true; + } + catch (KeyNotFoundException) + { + } + } + handData.Close(); } - return sb.ToString(); + catch (OleDbException) + { + } + return info; + } + + internal int sectorLetterToNumber(string sector) + { + return sector.ToUpper()[0] - 'A' + 1; + } + + internal string sectorNumberToLetter(int sector) + { + char character = (char)('A' - 1 + sector); + return character.ToString(); } public string[] getSelectedSections() { List<string> sections = new List<string>(); - foreach (string section in main.cblSections.CheckedItems) + foreach (DataGridViewRow row in main.gwSections.Rows) { - sections.Add(this.sectorLetterToNumber(section).ToString()); + if (Convert.ToBoolean(row.Cells[0].Value)) + { + sections.Add(this.sectorLetterToNumber(row.HeaderCell.Value.ToString()).ToString()); + } } return sections.ToArray(); } @@ -84,7 +230,7 @@ namespace Aktywator settings.Add(new Setting("ShowResults", main.xShowResults, this, new Version(2, 0, 0), new Version(1, 3, 1))); settings.Add(new Setting("RepeatResults", main.xRepeatResults, this, null, null)); settings.Add(new Setting("ShowPercentage", main.xShowPercentage, this, null, null)); - //settings.Add(new Setting("GroupSections", main.xGroupSections, this, null, null)); + settings.Add(new Setting("GroupSections", main.xGroupSections, this, new Version(2, 1, 10), new Version(1, 3, 1))); settings.Add(new Setting("ShowPairNumbers", main.xShowPairNumbers, this, null, null)); settings.Add(new Setting("IntermediateResults", main.xIntermediateResults, this, null, new Version(1, 4, 1))); settings.Add(new Setting("ShowContract", main.xShowContract, this, null, null)); @@ -113,7 +259,7 @@ namespace Aktywator try { string s; - data d = sql.select("SELECT DISTINCT `Section` FROM " + table + " ORDER BY 1"); + OleDbDataReader d = sql.select("SELECT DISTINCT `Section` FROM " + table + " ORDER BY 1"); d.Read(); s = d[0].ToString(); while (d.Read()) @@ -161,28 +307,9 @@ namespace Aktywator System.Diagnostics.Process.Start(app, param); } - public bool isBm2() - { - if (!sql.checkFieldExists("Settings", "BM2PINcode")) - return false; - if (!sql.checkFieldExists("PlayerNames", "Name")) - return false; - if (!sql.checkFieldExists("PlayerNumbers", "Name")) - return false; - if (!sql.checkFieldExists("Settings", "BM2ViewHandrecord")) - return false; - if (!sql.checkTableExists("HandRecord")) - return false; - if (!sql.checkTableExists("HandEvaluation")) - return false; - - return true; - } - public void convert() { List<Setting> settings = new List<Setting>(); - settings.Add(new Setting("BM2PINcode", "text(4)", "'5431'")); settings.Add(new Setting("BM2ConfirmNP", "bit", "true")); settings.Add(new Setting("BM2RemainingBoards", "bit", "false")); settings.Add(new Setting("BM2NextSeatings", "bit", "true")); @@ -191,36 +318,49 @@ namespace Aktywator settings.Add(new Setting("BM2ScoreCorrection", "bit", "false")); settings.Add(new Setting("BM2AutoBoardNumber", "bit", "false")); settings.Add(new Setting("BM2ResultsOverview", "integer", "1")); - settings.Add(new Setting("BM2ShowPlayerNames", "integer", "0")); - settings.Add(new Setting("BM2Ranking", "integer", "0")); - settings.Add(new Setting("BM2GameSummary", "bit", "false")); - settings.Add(new Setting("BM2SummaryPoints", "integer", "0")); - settings.Add(new Setting("BM2PairNumberEntry", "integer", "0")); settings.Add(new Setting("BM2ResetFunctionKey", "bit", "false")); - settings.Add(new Setting("BM2ShowHands", "bit", "false")); - settings.Add(new Setting("BM2NumberValidation", "integer", "0")); - settings.Add(new Setting("BM2NameSource", "integer", "2")); settings.Add(new Setting("BM2ViewHandrecord", "bit", "false")); - settings.Add(new Setting("BM2EnterHandrecord", "bit", "false")); settings.Add(new Setting("BM2RecordBidding", "bit", "false")); settings.Add(new Setting("BM2RecordPlay", "bit", "false")); settings.Add(new Setting("BM2ValidateLeadCard", "bit", "false")); - - settings.Add(new Setting("Name", "text(18)", "''", "PlayerNumbers")); - settings.Add(new Setting("Updated", "bit", "false", "PlayerNumbers")); + settings.Add(new Setting("BM2ShowPlayerNames", "integer", "0")); foreach (Setting s in settings) { - try - { - sql.query(s.getAddColumnSql()); - sql.query(s.getSetDefaultSql()); - } - catch (OleDbException) - { - } + s.createField(sql, false); } + List<Setting> defaultSettings = new List<Setting>(); + defaultSettings.Add(new Setting("BM2PINcode", "text(4)", "'5431'")); + defaultSettings.Add(new Setting("BM2Ranking", "integer", "0")); + defaultSettings.Add(new Setting("BM2GameSummary", "bit", "false")); + defaultSettings.Add(new Setting("BM2SummaryPoints", "integer", "0")); + defaultSettings.Add(new Setting("BM2PairNumberEntry", "integer", "0")); + defaultSettings.Add(new Setting("BM2ShowHands", "bit", "false")); + defaultSettings.Add(new Setting("BM2NumberValidation", "integer", "0")); + defaultSettings.Add(new Setting("BM2NameSource", "integer", "2")); + defaultSettings.Add(new Setting("BM2EnterHandrecord", "bit", "false")); + defaultSettings.Add(new Setting("BM2NumberEntryEachRound", "integer", "0")); + defaultSettings.Add(new Setting("BM2NumberEntryPreloadValues", "integer", "0")); + defaultSettings.Add(new Setting("Name", "text(18)", "''", "PlayerNumbers")); + defaultSettings.Add(new Setting("Updated", "bit", "false", "PlayerNumbers")); + defaultSettings.Add(new Setting("`Section`", "integer", "1")); + + foreach (Setting s in defaultSettings) + { + s.createField(sql); + } + + this.convertSettingsPerSection(); + + try + { + sql.query("ALTER TABLE Tables ADD COLUMN `Group` integer;"); + } + catch (OleDbException) + { + } + try { sql.query("CREATE TABLE PlayerNames (ID integer, Name text(18));"); @@ -278,6 +418,37 @@ namespace Aktywator } } + private void convertSettingsPerSection() + { + string sectionString = this.getSections(); + string[] sections = sectionString.Split(','); + OleDbDataReader defaultSettings = sql.select("SELECT * FROM `Settings`"); + if (defaultSettings.Read()) + { + object[] values = new object[100]; + int columns = defaultSettings.GetValues(values); + Dictionary<string, object> objects = new Dictionary<string, object>(); + for (int i = 0; i < columns; i++) + { + objects.Add(defaultSettings.GetName(i), values[i]); + } + defaultSettings.Close(); + foreach (string section in sections) + { + try + { + string sectionData = sql.selectOne("SELECT `Section` FROM `Settings` WHERE `Section` = " + section, true); + } + catch (OleDbRowMissingException e) + { + objects["Section"] = section; + sql.insert("Settings", objects); + } + } + sql.query("DELETE FROM `Settings` WHERE `Section` NOT IN (" + sectionString + ")"); + } + } + public void updateSettings() { sql.query("UPDATE Tables SET UpdateFromRound=997;"); @@ -285,12 +456,20 @@ namespace Aktywator public void loadSettings() { + main.startLoading(); + if (settings == null) + { + main.stopLoading(); + return; + } + main.lFirstSectorSettings.Visible = false; + string section = "*".Equals(main.cbSettingsSection.Text.Trim()) ? null : this.sectorLetterToNumber(main.cbSettingsSection.Text.Trim()).ToString(); StringBuilder errors = new StringBuilder(); foreach (Setting s in settings) { try { - s.load(); + s.load(section); } catch (OleDbException) { @@ -298,28 +477,58 @@ namespace Aktywator errors.Append(s.name); } } - main.xShowContract.Checked = (Setting.load("ShowContract", this, errors) == "0"); - main.xShowPlayerNames.Checked = (Setting.load("BM2ShowPlayerNames", this, errors) != "0"); - main.xPINcode.Text = Setting.load("BM2PINcode", this, errors); + main.xShowContract.Checked = (Setting.load("ShowContract", this, errors, section) == "0"); + string playerNames = Setting.load("BM2ShowPlayerNames", this, errors, section); + main.xShowPlayerNames.Checked = !("".Equals(playerNames) || "0".Equals(playerNames)); + main.xPINcode.Text = Setting.load("BM2PINcode", this, errors, section); int resultsOverview = 0; - int.TryParse(Setting.load("BM2ResultsOverview", this, errors), out resultsOverview); + int.TryParse(Setting.load("BM2ResultsOverview", this, errors, section), out resultsOverview); main.xResultsOverview.SelectedIndex = resultsOverview; + main.xGroupSections.Checked = this.getSectionGroupCount() <= 1; + + if (section == null && main.cbSettingsSection.Items.Count > 2) + { + main.lFirstSectorSettings.Visible = true; + this.sectionGroupWarning(); + } if (errors.Length > 0) { MessageBox.Show("Nie można uzyskać dostępu do pól: \n" + errors.ToString() + ".\nPrawdopodobnie te pola nie istnieją.", "Brakuje pól w tabeli Settings", MessageBoxButtons.OK, MessageBoxIcon.Warning); } + main.stopLoading(); + } + + public void sectionGroupWarning() + { + main.lGroupSectionsWarning.Visible = false; + if (main.xShowResults.Checked) + { + main.lGroupSectionsWarning.Visible = true; + } + } + + private int getSectionGroupCount() + { + OleDbDataReader rows = sql.select("SELECT DISTINCT `Group` FROM Tables"); + int count = 0; + while (rows.Read()) + { + count++; + } + return count; } public void saveSettings() { + string section = "*".Equals(main.cbSettingsSection.Text.Trim()) ? null : this.sectorLetterToNumber(main.cbSettingsSection.Text.Trim()).ToString(); StringBuilder errors = new StringBuilder(); foreach (Setting s in settings) { try { - s.save(); + s.save(section); } catch (OleDbException) { @@ -327,11 +536,19 @@ namespace Aktywator errors.Append(s.name); } } - Setting.save("ShowContract", main.xShowContract.Checked ? "0" : "1", this, errors); - Setting.save("BM2ShowPlayerNames", main.xShowPlayerNames.Checked ? "1" : "0", this, errors); - Setting.save("BM2NameSource", "2", this, errors); - Setting.save("BM2PINcode", "'" + main.xPINcode.Text + "'", this, errors); - Setting.save("BM2ResultsOverview", main.xResultsOverview.SelectedIndex.ToString(), this, errors); + Setting.save("ShowContract", main.xShowContract.Checked ? "0" : "1", this, errors, section); + Setting.save("BM2ShowPlayerNames", main.xShowPlayerNames.Checked ? "1" : "0", this, errors, section); + Setting.save("BM2NameSource", "2", this, errors, section); + Setting.save("BM2PINcode", "'" + main.xPINcode.Text + "'", this, errors, section); + Setting.save("BM2ResultsOverview", main.xResultsOverview.SelectedIndex.ToString(), this, errors, section); + if (main.xGroupSections.Checked) + { + sql.query("UPDATE Tables SET `Group` = 1;"); + } + else + { + sql.query("UPDATE Tables SET `Group` = `Section`;"); + } this.loadSettings(); } @@ -341,121 +558,167 @@ namespace Aktywator name = Common.bezOgonkow(name); if (name.Length > 18) name = name.Substring(0, 18); - string actual = sql.selectOne("SELECT Name FROM PlayerNumbers WHERE `Section`=" + section + " AND `Table`=" + table - + " AND `Direction`='" + direction + "'"); - if (actual != name) + try + { + string actual = sql.selectOne("SELECT Name FROM PlayerNumbers WHERE `Section`=" + section + " AND `Table`=" + table + + " AND `Direction`='" + direction + "'", true); + if (actual != name) + { + sql.query("UPDATE PlayerNumbers SET Name='" + name + "', Updated=TRUE WHERE `Section`=" + section + " AND `Table`=" + table + + " AND `Direction`='" + direction + "'"); + return 1; + } + else return 0; + } + catch (OleDbRowMissingException) { - sql.query("UPDATE PlayerNumbers SET Name='" + name + "', Updated=TRUE WHERE `Section`=" + section + " AND `Table`=" + table - + " AND `Direction`='" + direction + "'"); + sql.query("INSERT INTO PlayerNumbers(`Section`, `Table`, Direction, Name, Updated) VALUES(" + + section + ", " + table + ", '" + direction + "', '" + name + "', TRUE)"); return 1; } - else return 0; } - public void syncNames(Tournament tournament, bool interactive, string startRounds) + private int getBWSNumber(OleDbDataReader reader, int index) { - int count = 0, countNew = 0, SKOK_STOLOW = 100; - data d; - startRounds = startRounds.Trim(); + switch (Type.GetTypeCode(reader.GetFieldType(index))) + { + case TypeCode.Int16: + return reader.GetInt16(index); + case TypeCode.Int32: + return reader.GetInt32(index); + } + throw new InvalidCastException("Unable to read numeric value from BWS field"); + } - if (tournament.type == 1) + public void syncNames(Tournament tournament, bool interactive, string startRounds, string section, DataGridView grid) + { + int count = 0, countNew = 0, SKOK_STOLOW = Convert.ToInt32(main.numTeamsTableOffset.Value); + OleDbDataReader d; + startRounds = startRounds.Trim(); + string fromRound = sql.selectOne("SELECT min(`Round`) FROM RoundData WHERE NSPair>0"); + string sectionCondition = ""; + if (!("*".Equals(section))) + { + section = this.sectorLetterToNumber(section).ToString(); + sectionCondition = " AND `Section` = " + section; + } + if (tournament.type != Tournament.TYPE_TEAMY) { - if (startRounds.Length > 0) + if (tournament.type == Tournament.TYPE_PARY && startRounds.Length > 0) { - d = sql.select("SELECT `Section`, `Table`, NSPair, EWPair FROM RoundData WHERE NSPair>0 AND `Round` in (" + startRounds + ")"); + d = sql.select("SELECT `Section`, `Table`, NSPair, EWPair FROM RoundData WHERE NSPair>0 AND `Round` in (" + startRounds + ")" + sectionCondition); } else { - string fromRound = sql.selectOne("SELECT min(`Round`) FROM RoundData WHERE NSPair>0"); - d = sql.select("SELECT `Section`, `Table`, NSPair, EWPair FROM RoundData WHERE `Round`=" + fromRound); + d = sql.select("SELECT `Section`, `Table`, NSPair, EWPair FROM RoundData WHERE `Round`=" + fromRound + sectionCondition); } } else { - d = sql.select("SELECT `Section`, `Table`, NSPair, EWPair FROM RoundData WHERE `Table`<=100"); + d = sql.select("SELECT `Section`, `Table`, NSPair, EWPair FROM RoundData WHERE `Round`=" + fromRound + " AND `Table`<=" + SKOK_STOLOW + sectionCondition); } - while (d.Read()) + try { - string section = d.GetInt32(0).ToString(); - string table = d.GetInt32(1).ToString(); - string ns = d.GetInt32(2).ToString(); - string ew = d.GetInt32(3).ToString(); + Dictionary<int, List<String>> names = tournament.getBWSNames(grid); - StringBuilder query = new StringBuilder(); - if (tournament.type == 1) - { - query.Append("SELECT CONCAT(SUBSTR(imie,1,1),'.',nazw) name FROM zawodnicy WHERE idp="); - query.Append(ns); - query.Append(" OR idp="); - query.Append(ew); - query.Append(" ORDER BY idp "); - if (int.Parse(ew) < int.Parse(ns)) - query.Append("DESC"); - } - else + while (d.Read()) { - query.Append("SELECT fullname NAME FROM teams WHERE id="); - query.Append(ns); - query.Append(" UNION ALL SELECT ' ' UNION ALL"); - query.Append(" SELECT fullname NAME FROM teams WHERE id="); - query.Append(ew); - query.Append(" UNION ALL SELECT ' '; "); - } - mydata n = tournament.mysql.select(query.ToString()); + if ("*".Equals(section)) + { + section = this.getBWSNumber(d, 0).ToString(); + } + string table = this.getBWSNumber(d, 1).ToString(); + int ns = this.getBWSNumber(d, 2); + int ew = this.getBWSNumber(d, 3); - try - { - n.Read(); - countNew += updateName(section, table, "N", n.IsDBNull(0) ? "" : n.GetString(0)); - if (tournament.type == 2) - countNew += updateName(section, (int.Parse(table) + SKOK_STOLOW).ToString(), "E", n.IsDBNull(0) ? "" : n.GetString(0)); - n.Read(); - countNew += updateName(section, table, "S", n.IsDBNull(0) ? "" : n.GetString(0)); - if (tournament.type == 2) - countNew += updateName(section, (int.Parse(table) + SKOK_STOLOW).ToString(), "W", n.IsDBNull(0) ? "" : n.GetString(0)); - n.Read(); - countNew += updateName(section, table, "E", n.IsDBNull(0) ? "" : n.GetString(0)); - if (tournament.type == 2) - countNew += updateName(section, (int.Parse(table) + SKOK_STOLOW).ToString(), "N", n.IsDBNull(0) ? "" : n.GetString(0)); - n.Read(); - countNew += updateName(section, table, "W", n.IsDBNull(0) ? "" : n.GetString(0)); - if (tournament.type == 2) - countNew += updateName(section, (int.Parse(table) + SKOK_STOLOW).ToString(), "S", n.IsDBNull(0) ? "" : n.GetString(0)); - - if (tournament.type == 1) count += 4; - else count += 8; - } - catch (MySqlException ee) - { - if (interactive) + try + { + if (!names.ContainsKey(ns)) + { + throw new KeyNotFoundException(ns.ToString()); + } + countNew += updateName(section, table, "N", names[ns][0]); + countNew += updateName(section, table, "S", names[ns][1]); + count += 2; + if (tournament.type == Tournament.TYPE_TEAMY) + { + countNew += updateName(section, (int.Parse(table) + SKOK_STOLOW).ToString(), "E", + names.ContainsKey(ns + TeamNamesSettings.OpenClosedDiff) ? names[ns + TeamNamesSettings.OpenClosedDiff][0] : names[ns][0]); + countNew += updateName(section, (int.Parse(table) + SKOK_STOLOW).ToString(), "W", + names.ContainsKey(ns + TeamNamesSettings.OpenClosedDiff) ? names[ns + TeamNamesSettings.OpenClosedDiff][1] : names[ns][1]); + count += 2; + } + } + catch (KeyNotFoundException keyE) { - if (ee.ErrorCode == -2147467259) + if (interactive) { - DialogResult dr = MessageBox.Show("W bws-ie jest para/team (" + ns + " albo " + ew - + "), który nie istnieje w wybranym turnieju. Może to nie ten turniej?", - "Zły turniej", MessageBoxButtons.AbortRetryIgnore, MessageBoxIcon.Warning); - if (dr == DialogResult.Abort) return; + DialogResult dr = MessageBox.Show("W bws-ie jest para/team (" + keyE.Message + ")" + + ", który nie istnieje w wybranym turnieju." + + "Może to nie ten turniej?" + "\n\n" + "Kontynuować wczytywanie?", + "Zły turniej", MessageBoxButtons.YesNo, MessageBoxIcon.Warning); + if (dr == DialogResult.No) break; } - else + } + try + { + if (!names.ContainsKey(ew)) { - MessageBox.Show(ee.Message, "Błąd MySQL", MessageBoxButtons.AbortRetryIgnore, MessageBoxIcon.Warning); + throw new KeyNotFoundException(ew.ToString()); + } + countNew += updateName(section, table, "E", names[ew][0]); + countNew += updateName(section, table, "W", names[ew][1]); + count += 2; + if (tournament.type == Tournament.TYPE_TEAMY) + { + countNew += updateName(section, (int.Parse(table) + SKOK_STOLOW).ToString(), "N", + names.ContainsKey(ns + TeamNamesSettings.OpenClosedDiff) ? names[ew + TeamNamesSettings.OpenClosedDiff][0] : names[ew][0]); + countNew += updateName(section, (int.Parse(table) + SKOK_STOLOW).ToString(), "S", + names.ContainsKey(ns + TeamNamesSettings.OpenClosedDiff) ? names[ew + TeamNamesSettings.OpenClosedDiff][1] : names[ew][1]); + count += 2; + } + } + catch (KeyNotFoundException keyE) + { + if (interactive) + { + DialogResult dr = MessageBox.Show("W bws-ie jest para/team (" + keyE.Message + ")" + + ", który nie istnieje w wybranym turnieju." + + "Może to nie ten turniej?" + "\n\n" + "Kontynuować wczytywanie?", + "Zły turniej", MessageBoxButtons.YesNo, MessageBoxIcon.Warning); + if (dr == DialogResult.No) break; } } } - try + StringBuilder errors = new StringBuilder(); + List<Setting> settings = new List<Setting>(); + settings.Add(new Setting("BM2NumberEntryEachRound", "integer", (tournament.type == Tournament.TYPE_TEAMY) ? "1" : "0")); + settings.Add(new Setting("BM2NumberEntryPreloadValues", "integer", "1")); + foreach (Setting s in settings) + { + s.createField(sql); + Setting.save(s.name, s.defaultStr, this, errors); + } + if (interactive) { - n.Close(); + if (errors.Length > 0) + { + MessageBox.Show(errors.ToString(), "Błąd ustawiania opcji BWS", MessageBoxButtons.OK, MessageBoxIcon.Warning); + } + MessageBox.Show("Synchronizacja zakończona!\nPrzejrzanych nazwisk: " + count + "\nZmienionych: " + countNew, + "Synchronizacja nazwisk", MessageBoxButtons.OK, MessageBoxIcon.Information); + if (sql.selectOne("SELECT BM2ShowPlayerNames FROM Settings") != "1") + MessageBox.Show("Pamiętaj żeby włączyć opcję \"pokazuj nazwiska\"!", "Brakujące ustawienie", + MessageBoxButtons.OK, MessageBoxIcon.Information); } - catch (Exception) { } } - if (interactive) + catch (Exception ee) { - MessageBox.Show("Synchronizacja zakończona!\nPrzejrzanych nazwisk: " + count + "\nZmienionych: " + countNew, - "Synchronizacja nazwisk", MessageBoxButtons.OK, MessageBoxIcon.Information); - if (sql.selectOne("SELECT BM2ShowPlayerNames FROM Settings") != "1") - MessageBox.Show("Pamiętaj żeby włączyć opcję \"pokazuj nazwiska\"!", "Brakujące ustawienie", - MessageBoxButtons.OK, MessageBoxIcon.Information); + if (interactive) + { + MessageBox.Show(ee.Message, "Błąd wczytywania nazwisk", MessageBoxButtons.OK, MessageBoxIcon.Error); + } } } @@ -515,20 +778,29 @@ namespace Aktywator string sections = this.sectionsForHandRecords(); if (sections != null) { - foreach (string section in this.sectionsForHandRecords().Split(',')) + string[] sectionLetters = sections.Split(','); + for (int i = 0; i < sectionLetters.Length; i++) { - this.clearRecords(section.Trim()); + sectionLetters[i] = sectionLetters[i].Trim(); } + foreach (string section in sectionLetters) + { + this.clearRecords(section); + } + this.displayHandRecordInfo(this.loadSectionBoards(sectionLetters)); } } public int loadHandRecords(PBN pbn) { int count = 0; - foreach (string section in this.getSelectedSections()) + string[] sections = this.getSelectedSections(); + Dictionary<int, List<string>> boards = new Dictionary<int, List<string>>(); + foreach (string section in sections) { this.clearRecords(section); for (int i = this.lowBoard(section.Trim()); i <= this.highBoard(section.Trim()); i++) + { if (pbn.handRecords[i] != null) { HandRecord b = pbn.handRecords[i]; @@ -541,6 +813,11 @@ namespace Aktywator str.Append(String.Join("','", b.south)); str.Append("','"); str.Append(String.Join("','", b.west)); str.Append("')"); sql.query(str.ToString()); + if (!boards.ContainsKey(i)) + { + boards.Add(i, new List<string>()); + } + boards[i].Add(this.sectorNumberToLetter(Int16.Parse(section))); int[,] ddTable = pbn.ddTables[i].GetDDTable(); if (ddTable != null) { @@ -569,8 +846,39 @@ namespace Aktywator } count++; } + } } + this.displayHandRecordInfo(this.loadSectionBoards(sections)); return count; } + + internal string getMySQLDatabaseForSection() + { + try + { + string dbString = this.sql.selectOne("SELECT custom_MySQL FROM `Section` WHERE ID = 1"); + return dbString.Split(',')[3]; + } + catch (Exception ee) + { + return null; + } + } + + internal string detectTeamySection(string databaseName) + { + OleDbDataReader sections = this.sql.select("SELECT ID, custom_MySQL FROM `Section` WHERE custom_MySQL LIKE '%," + databaseName + ",%'"); + string section = null; + while (sections.Read()) { + string[] dbString = sections.GetString(1).Split(','); + if (dbString[3].Trim().Equals(databaseName)) + { + section = this.sectorNumberToLetter(this.getBWSNumber(sections, 0)); + break; + } + } + sections.Close(); + return section; + } } } diff --git a/Aktywator/ChooseTournament.cs b/Aktywator/ChooseTournament.cs index 2bc2ded..2a7316f 100644 --- a/Aktywator/ChooseTournament.cs +++ b/Aktywator/ChooseTournament.cs @@ -8,10 +8,17 @@ using System.Windows.Forms; namespace Aktywator { + public struct TournamentListItem + { + public int Type; + public string Name; + public string Label; + } + public partial class ChooseTournament : Form { - private Tournament[] turns; - public Tournament chosenTournament; + private TournamentListItem[] turns; + public MySQLTournament chosenTournament; public ChooseTournament() { @@ -20,13 +27,13 @@ namespace Aktywator private void ChooseTournament_Load(object sender, EventArgs e) { - List<Tournament> list = Tournament.getTournaments(); - turns = new Tournament[list.Count]; + List<TournamentListItem> list = MySQLTournament.getTournaments(); + turns = new TournamentListItem[list.Count]; int c = 0; - foreach (Tournament t in list) + foreach (TournamentListItem t in list) { turns[c++] = t; - listBox.Items.Add(t.ToString()); + listBox.Items.Add(t.Label); } } @@ -34,7 +41,15 @@ namespace Aktywator { if (listBox.SelectedIndex >= 0) { - chosenTournament = turns[listBox.SelectedIndex]; + switch (turns[listBox.SelectedIndex].Type) + { + case Tournament.TYPE_PARY: + chosenTournament = new ParyTournament(turns[listBox.SelectedIndex].Name); + break; + case Tournament.TYPE_TEAMY: + chosenTournament = new TeamyTournament(turns[listBox.SelectedIndex].Name); + break; + } Close(); } } diff --git a/Aktywator/Common.cs b/Aktywator/Common.cs index d00649d..b00157c 100644 --- a/Aktywator/Common.cs +++ b/Aktywator/Common.cs @@ -17,27 +17,9 @@ namespace Aktywator return Environment.GetEnvironmentVariable("ProgramFiles"); } - public static string bezOgonkow(string str) + public static string bezOgonkow(string text) { - str = str.Replace('ą', 'a'); - str = str.Replace('ć', 'c'); - str = str.Replace('ę', 'e'); - str = str.Replace('ł', 'l'); - str = str.Replace('ń', 'n'); - str = str.Replace('ó', 'o'); - str = str.Replace('ś', 's'); - str = str.Replace('ź', 'z'); - str = str.Replace('ż', 'z'); - str = str.Replace('Ą', 'A'); - str = str.Replace('Ć', 'C'); - str = str.Replace('Ę', 'E'); - str = str.Replace('Ł', 'L'); - str = str.Replace('Ń', 'N'); - str = str.Replace('Ó', 'O'); - str = str.Replace('Ś', 'S'); - str = str.Replace('Ź', 'Z'); - str = str.Replace('Ż', 'Z'); - return str; + return Encoding.ASCII.GetString(Encoding.GetEncoding(1251).GetBytes(text)); } } } diff --git a/Aktywator/HandRecordPreview.Designer.cs b/Aktywator/HandRecordPreview.Designer.cs new file mode 100644 index 0000000..83c58fb --- /dev/null +++ b/Aktywator/HandRecordPreview.Designer.cs @@ -0,0 +1,554 @@ +namespace Aktywator +{ + partial class HandRecordPreview + { + /// <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.tableLayoutPanel1 = new System.Windows.Forms.TableLayoutPanel(); + this.label1 = new System.Windows.Forms.Label(); + 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.label8 = new System.Windows.Forms.Label(); + this.label9 = new System.Windows.Forms.Label(); + this.label10 = new System.Windows.Forms.Label(); + this.label11 = new System.Windows.Forms.Label(); + this.label12 = new System.Windows.Forms.Label(); + this.label13 = new System.Windows.Forms.Label(); + this.label14 = new System.Windows.Forms.Label(); + this.label15 = new System.Windows.Forms.Label(); + this.label16 = new System.Windows.Forms.Label(); + this.lNorthSpades = new System.Windows.Forms.Label(); + this.lNorthHearts = new System.Windows.Forms.Label(); + this.lNorthDiamonds = new System.Windows.Forms.Label(); + this.lNorthClubs = new System.Windows.Forms.Label(); + this.lEastSpades = new System.Windows.Forms.Label(); + this.lEastHearts = new System.Windows.Forms.Label(); + this.lEastDiamonds = new System.Windows.Forms.Label(); + this.lEastClubs = new System.Windows.Forms.Label(); + this.lSouthSpades = new System.Windows.Forms.Label(); + this.lSouthHearts = new System.Windows.Forms.Label(); + this.lSouthDiamonds = new System.Windows.Forms.Label(); + this.lSouthClubs = new System.Windows.Forms.Label(); + this.lWestClubs = new System.Windows.Forms.Label(); + this.lWestDiamonds = new System.Windows.Forms.Label(); + this.lWestHearts = new System.Windows.Forms.Label(); + this.lWestSpades = new System.Windows.Forms.Label(); + this.tableLayoutPanel1.SuspendLayout(); + this.SuspendLayout(); + // + // tableLayoutPanel1 + // + this.tableLayoutPanel1.ColumnCount = 6; + this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 6.845966F)); + this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 26.48737F)); + this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 6.845966F)); + this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 26.48737F)); + this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 6.845966F)); + this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 26.48737F)); + this.tableLayoutPanel1.Controls.Add(this.label1, 2, 0); + this.tableLayoutPanel1.Controls.Add(this.label2, 2, 1); + this.tableLayoutPanel1.Controls.Add(this.label3, 2, 2); + this.tableLayoutPanel1.Controls.Add(this.label4, 2, 3); + this.tableLayoutPanel1.Controls.Add(this.label5, 0, 4); + this.tableLayoutPanel1.Controls.Add(this.label6, 0, 5); + this.tableLayoutPanel1.Controls.Add(this.label7, 0, 6); + this.tableLayoutPanel1.Controls.Add(this.label8, 0, 7); + this.tableLayoutPanel1.Controls.Add(this.label9, 2, 8); + this.tableLayoutPanel1.Controls.Add(this.label10, 2, 9); + this.tableLayoutPanel1.Controls.Add(this.label11, 2, 10); + this.tableLayoutPanel1.Controls.Add(this.label12, 2, 11); + this.tableLayoutPanel1.Controls.Add(this.label13, 4, 4); + this.tableLayoutPanel1.Controls.Add(this.label14, 4, 5); + this.tableLayoutPanel1.Controls.Add(this.label15, 4, 6); + this.tableLayoutPanel1.Controls.Add(this.label16, 4, 7); + this.tableLayoutPanel1.Controls.Add(this.lNorthSpades, 3, 0); + this.tableLayoutPanel1.Controls.Add(this.lNorthHearts, 3, 1); + this.tableLayoutPanel1.Controls.Add(this.lNorthDiamonds, 3, 2); + this.tableLayoutPanel1.Controls.Add(this.lNorthClubs, 3, 3); + this.tableLayoutPanel1.Controls.Add(this.lEastSpades, 5, 4); + this.tableLayoutPanel1.Controls.Add(this.lEastHearts, 5, 5); + this.tableLayoutPanel1.Controls.Add(this.lEastDiamonds, 5, 6); + this.tableLayoutPanel1.Controls.Add(this.lEastClubs, 5, 7); + this.tableLayoutPanel1.Controls.Add(this.lSouthSpades, 3, 8); + this.tableLayoutPanel1.Controls.Add(this.lSouthHearts, 3, 9); + this.tableLayoutPanel1.Controls.Add(this.lSouthDiamonds, 3, 10); + this.tableLayoutPanel1.Controls.Add(this.lSouthClubs, 3, 11); + this.tableLayoutPanel1.Controls.Add(this.lWestClubs, 1, 7); + this.tableLayoutPanel1.Controls.Add(this.lWestDiamonds, 1, 6); + this.tableLayoutPanel1.Controls.Add(this.lWestHearts, 1, 5); + this.tableLayoutPanel1.Controls.Add(this.lWestSpades, 1, 4); + this.tableLayoutPanel1.Dock = System.Windows.Forms.DockStyle.Fill; + this.tableLayoutPanel1.Location = new System.Drawing.Point(0, 0); + this.tableLayoutPanel1.Name = "tableLayoutPanel1"; + this.tableLayoutPanel1.RowCount = 12; + this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 8.333332F)); + this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 8.333332F)); + this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 8.333332F)); + this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 8.333332F)); + this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 8.333332F)); + this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 8.333332F)); + this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 8.333332F)); + this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 8.333332F)); + this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 8.333332F)); + this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 8.333332F)); + this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 8.333332F)); + this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 8.333332F)); + this.tableLayoutPanel1.Size = new System.Drawing.Size(292, 265); + this.tableLayoutPanel1.TabIndex = 0; + // + // label1 + // + this.label1.AutoSize = true; + this.label1.Dock = System.Windows.Forms.DockStyle.Fill; + this.label1.Font = new System.Drawing.Font("Lucida Sans Unicode", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(238))); + this.label1.Location = new System.Drawing.Point(99, 0); + this.label1.Name = "label1"; + this.label1.Size = new System.Drawing.Size(13, 22); + this.label1.TabIndex = 0; + this.label1.Text = "♠"; + this.label1.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; + // + // label2 + // + this.label2.AutoSize = true; + this.label2.Dock = System.Windows.Forms.DockStyle.Fill; + this.label2.Font = new System.Drawing.Font("Lucida Sans Unicode", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(238))); + this.label2.ForeColor = System.Drawing.Color.Red; + this.label2.Location = new System.Drawing.Point(99, 22); + this.label2.Name = "label2"; + this.label2.Size = new System.Drawing.Size(13, 22); + this.label2.TabIndex = 1; + this.label2.Text = "♥"; + this.label2.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; + // + // label3 + // + this.label3.AutoSize = true; + this.label3.Dock = System.Windows.Forms.DockStyle.Fill; + this.label3.Font = new System.Drawing.Font("Lucida Sans Unicode", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(238))); + this.label3.ForeColor = System.Drawing.Color.Red; + this.label3.Location = new System.Drawing.Point(99, 44); + this.label3.Name = "label3"; + this.label3.Size = new System.Drawing.Size(13, 22); + this.label3.TabIndex = 2; + this.label3.Text = "♦"; + this.label3.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; + // + // label4 + // + this.label4.AutoSize = true; + this.label4.Dock = System.Windows.Forms.DockStyle.Fill; + this.label4.Font = new System.Drawing.Font("Lucida Sans Unicode", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(238))); + this.label4.Location = new System.Drawing.Point(99, 66); + this.label4.Name = "label4"; + this.label4.Size = new System.Drawing.Size(13, 22); + this.label4.TabIndex = 3; + this.label4.Text = "♣"; + this.label4.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; + // + // label5 + // + this.label5.AutoSize = true; + this.label5.Dock = System.Windows.Forms.DockStyle.Fill; + this.label5.Font = new System.Drawing.Font("Lucida Sans Unicode", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(238))); + this.label5.Location = new System.Drawing.Point(3, 88); + this.label5.Name = "label5"; + this.label5.Size = new System.Drawing.Size(13, 22); + this.label5.TabIndex = 4; + this.label5.Text = "♠"; + this.label5.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; + // + // label6 + // + this.label6.AutoSize = true; + this.label6.Dock = System.Windows.Forms.DockStyle.Fill; + this.label6.Font = new System.Drawing.Font("Lucida Sans Unicode", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(238))); + this.label6.ForeColor = System.Drawing.Color.Red; + this.label6.Location = new System.Drawing.Point(3, 110); + this.label6.Name = "label6"; + this.label6.Size = new System.Drawing.Size(13, 22); + this.label6.TabIndex = 5; + this.label6.Text = "♥"; + this.label6.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; + // + // label7 + // + this.label7.AutoSize = true; + this.label7.Dock = System.Windows.Forms.DockStyle.Fill; + this.label7.Font = new System.Drawing.Font("Lucida Sans Unicode", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(238))); + this.label7.ForeColor = System.Drawing.Color.Red; + this.label7.Location = new System.Drawing.Point(3, 132); + this.label7.Name = "label7"; + this.label7.Size = new System.Drawing.Size(13, 22); + this.label7.TabIndex = 6; + this.label7.Text = "♦"; + this.label7.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; + // + // label8 + // + this.label8.AutoSize = true; + this.label8.Dock = System.Windows.Forms.DockStyle.Fill; + this.label8.Font = new System.Drawing.Font("Lucida Sans Unicode", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(238))); + this.label8.Location = new System.Drawing.Point(3, 154); + this.label8.Name = "label8"; + this.label8.Size = new System.Drawing.Size(13, 22); + this.label8.TabIndex = 7; + this.label8.Text = "♣"; + this.label8.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; + // + // label9 + // + this.label9.AutoSize = true; + this.label9.Dock = System.Windows.Forms.DockStyle.Fill; + this.label9.Font = new System.Drawing.Font("Lucida Sans Unicode", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(238))); + this.label9.Location = new System.Drawing.Point(99, 176); + this.label9.Name = "label9"; + this.label9.Size = new System.Drawing.Size(13, 22); + this.label9.TabIndex = 8; + this.label9.Text = "♠"; + this.label9.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; + // + // label10 + // + this.label10.AutoSize = true; + this.label10.Dock = System.Windows.Forms.DockStyle.Fill; + this.label10.Font = new System.Drawing.Font("Lucida Sans Unicode", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(238))); + this.label10.ForeColor = System.Drawing.Color.Red; + this.label10.Location = new System.Drawing.Point(99, 198); + this.label10.Name = "label10"; + this.label10.Size = new System.Drawing.Size(13, 22); + this.label10.TabIndex = 9; + this.label10.Text = "♥"; + this.label10.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; + // + // label11 + // + this.label11.AutoSize = true; + this.label11.Dock = System.Windows.Forms.DockStyle.Fill; + this.label11.Font = new System.Drawing.Font("Lucida Sans Unicode", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(238))); + this.label11.ForeColor = System.Drawing.Color.Red; + this.label11.Location = new System.Drawing.Point(99, 220); + this.label11.Name = "label11"; + this.label11.Size = new System.Drawing.Size(13, 22); + this.label11.TabIndex = 10; + this.label11.Text = "♦"; + this.label11.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; + // + // label12 + // + this.label12.AutoSize = true; + this.label12.Dock = System.Windows.Forms.DockStyle.Fill; + this.label12.Font = new System.Drawing.Font("Lucida Sans Unicode", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(238))); + this.label12.Location = new System.Drawing.Point(99, 242); + this.label12.Name = "label12"; + this.label12.Size = new System.Drawing.Size(13, 23); + this.label12.TabIndex = 11; + this.label12.Text = "♣"; + this.label12.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; + // + // label13 + // + this.label13.AutoSize = true; + this.label13.Dock = System.Windows.Forms.DockStyle.Fill; + this.label13.Font = new System.Drawing.Font("Lucida Sans Unicode", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(238))); + this.label13.Location = new System.Drawing.Point(195, 88); + this.label13.Name = "label13"; + this.label13.Size = new System.Drawing.Size(13, 22); + this.label13.TabIndex = 12; + this.label13.Text = "♠"; + this.label13.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; + // + // label14 + // + this.label14.AutoSize = true; + this.label14.Dock = System.Windows.Forms.DockStyle.Fill; + this.label14.Font = new System.Drawing.Font("Lucida Sans Unicode", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(238))); + this.label14.ForeColor = System.Drawing.Color.Red; + this.label14.Location = new System.Drawing.Point(195, 110); + this.label14.Name = "label14"; + this.label14.Size = new System.Drawing.Size(13, 22); + this.label14.TabIndex = 13; + this.label14.Text = "♥"; + this.label14.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; + // + // label15 + // + this.label15.AutoSize = true; + this.label15.Dock = System.Windows.Forms.DockStyle.Fill; + this.label15.Font = new System.Drawing.Font("Lucida Sans Unicode", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(238))); + this.label15.ForeColor = System.Drawing.Color.Red; + this.label15.Location = new System.Drawing.Point(195, 132); + this.label15.Name = "label15"; + this.label15.Size = new System.Drawing.Size(13, 22); + this.label15.TabIndex = 14; + this.label15.Text = "♦"; + this.label15.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; + // + // label16 + // + this.label16.AutoSize = true; + this.label16.Dock = System.Windows.Forms.DockStyle.Fill; + this.label16.Font = new System.Drawing.Font("Lucida Sans Unicode", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(238))); + this.label16.Location = new System.Drawing.Point(195, 154); + this.label16.Name = "label16"; + this.label16.Size = new System.Drawing.Size(13, 22); + this.label16.TabIndex = 15; + this.label16.Text = "♣"; + this.label16.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; + // + // lNorthSpades + // + this.lNorthSpades.AutoSize = true; + this.lNorthSpades.Dock = System.Windows.Forms.DockStyle.Fill; + this.lNorthSpades.Location = new System.Drawing.Point(118, 0); + this.lNorthSpades.Name = "lNorthSpades"; + this.lNorthSpades.Size = new System.Drawing.Size(71, 22); + this.lNorthSpades.TabIndex = 16; + this.lNorthSpades.Text = "N-S"; + this.lNorthSpades.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; + // + // lNorthHearts + // + this.lNorthHearts.AutoSize = true; + this.lNorthHearts.Dock = System.Windows.Forms.DockStyle.Fill; + this.lNorthHearts.Location = new System.Drawing.Point(118, 22); + this.lNorthHearts.Name = "lNorthHearts"; + this.lNorthHearts.Size = new System.Drawing.Size(71, 22); + this.lNorthHearts.TabIndex = 17; + this.lNorthHearts.Text = "N-H"; + this.lNorthHearts.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; + // + // lNorthDiamonds + // + this.lNorthDiamonds.AutoSize = true; + this.lNorthDiamonds.Dock = System.Windows.Forms.DockStyle.Fill; + this.lNorthDiamonds.Location = new System.Drawing.Point(118, 44); + this.lNorthDiamonds.Name = "lNorthDiamonds"; + this.lNorthDiamonds.Size = new System.Drawing.Size(71, 22); + this.lNorthDiamonds.TabIndex = 18; + this.lNorthDiamonds.Text = "N-D"; + this.lNorthDiamonds.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; + // + // lNorthClubs + // + this.lNorthClubs.AutoSize = true; + this.lNorthClubs.Dock = System.Windows.Forms.DockStyle.Fill; + this.lNorthClubs.Location = new System.Drawing.Point(118, 66); + this.lNorthClubs.Name = "lNorthClubs"; + this.lNorthClubs.Size = new System.Drawing.Size(71, 22); + this.lNorthClubs.TabIndex = 19; + this.lNorthClubs.Text = "N-C"; + this.lNorthClubs.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; + // + // lEastSpades + // + this.lEastSpades.AutoSize = true; + this.lEastSpades.Dock = System.Windows.Forms.DockStyle.Fill; + this.lEastSpades.Location = new System.Drawing.Point(214, 88); + this.lEastSpades.Name = "lEastSpades"; + this.lEastSpades.Size = new System.Drawing.Size(75, 22); + this.lEastSpades.TabIndex = 20; + this.lEastSpades.Text = "E-S"; + this.lEastSpades.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; + // + // lEastHearts + // + this.lEastHearts.AutoSize = true; + this.lEastHearts.Dock = System.Windows.Forms.DockStyle.Fill; + this.lEastHearts.Location = new System.Drawing.Point(214, 110); + this.lEastHearts.Name = "lEastHearts"; + this.lEastHearts.Size = new System.Drawing.Size(75, 22); + this.lEastHearts.TabIndex = 21; + this.lEastHearts.Text = "E-H"; + this.lEastHearts.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; + // + // lEastDiamonds + // + this.lEastDiamonds.AutoSize = true; + this.lEastDiamonds.Dock = System.Windows.Forms.DockStyle.Fill; + this.lEastDiamonds.Location = new System.Drawing.Point(214, 132); + this.lEastDiamonds.Name = "lEastDiamonds"; + this.lEastDiamonds.Size = new System.Drawing.Size(75, 22); + this.lEastDiamonds.TabIndex = 22; + this.lEastDiamonds.Text = "E-D"; + this.lEastDiamonds.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; + // + // lEastClubs + // + this.lEastClubs.AutoSize = true; + this.lEastClubs.Dock = System.Windows.Forms.DockStyle.Fill; + this.lEastClubs.Location = new System.Drawing.Point(214, 154); + this.lEastClubs.Name = "lEastClubs"; + this.lEastClubs.Size = new System.Drawing.Size(75, 22); + this.lEastClubs.TabIndex = 23; + this.lEastClubs.Text = "E-C"; + this.lEastClubs.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; + // + // lSouthSpades + // + this.lSouthSpades.AutoSize = true; + this.lSouthSpades.Dock = System.Windows.Forms.DockStyle.Fill; + this.lSouthSpades.Location = new System.Drawing.Point(118, 176); + this.lSouthSpades.Name = "lSouthSpades"; + this.lSouthSpades.Size = new System.Drawing.Size(71, 22); + this.lSouthSpades.TabIndex = 24; + this.lSouthSpades.Text = "S-S"; + this.lSouthSpades.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; + // + // lSouthHearts + // + this.lSouthHearts.AutoSize = true; + this.lSouthHearts.Dock = System.Windows.Forms.DockStyle.Fill; + this.lSouthHearts.Location = new System.Drawing.Point(118, 198); + this.lSouthHearts.Name = "lSouthHearts"; + this.lSouthHearts.Size = new System.Drawing.Size(71, 22); + this.lSouthHearts.TabIndex = 25; + this.lSouthHearts.Text = "S-H"; + this.lSouthHearts.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; + // + // lSouthDiamonds + // + this.lSouthDiamonds.AutoSize = true; + this.lSouthDiamonds.Dock = System.Windows.Forms.DockStyle.Fill; + this.lSouthDiamonds.Location = new System.Drawing.Point(118, 220); + this.lSouthDiamonds.Name = "lSouthDiamonds"; + this.lSouthDiamonds.Size = new System.Drawing.Size(71, 22); + this.lSouthDiamonds.TabIndex = 26; + this.lSouthDiamonds.Text = "S-D"; + this.lSouthDiamonds.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; + // + // lSouthClubs + // + this.lSouthClubs.AutoSize = true; + this.lSouthClubs.Dock = System.Windows.Forms.DockStyle.Fill; + this.lSouthClubs.Location = new System.Drawing.Point(118, 242); + this.lSouthClubs.Name = "lSouthClubs"; + this.lSouthClubs.Size = new System.Drawing.Size(71, 23); + this.lSouthClubs.TabIndex = 27; + this.lSouthClubs.Text = "S-C"; + this.lSouthClubs.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; + // + // lWestClubs + // + this.lWestClubs.AutoSize = true; + this.lWestClubs.Dock = System.Windows.Forms.DockStyle.Fill; + this.lWestClubs.Location = new System.Drawing.Point(22, 154); + this.lWestClubs.Name = "lWestClubs"; + this.lWestClubs.Size = new System.Drawing.Size(71, 22); + this.lWestClubs.TabIndex = 28; + this.lWestClubs.Text = "W-C"; + this.lWestClubs.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; + // + // lWestDiamonds + // + this.lWestDiamonds.AutoSize = true; + this.lWestDiamonds.Dock = System.Windows.Forms.DockStyle.Fill; + this.lWestDiamonds.Location = new System.Drawing.Point(22, 132); + this.lWestDiamonds.Name = "lWestDiamonds"; + this.lWestDiamonds.Size = new System.Drawing.Size(71, 22); + this.lWestDiamonds.TabIndex = 29; + this.lWestDiamonds.Text = "W-D"; + this.lWestDiamonds.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; + // + // lWestHearts + // + this.lWestHearts.AutoSize = true; + this.lWestHearts.Dock = System.Windows.Forms.DockStyle.Fill; + this.lWestHearts.Location = new System.Drawing.Point(22, 110); + this.lWestHearts.Name = "lWestHearts"; + this.lWestHearts.Size = new System.Drawing.Size(71, 22); + this.lWestHearts.TabIndex = 30; + this.lWestHearts.Text = "W-H"; + this.lWestHearts.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; + // + // lWestSpades + // + this.lWestSpades.AutoSize = true; + this.lWestSpades.Dock = System.Windows.Forms.DockStyle.Fill; + this.lWestSpades.Location = new System.Drawing.Point(22, 88); + this.lWestSpades.Name = "lWestSpades"; + this.lWestSpades.Size = new System.Drawing.Size(71, 22); + this.lWestSpades.TabIndex = 31; + this.lWestSpades.Text = "W-S"; + this.lWestSpades.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; + // + // HandRecordPreview + // + this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.ClientSize = new System.Drawing.Size(292, 265); + this.Controls.Add(this.tableLayoutPanel1); + this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedToolWindow; + this.Name = "HandRecordPreview"; + this.ShowInTaskbar = false; + this.tableLayoutPanel1.ResumeLayout(false); + this.tableLayoutPanel1.PerformLayout(); + this.ResumeLayout(false); + + } + + #endregion + + private System.Windows.Forms.TableLayoutPanel tableLayoutPanel1; + private System.Windows.Forms.Label label1; + 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.Label label8; + private System.Windows.Forms.Label label9; + private System.Windows.Forms.Label label10; + private System.Windows.Forms.Label label11; + private System.Windows.Forms.Label label12; + private System.Windows.Forms.Label label13; + private System.Windows.Forms.Label label14; + private System.Windows.Forms.Label label15; + private System.Windows.Forms.Label label16; + private System.Windows.Forms.Label lNorthSpades; + private System.Windows.Forms.Label lNorthHearts; + private System.Windows.Forms.Label lNorthDiamonds; + private System.Windows.Forms.Label lNorthClubs; + private System.Windows.Forms.Label lEastSpades; + private System.Windows.Forms.Label lEastHearts; + private System.Windows.Forms.Label lEastDiamonds; + private System.Windows.Forms.Label lEastClubs; + private System.Windows.Forms.Label lSouthSpades; + private System.Windows.Forms.Label lSouthHearts; + private System.Windows.Forms.Label lSouthDiamonds; + private System.Windows.Forms.Label lSouthClubs; + private System.Windows.Forms.Label lWestClubs; + private System.Windows.Forms.Label lWestDiamonds; + private System.Windows.Forms.Label lWestHearts; + private System.Windows.Forms.Label lWestSpades; + } +}
\ No newline at end of file diff --git a/Aktywator/HandRecordPreview.cs b/Aktywator/HandRecordPreview.cs new file mode 100644 index 0000000..d5e8446 --- /dev/null +++ b/Aktywator/HandRecordPreview.cs @@ -0,0 +1,39 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Data; +using System.Drawing; +using System.Text; +using System.Windows.Forms; + +namespace Aktywator +{ + public partial class HandRecordPreview : Form + { + public HandRecordPreview() + { + InitializeComponent(); + } + + internal HandRecordPreview(HandRecord record, string boardNo) : this() + { + lNorthSpades.Text = record.north[0]; + lNorthHearts.Text = record.north[1]; + lNorthDiamonds.Text = record.north[2]; + lNorthClubs.Text = record.north[3]; + lEastSpades.Text = record.east[0]; + lEastHearts.Text = record.east[1]; + lEastDiamonds.Text = record.east[2]; + lEastClubs.Text = record.east[3]; + lSouthSpades.Text = record.south[0]; + lSouthHearts.Text = record.south[1]; + lSouthDiamonds.Text = record.south[2]; + lSouthClubs.Text = record.south[3]; + lWestSpades.Text = record.north[0]; + lWestHearts.Text = record.north[1]; + lWestDiamonds.Text = record.north[2]; + lWestClubs.Text = record.west[3]; + this.Text = "ROZDANIE " + boardNo; + } + } +} diff --git a/Aktywator/HandRecordPreview.resx b/Aktywator/HandRecordPreview.resx new file mode 100644 index 0000000..7080a7d --- /dev/null +++ b/Aktywator/HandRecordPreview.resx @@ -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=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> + </resheader> + <resheader name="writer"> + <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> + </resheader> +</root>
\ No newline at end of file diff --git a/Aktywator/MainForm.Designer.cs b/Aktywator/MainForm.Designer.cs index a921d82..c5ac4ad 100644 --- a/Aktywator/MainForm.Designer.cs +++ b/Aktywator/MainForm.Designer.cs @@ -30,14 +30,8 @@ { this.components = new System.ComponentModel.Container(); System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(MainForm)); - this.groupBoxTop = new System.Windows.Forms.GroupBox(); - this.bLaunch = new System.Windows.Forms.Button(); - this.labelFilename = new System.Windows.Forms.Label(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle1 = new System.Windows.Forms.DataGridViewCellStyle(); this.open = new System.Windows.Forms.OpenFileDialog(); - this.menu = new System.Windows.Forms.MenuStrip(); - this.toolStripMenuItem1 = new System.Windows.Forms.ToolStripMenuItem(); - this.konwertujuzupelnijBrakiToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); - this.updateUstawieńWSerwerkuWTrakcieSesjiToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.statusStrip1 = new System.Windows.Forms.StatusStrip(); this.status1 = new System.Windows.Forms.ToolStripStatusLabel(); this.status2 = new System.Windows.Forms.ToolStripStatusLabel(); @@ -45,166 +39,158 @@ this.groupBox1 = new System.Windows.Forms.GroupBox(); this.tabControl1 = new System.Windows.Forms.TabControl(); this.tabPage1 = new System.Windows.Forms.TabPage(); - this.xCollectPlay = new System.Windows.Forms.CheckBox(); - this.xCollectBidding = new System.Windows.Forms.CheckBox(); - this.xCheckLeadCard = new System.Windows.Forms.CheckBox(); - this.xViewHandrecord = new System.Windows.Forms.CheckBox(); - this.xResultsOverview = new System.Windows.Forms.ComboBox(); - this.bLoad = new System.Windows.Forms.Button(); - this.bSave = new System.Windows.Forms.Button(); + this.panel1 = new System.Windows.Forms.Panel(); + this.toolStrip2 = new System.Windows.Forms.ToolStrip(); + this.bLoad = new System.Windows.Forms.ToolStripButton(); + this.bSave = new System.Windows.Forms.ToolStripButton(); + this.statusStrip2 = new System.Windows.Forms.StatusStrip(); + this.toolStripStatusLabel1 = new System.Windows.Forms.ToolStripStatusLabel(); + this.lRequiredVersion = new System.Windows.Forms.ToolStripStatusLabel(); + this.toolStripStatusLabel2 = new System.Windows.Forms.ToolStripStatusLabel(); + this.lDetectedVersion = new System.Windows.Forms.ToolStripStatusLabel(); + this.toolStripStatusLabel3 = new System.Windows.Forms.ToolStripStatusLabel(); + this.lRequiredFirmware = new System.Windows.Forms.ToolStripStatusLabel(); + this.lFirstSectorSettings = new System.Windows.Forms.Label(); + this.cbSettingsSection = new System.Windows.Forms.ComboBox(); + this.label1 = new System.Windows.Forms.Label(); + this.groupBox7 = new System.Windows.Forms.GroupBox(); this.xResetFunctionKey = new System.Windows.Forms.CheckBox(); - this.xShowPlayerNames = new System.Windows.Forms.CheckBox(); - this.xAutoBoardNumber = new System.Windows.Forms.CheckBox(); - this.xScoreCorrection = new System.Windows.Forms.CheckBox(); - this.xAutoShowScoreRecap = new System.Windows.Forms.CheckBox(); - this.xScoreRecap = new System.Windows.Forms.CheckBox(); - this.xNextSeatings = new System.Windows.Forms.CheckBox(); - this.xRemainingBoards = new System.Windows.Forms.CheckBox(); - this.xConfirmNP = new System.Windows.Forms.CheckBox(); - this.xPINcode = new System.Windows.Forms.TextBox(); this.label2 = new System.Windows.Forms.Label(); + this.xPINcode = new System.Windows.Forms.TextBox(); + this.xConfirmNP = new System.Windows.Forms.CheckBox(); + this.xScoreCorrection = new System.Windows.Forms.CheckBox(); + this.groupBox2 = new System.Windows.Forms.GroupBox(); + this.xMemberNumbers = new System.Windows.Forms.CheckBox(); + this.xShowPairNumbers = new System.Windows.Forms.CheckBox(); + this.xMemberNumbersNoBlankEntry = new System.Windows.Forms.CheckBox(); + this.xShowPlayerNames = new System.Windows.Forms.CheckBox(); + this.groupBox6 = new System.Windows.Forms.GroupBox(); this.xAutoShutDownBPC = new System.Windows.Forms.CheckBox(); - this.xIntermediateResults = new System.Windows.Forms.CheckBox(); + this.xRemainingBoards = new System.Windows.Forms.CheckBox(); + this.xNextSeatings = new System.Windows.Forms.CheckBox(); + this.xScoreRecap = new System.Windows.Forms.CheckBox(); + this.xAutoShowScoreRecap = new System.Windows.Forms.CheckBox(); + this.groupBox3 = new System.Windows.Forms.GroupBox(); + this.xCollectPlay = new System.Windows.Forms.CheckBox(); this.xBoardOrderVerification = new System.Windows.Forms.CheckBox(); - this.xMemberNumbersNoBlankEntry = new System.Windows.Forms.CheckBox(); - this.xMemberNumbers = new System.Windows.Forms.CheckBox(); + this.xIntermediateResults = new System.Windows.Forms.CheckBox(); + this.xAutoBoardNumber = new System.Windows.Forms.CheckBox(); + this.xCollectBidding = new System.Windows.Forms.CheckBox(); + this.groupBox5 = new System.Windows.Forms.GroupBox(); + this.xCheckLeadCard = new System.Windows.Forms.CheckBox(); this.xLeadCard = new System.Windows.Forms.CheckBox(); - this.xShowContract = new System.Windows.Forms.CheckBox(); - this.xShowPairNumbers = new System.Windows.Forms.CheckBox(); + this.xViewHandrecord = new System.Windows.Forms.CheckBox(); + this.groupBox4 = new System.Windows.Forms.GroupBox(); + this.lGroupSectionsWarning = new System.Windows.Forms.Label(); this.xGroupSections = new System.Windows.Forms.CheckBox(); - this.xShowPercentage = new System.Windows.Forms.CheckBox(); - this.xRepeatResults = new System.Windows.Forms.CheckBox(); this.xShowResults = new System.Windows.Forms.CheckBox(); - this.label1 = new System.Windows.Forms.Label(); + this.xRepeatResults = new System.Windows.Forms.CheckBox(); + this.xShowPercentage = new System.Windows.Forms.CheckBox(); + this.xShowContract = new System.Windows.Forms.CheckBox(); + this.xResultsOverview = new System.Windows.Forms.ComboBox(); this.tabPage2 = new System.Windows.Forms.TabPage(); + this.sectionToolStrip = new System.Windows.Forms.ToolStrip(); + this.eOomRounds = new System.Windows.Forms.ToolStripTextBox(); + this.lOomLabel = new System.Windows.Forms.ToolStripLabel(); + this.toolStripButton2 = new System.Windows.Forms.ToolStripButton(); + this.toolStripLabel1 = new System.Windows.Forms.ToolStripLabel(); + this.cbNamesSection = new System.Windows.Forms.ToolStripComboBox(); + this.namesPanel = new System.Windows.Forms.Panel(); + this.bTeamsNamesSettings = new System.Windows.Forms.Button(); + this.checkBox1 = new System.Windows.Forms.CheckBox(); + this.button1 = new System.Windows.Forms.Button(); + this.numNamesRefreshInterval = new System.Windows.Forms.NumericUpDown(); this.label9 = new System.Windows.Forms.Label(); - this.eOomRounds = new System.Windows.Forms.TextBox(); - this.bForceSync = new System.Windows.Forms.Button(); - this.lNazwyTeamow = new System.Windows.Forms.Label(); - this.lSkok = new System.Windows.Forms.Label(); - this.eInterval = new System.Windows.Forms.TextBox(); - this.label10 = new System.Windows.Forms.Label(); this.label7 = new System.Windows.Forms.Label(); - this.bTruncate = new System.Windows.Forms.Button(); - this.bMysqlSettings = new System.Windows.Forms.Button(); - this.label8 = new System.Windows.Forms.Label(); - this.bAutoSync = new System.Windows.Forms.Button(); - this.bSync = new System.Windows.Forms.Button(); - this.lTables = new System.Windows.Forms.Label(); - this.lSections = new System.Windows.Forms.Label(); + this.numTeamsTableOffset = new System.Windows.Forms.NumericUpDown(); + this.label3 = new System.Windows.Forms.Label(); + this.namesGridView = new System.Windows.Forms.DataGridView(); + this.Number = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.NorthSouth = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.EastWest = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.lTournament = new System.Windows.Forms.Label(); + this.label4 = new System.Windows.Forms.Label(); this.lType = new System.Windows.Forms.Label(); - this.label6 = new System.Windows.Forms.Label(); this.label5 = new System.Windows.Forms.Label(); - this.label4 = new System.Windows.Forms.Label(); - this.lTournament = new System.Windows.Forms.Label(); - this.bTournament = new System.Windows.Forms.Button(); - this.label3 = new System.Windows.Forms.Label(); + this.lSkok = new System.Windows.Forms.Label(); + this.lSections = new System.Windows.Forms.Label(); + this.label8 = new System.Windows.Forms.Label(); + this.label6 = new System.Windows.Forms.Label(); + this.lTables = new System.Windows.Forms.Label(); + this.syncToolStrip = new System.Windows.Forms.ToolStrip(); + this.bSync = new System.Windows.Forms.ToolStripButton(); + this.eInterval = new System.Windows.Forms.ToolStripTextBox(); + this.bAutoSync = new System.Windows.Forms.ToolStripButton(); + this.toolStrip4 = new System.Windows.Forms.ToolStrip(); + this.toolStripSplitButton1 = new System.Windows.Forms.ToolStripSplitButton(); + this.bMySQLTournament = new System.Windows.Forms.ToolStripMenuItem(); + this.bRRBTournament = new System.Windows.Forms.ToolStripMenuItem(); + this.bMysqlSettings = new System.Windows.Forms.ToolStripButton(); + this.bForceSync = new System.Windows.Forms.ToolStripButton(); + this.bTruncate = new System.Windows.Forms.ToolStripButton(); this.tabPage3 = new System.Windows.Forms.TabPage(); - this.bClearHands = new System.Windows.Forms.Button(); - this.lRecordSections = new System.Windows.Forms.Label(); - this.cblSections = new System.Windows.Forms.CheckedListBox(); - this.label14 = new System.Windows.Forms.Label(); + this.label17 = new System.Windows.Forms.Label(); + this.label18 = new System.Windows.Forms.Label(); + this.label15 = new System.Windows.Forms.Label(); + this.label16 = new System.Windows.Forms.Label(); this.label13 = new System.Windows.Forms.Label(); - this.lWczytywane = new System.Windows.Forms.Label(); + this.label14 = new System.Windows.Forms.Label(); this.label12 = new System.Windows.Forms.Label(); + this.label10 = new System.Windows.Forms.Label(); + this.gwSections = new System.Windows.Forms.DataGridView(); + this.toolStrip3 = new System.Windows.Forms.ToolStrip(); + this.bLoadHands = new System.Windows.Forms.ToolStripButton(); + this.bClearHands = new System.Windows.Forms.ToolStripButton(); + this.lRecordSections = new System.Windows.Forms.Label(); this.label11 = new System.Windows.Forms.Label(); - this.bLoadHands = new System.Windows.Forms.Button(); this.timer = new System.Windows.Forms.Timer(this.components); this.openPBN = new System.Windows.Forms.OpenFileDialog(); - this.label15 = new System.Windows.Forms.Label(); - this.label16 = new System.Windows.Forms.Label(); - this.label17 = new System.Windows.Forms.Label(); - this.lRequiredVersion = new System.Windows.Forms.Label(); - this.lDetectedVersion = new System.Windows.Forms.Label(); - this.lRequiredFirmware = new System.Windows.Forms.Label(); - this.groupBoxTop.SuspendLayout(); - this.menu.SuspendLayout(); + this.toolStrip1 = new System.Windows.Forms.ToolStrip(); + this.labelFilename = new System.Windows.Forms.ToolStripLabel(); + this.bLaunch = new System.Windows.Forms.ToolStripButton(); + this.bUpdateSession = new System.Windows.Forms.ToolStripButton(); + this.namesTimer = new System.Windows.Forms.Timer(this.components); this.statusStrip1.SuspendLayout(); this.groupBox1.SuspendLayout(); this.tabControl1.SuspendLayout(); this.tabPage1.SuspendLayout(); + this.panel1.SuspendLayout(); + this.toolStrip2.SuspendLayout(); + this.statusStrip2.SuspendLayout(); + this.groupBox7.SuspendLayout(); + this.groupBox2.SuspendLayout(); + this.groupBox6.SuspendLayout(); + this.groupBox3.SuspendLayout(); + this.groupBox5.SuspendLayout(); + this.groupBox4.SuspendLayout(); this.tabPage2.SuspendLayout(); + this.sectionToolStrip.SuspendLayout(); + this.namesPanel.SuspendLayout(); + ((System.ComponentModel.ISupportInitialize)(this.numNamesRefreshInterval)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.numTeamsTableOffset)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.namesGridView)).BeginInit(); + this.syncToolStrip.SuspendLayout(); + this.toolStrip4.SuspendLayout(); this.tabPage3.SuspendLayout(); + ((System.ComponentModel.ISupportInitialize)(this.gwSections)).BeginInit(); + this.toolStrip3.SuspendLayout(); + this.toolStrip1.SuspendLayout(); this.SuspendLayout(); // - // groupBoxTop - // - this.groupBoxTop.Controls.Add(this.bLaunch); - this.groupBoxTop.Controls.Add(this.labelFilename); - this.groupBoxTop.Dock = System.Windows.Forms.DockStyle.Top; - this.groupBoxTop.Location = new System.Drawing.Point(0, 24); - this.groupBoxTop.Name = "groupBoxTop"; - this.groupBoxTop.Size = new System.Drawing.Size(577, 46); - this.groupBoxTop.TabIndex = 0; - this.groupBoxTop.TabStop = false; - // - // bLaunch - // - this.bLaunch.Dock = System.Windows.Forms.DockStyle.Right; - this.bLaunch.Font = new System.Drawing.Font("Microsoft Sans Serif", 9F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(238))); - this.bLaunch.Location = new System.Drawing.Point(470, 16); - this.bLaunch.Name = "bLaunch"; - this.bLaunch.Size = new System.Drawing.Size(104, 27); - this.bLaunch.TabIndex = 1; - this.bLaunch.Text = "Uruchom BCS"; - this.bLaunch.UseVisualStyleBackColor = true; - this.bLaunch.Click += new System.EventHandler(this.bLaunch_Click); - // - // labelFilename - // - this.labelFilename.AutoSize = true; - this.labelFilename.Font = new System.Drawing.Font("Microsoft Sans Serif", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(238))); - this.labelFilename.Location = new System.Drawing.Point(6, 16); - this.labelFilename.Name = "labelFilename"; - this.labelFilename.Size = new System.Drawing.Size(0, 24); - this.labelFilename.TabIndex = 0; - // // open // this.open.Filter = "BWS|*.bws"; // - // menu - // - this.menu.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { - this.toolStripMenuItem1}); - this.menu.Location = new System.Drawing.Point(0, 0); - this.menu.Name = "menu"; - this.menu.Size = new System.Drawing.Size(577, 24); - this.menu.TabIndex = 3; - this.menu.Text = "menuStrip1"; - // - // toolStripMenuItem1 - // - this.toolStripMenuItem1.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { - this.konwertujuzupelnijBrakiToolStripMenuItem, - this.updateUstawieńWSerwerkuWTrakcieSesjiToolStripMenuItem}); - this.toolStripMenuItem1.Name = "toolStripMenuItem1"; - this.toolStripMenuItem1.Size = new System.Drawing.Size(42, 20); - this.toolStripMenuItem1.Text = "Inne"; - // - // konwertujuzupelnijBrakiToolStripMenuItem - // - this.konwertujuzupelnijBrakiToolStripMenuItem.Name = "konwertujuzupelnijBrakiToolStripMenuItem"; - this.konwertujuzupelnijBrakiToolStripMenuItem.Size = new System.Drawing.Size(237, 22); - this.konwertujuzupelnijBrakiToolStripMenuItem.Text = "Konwertuj (uzupelnij braki)"; - this.konwertujuzupelnijBrakiToolStripMenuItem.Click += new System.EventHandler(this.konwertujuzupelnijBrakiToolStripMenuItem_Click); - // - // updateUstawieńWSerwerkuWTrakcieSesjiToolStripMenuItem - // - this.updateUstawieńWSerwerkuWTrakcieSesjiToolStripMenuItem.Name = "updateUstawieńWSerwerkuWTrakcieSesjiToolStripMenuItem"; - this.updateUstawieńWSerwerkuWTrakcieSesjiToolStripMenuItem.Size = new System.Drawing.Size(237, 22); - this.updateUstawieńWSerwerkuWTrakcieSesjiToolStripMenuItem.Text = "Update ustawień w trakcie sesji"; - this.updateUstawieńWSerwerkuWTrakcieSesjiToolStripMenuItem.Click += new System.EventHandler(this.updateUstawieńWSerwerkuWTrakcieSesjiToolStripMenuItem_Click); - // // statusStrip1 // this.statusStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { this.status1, this.status2, this.status3}); - this.statusStrip1.Location = new System.Drawing.Point(0, 489); + this.statusStrip1.Location = new System.Drawing.Point(0, 586); this.statusStrip1.Name = "statusStrip1"; - this.statusStrip1.Size = new System.Drawing.Size(577, 22); + this.statusStrip1.Size = new System.Drawing.Size(583, 22); + this.statusStrip1.SizingGrip = false; this.statusStrip1.TabIndex = 2; this.statusStrip1.Text = "statusBar"; // @@ -232,745 +218,1209 @@ // this.groupBox1.Controls.Add(this.tabControl1); this.groupBox1.Dock = System.Windows.Forms.DockStyle.Fill; - this.groupBox1.Location = new System.Drawing.Point(0, 70); + this.groupBox1.Location = new System.Drawing.Point(0, 0); this.groupBox1.Name = "groupBox1"; - this.groupBox1.Size = new System.Drawing.Size(577, 419); + this.groupBox1.Size = new System.Drawing.Size(583, 586); this.groupBox1.TabIndex = 1; this.groupBox1.TabStop = false; // // tabControl1 // + this.tabControl1.Anchor = System.Windows.Forms.AnchorStyles.Top; this.tabControl1.Controls.Add(this.tabPage1); this.tabControl1.Controls.Add(this.tabPage2); this.tabControl1.Controls.Add(this.tabPage3); - this.tabControl1.Dock = System.Windows.Forms.DockStyle.Fill; - this.tabControl1.Location = new System.Drawing.Point(3, 16); + this.tabControl1.Location = new System.Drawing.Point(0, 43); this.tabControl1.Name = "tabControl1"; this.tabControl1.SelectedIndex = 0; - this.tabControl1.Size = new System.Drawing.Size(571, 400); + this.tabControl1.Size = new System.Drawing.Size(577, 537); this.tabControl1.TabIndex = 0; // // tabPage1 // - this.tabPage1.Controls.Add(this.lRequiredFirmware); - this.tabPage1.Controls.Add(this.lDetectedVersion); - this.tabPage1.Controls.Add(this.lRequiredVersion); - this.tabPage1.Controls.Add(this.label17); - this.tabPage1.Controls.Add(this.label16); - this.tabPage1.Controls.Add(this.label15); - this.tabPage1.Controls.Add(this.xCollectPlay); - this.tabPage1.Controls.Add(this.xCollectBidding); - this.tabPage1.Controls.Add(this.xCheckLeadCard); - this.tabPage1.Controls.Add(this.xViewHandrecord); - this.tabPage1.Controls.Add(this.xResultsOverview); - this.tabPage1.Controls.Add(this.bLoad); - this.tabPage1.Controls.Add(this.bSave); - this.tabPage1.Controls.Add(this.xResetFunctionKey); - this.tabPage1.Controls.Add(this.xShowPlayerNames); - this.tabPage1.Controls.Add(this.xAutoBoardNumber); - this.tabPage1.Controls.Add(this.xScoreCorrection); - this.tabPage1.Controls.Add(this.xAutoShowScoreRecap); - this.tabPage1.Controls.Add(this.xScoreRecap); - this.tabPage1.Controls.Add(this.xNextSeatings); - this.tabPage1.Controls.Add(this.xRemainingBoards); - this.tabPage1.Controls.Add(this.xConfirmNP); - this.tabPage1.Controls.Add(this.xPINcode); - this.tabPage1.Controls.Add(this.label2); - this.tabPage1.Controls.Add(this.xAutoShutDownBPC); - this.tabPage1.Controls.Add(this.xIntermediateResults); - this.tabPage1.Controls.Add(this.xBoardOrderVerification); - this.tabPage1.Controls.Add(this.xMemberNumbersNoBlankEntry); - this.tabPage1.Controls.Add(this.xMemberNumbers); - this.tabPage1.Controls.Add(this.xLeadCard); - this.tabPage1.Controls.Add(this.xShowContract); - this.tabPage1.Controls.Add(this.xShowPairNumbers); - this.tabPage1.Controls.Add(this.xGroupSections); - this.tabPage1.Controls.Add(this.xShowPercentage); - this.tabPage1.Controls.Add(this.xRepeatResults); - this.tabPage1.Controls.Add(this.xShowResults); - this.tabPage1.Controls.Add(this.label1); + this.tabPage1.Controls.Add(this.panel1); this.tabPage1.Location = new System.Drawing.Point(4, 22); this.tabPage1.Name = "tabPage1"; this.tabPage1.Padding = new System.Windows.Forms.Padding(3); - this.tabPage1.Size = new System.Drawing.Size(563, 374); + this.tabPage1.Size = new System.Drawing.Size(569, 511); this.tabPage1.TabIndex = 0; this.tabPage1.Text = "Ustawienia"; this.tabPage1.UseVisualStyleBackColor = true; // - // xCollectPlay + // panel1 + // + this.panel1.Controls.Add(this.toolStrip2); + this.panel1.Controls.Add(this.statusStrip2); + this.panel1.Controls.Add(this.lFirstSectorSettings); + this.panel1.Controls.Add(this.cbSettingsSection); + this.panel1.Controls.Add(this.label1); + this.panel1.Controls.Add(this.groupBox7); + this.panel1.Controls.Add(this.groupBox2); + this.panel1.Controls.Add(this.groupBox6); + this.panel1.Controls.Add(this.groupBox3); + this.panel1.Controls.Add(this.groupBox5); + this.panel1.Controls.Add(this.groupBox4); + this.panel1.Dock = System.Windows.Forms.DockStyle.Bottom; + this.panel1.Location = new System.Drawing.Point(3, 6); + this.panel1.Name = "panel1"; + this.panel1.Size = new System.Drawing.Size(563, 502); + this.panel1.TabIndex = 29; + // + // toolStrip2 + // + this.toolStrip2.BackColor = System.Drawing.Color.White; + this.toolStrip2.Dock = System.Windows.Forms.DockStyle.Bottom; + this.toolStrip2.GripMargin = new System.Windows.Forms.Padding(0); + this.toolStrip2.GripStyle = System.Windows.Forms.ToolStripGripStyle.Hidden; + this.toolStrip2.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { + this.bLoad, + this.bSave}); + this.toolStrip2.LayoutStyle = System.Windows.Forms.ToolStripLayoutStyle.HorizontalStackWithOverflow; + this.toolStrip2.Location = new System.Drawing.Point(0, 455); + this.toolStrip2.Name = "toolStrip2"; + this.toolStrip2.Size = new System.Drawing.Size(563, 25); + this.toolStrip2.TabIndex = 51; + this.toolStrip2.Text = "toolStrip2"; // - this.xCollectPlay.AutoSize = true; - this.xCollectPlay.Location = new System.Drawing.Point(339, 138); - this.xCollectPlay.Name = "xCollectPlay"; - this.xCollectPlay.Size = new System.Drawing.Size(146, 17); - this.xCollectPlay.TabIndex = 31; - this.xCollectPlay.Text = "zbieraj przebieg rozgrywki"; - this.xCollectPlay.UseVisualStyleBackColor = true; + // bLoad // - // xCollectBidding + this.bLoad.Image = ((System.Drawing.Image)(resources.GetObject("bLoad.Image"))); + this.bLoad.ImageTransparentColor = System.Drawing.Color.Magenta; + this.bLoad.Name = "bLoad"; + this.bLoad.Size = new System.Drawing.Size(216, 22); + this.bLoad.Text = "Ponownie wczytaj ustawienia z BWS"; + this.bLoad.Click += new System.EventHandler(this.bLoad_Click); // - this.xCollectBidding.AutoSize = true; - this.xCollectBidding.Location = new System.Drawing.Point(339, 115); - this.xCollectBidding.Name = "xCollectBidding"; - this.xCollectBidding.Size = new System.Drawing.Size(97, 17); - this.xCollectBidding.TabIndex = 30; - this.xCollectBidding.Text = "zbieraj licytację"; - this.xCollectBidding.UseVisualStyleBackColor = true; + // bSave // - // xCheckLeadCard + this.bSave.Alignment = System.Windows.Forms.ToolStripItemAlignment.Right; + this.bSave.Font = new System.Drawing.Font("Segoe UI", 9F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(238))); + this.bSave.Image = ((System.Drawing.Image)(resources.GetObject("bSave.Image"))); + this.bSave.ImageTransparentColor = System.Drawing.Color.Magenta; + this.bSave.Name = "bSave"; + this.bSave.Size = new System.Drawing.Size(108, 22); + this.bSave.Text = "Zapisz do BWS"; + this.bSave.Click += new System.EventHandler(this.bSave_Click); // - this.xCheckLeadCard.AutoSize = true; - this.xCheckLeadCard.Location = new System.Drawing.Point(339, 253); - this.xCheckLeadCard.Name = "xCheckLeadCard"; - this.xCheckLeadCard.Size = new System.Drawing.Size(180, 17); - this.xCheckLeadCard.TabIndex = 32; - this.xCheckLeadCard.Text = "sprawdź kartę wistu z rozkładem"; - this.xCheckLeadCard.UseVisualStyleBackColor = true; + // statusStrip2 + // + this.statusStrip2.BackColor = System.Drawing.Color.White; + this.statusStrip2.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { + this.toolStripStatusLabel1, + this.lRequiredVersion, + this.toolStripStatusLabel2, + this.lDetectedVersion, + this.toolStripStatusLabel3, + this.lRequiredFirmware}); + this.statusStrip2.Location = new System.Drawing.Point(0, 480); + this.statusStrip2.Name = "statusStrip2"; + this.statusStrip2.Size = new System.Drawing.Size(563, 22); + this.statusStrip2.SizingGrip = false; + this.statusStrip2.TabIndex = 50; + this.statusStrip2.Text = "statusStrip2"; + // + // toolStripStatusLabel1 + // + this.toolStripStatusLabel1.Name = "toolStripStatusLabel1"; + this.toolStripStatusLabel1.Size = new System.Drawing.Size(130, 17); + this.toolStripStatusLabel1.Text = "Wymagana wersja BCS:"; // - // xViewHandrecord + // lRequiredVersion // - this.xViewHandrecord.AutoSize = true; - this.xViewHandrecord.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(238))); - this.xViewHandrecord.Location = new System.Drawing.Point(6, 230); - this.xViewHandrecord.Name = "xViewHandrecord"; - this.xViewHandrecord.Size = new System.Drawing.Size(123, 17); - this.xViewHandrecord.TabIndex = 29; - this.xViewHandrecord.Text = "pokazuj rozkłady"; - this.xViewHandrecord.UseVisualStyleBackColor = true; + this.lRequiredVersion.Font = new System.Drawing.Font("Segoe UI", 9F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(238))); + this.lRequiredVersion.Margin = new System.Windows.Forms.Padding(0, 3, 20, 2); + this.lRequiredVersion.Name = "lRequiredVersion"; + this.lRequiredVersion.Padding = new System.Windows.Forms.Padding(0, 0, 10, 0); + this.lRequiredVersion.Size = new System.Drawing.Size(44, 17); + this.lRequiredVersion.Text = "0.0.0"; // - // xResultsOverview + // toolStripStatusLabel2 // - this.xResultsOverview.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; - this.xResultsOverview.Enabled = false; - this.xResultsOverview.FormattingEnabled = true; - this.xResultsOverview.Items.AddRange(new object[] { - "frekwens, 6x1", - "frekwens, 6x2", - "frekwens, 4x1", - "traveler, 6x1", - "traveler, 6x2", - "traveler, 4x1"}); - this.xResultsOverview.Location = new System.Drawing.Point(160, 19); - this.xResultsOverview.Name = "xResultsOverview"; - this.xResultsOverview.Size = new System.Drawing.Size(103, 21); - this.xResultsOverview.TabIndex = 28; + this.toolStripStatusLabel2.Name = "toolStripStatusLabel2"; + this.toolStripStatusLabel2.Size = new System.Drawing.Size(113, 17); + this.toolStripStatusLabel2.Text = "Wykryta wersja BCS:"; // - // bLoad + // lDetectedVersion // - this.bLoad.Font = new System.Drawing.Font("Microsoft Sans Serif", 6.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(238))); - this.bLoad.Location = new System.Drawing.Point(3, 336); - this.bLoad.Name = "bLoad"; - this.bLoad.Size = new System.Drawing.Size(176, 23); - this.bLoad.TabIndex = 26; - this.bLoad.Text = "Ponownie wczytaj ustawienia z BWS"; - this.bLoad.UseVisualStyleBackColor = true; - this.bLoad.Click += new System.EventHandler(this.bLoad_Click); + this.lDetectedVersion.Font = new System.Drawing.Font("Segoe UI", 9F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(238))); + this.lDetectedVersion.Margin = new System.Windows.Forms.Padding(0, 3, 20, 2); + this.lDetectedVersion.Name = "lDetectedVersion"; + this.lDetectedVersion.Padding = new System.Windows.Forms.Padding(0, 0, 10, 0); + this.lDetectedVersion.Size = new System.Drawing.Size(44, 17); + this.lDetectedVersion.Text = "0.0.0"; // - // bSave + // toolStripStatusLabel3 // - this.bSave.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(238))); - this.bSave.Location = new System.Drawing.Point(185, 336); - this.bSave.Name = "bSave"; - this.bSave.Size = new System.Drawing.Size(126, 23); - this.bSave.TabIndex = 25; - this.bSave.Text = "Zapisz do BWS"; - this.bSave.UseVisualStyleBackColor = true; - this.bSave.Click += new System.EventHandler(this.bSave_Click); + this.toolStripStatusLabel3.Name = "toolStripStatusLabel3"; + this.toolStripStatusLabel3.Size = new System.Drawing.Size(120, 17); + this.toolStripStatusLabel3.Text = "Wymagany firmware:"; + // + // lRequiredFirmware + // + this.lRequiredFirmware.Font = new System.Drawing.Font("Segoe UI", 9F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(238))); + this.lRequiredFirmware.Name = "lRequiredFirmware"; + this.lRequiredFirmware.Padding = new System.Windows.Forms.Padding(0, 0, 10, 0); + this.lRequiredFirmware.Size = new System.Drawing.Size(44, 17); + this.lRequiredFirmware.Text = "0.0.0"; + // + // lFirstSectorSettings + // + this.lFirstSectorSettings.AutoSize = true; + this.lFirstSectorSettings.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(238))); + this.lFirstSectorSettings.Location = new System.Drawing.Point(98, 10); + this.lFirstSectorSettings.Name = "lFirstSectorSettings"; + this.lFirstSectorSettings.Size = new System.Drawing.Size(263, 13); + this.lFirstSectorSettings.TabIndex = 49; + this.lFirstSectorSettings.Text = "załadowano ustawienia z pierwszego sektora"; + // + // cbSettingsSection + // + this.cbSettingsSection.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; + this.cbSettingsSection.FormattingEnabled = true; + this.cbSettingsSection.Items.AddRange(new object[] { + "*"}); + this.cbSettingsSection.Location = new System.Drawing.Point(50, 7); + this.cbSettingsSection.Name = "cbSettingsSection"; + this.cbSettingsSection.Size = new System.Drawing.Size(42, 21); + this.cbSettingsSection.TabIndex = 48; + this.cbSettingsSection.SelectedIndexChanged += new System.EventHandler(this.cbSettingsSection_SelectedIndexChanged); + // + // label1 + // + this.label1.AutoSize = true; + this.label1.Location = new System.Drawing.Point(3, 10); + this.label1.Name = "label1"; + this.label1.Size = new System.Drawing.Size(41, 13); + this.label1.TabIndex = 47; + this.label1.Text = "Sektor:"; + // + // groupBox7 + // + this.groupBox7.Controls.Add(this.xResetFunctionKey); + this.groupBox7.Controls.Add(this.label2); + this.groupBox7.Controls.Add(this.xPINcode); + this.groupBox7.Controls.Add(this.xConfirmNP); + this.groupBox7.Controls.Add(this.xScoreCorrection); + this.groupBox7.Location = new System.Drawing.Point(268, 324); + this.groupBox7.Name = "groupBox7"; + this.groupBox7.Size = new System.Drawing.Size(294, 121); + this.groupBox7.TabIndex = 44; + this.groupBox7.TabStop = false; + this.groupBox7.Text = "Opcje sędziowskie"; // // xResetFunctionKey // this.xResetFunctionKey.AutoSize = true; - this.xResetFunctionKey.Location = new System.Drawing.Point(339, 299); + this.xResetFunctionKey.Location = new System.Drawing.Point(13, 92); this.xResetFunctionKey.Name = "xResetFunctionKey"; this.xResetFunctionKey.Size = new System.Drawing.Size(207, 17); this.xResetFunctionKey.TabIndex = 24; this.xResetFunctionKey.Text = "zawodnik może zresetować pierniczka"; this.xResetFunctionKey.UseVisualStyleBackColor = true; // - // xShowPlayerNames + // label2 // - this.xShowPlayerNames.AutoSize = true; - this.xShowPlayerNames.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(238))); - this.xShowPlayerNames.Location = new System.Drawing.Point(6, 207); - this.xShowPlayerNames.Name = "xShowPlayerNames"; - this.xShowPlayerNames.Size = new System.Drawing.Size(126, 17); - this.xShowPlayerNames.TabIndex = 9; - this.xShowPlayerNames.Text = "pokazuj nazwiska"; - this.xShowPlayerNames.UseVisualStyleBackColor = true; + this.label2.AutoSize = true; + this.label2.Location = new System.Drawing.Point(10, 25); + this.label2.Name = "label2"; + this.label2.Size = new System.Drawing.Size(25, 13); + this.label2.TabIndex = 27; + this.label2.Text = "PIN"; // - // xAutoBoardNumber + // xPINcode // - this.xAutoBoardNumber.AutoSize = true; - this.xAutoBoardNumber.Location = new System.Drawing.Point(6, 253); - this.xAutoBoardNumber.Name = "xAutoBoardNumber"; - this.xAutoBoardNumber.Size = new System.Drawing.Size(174, 17); - this.xAutoBoardNumber.TabIndex = 10; - this.xAutoBoardNumber.Text = "automat. wpisuj numer rozdania"; - this.xAutoBoardNumber.UseVisualStyleBackColor = true; + this.xPINcode.Location = new System.Drawing.Point(41, 21); + this.xPINcode.MaxLength = 4; + this.xPINcode.Name = "xPINcode"; + this.xPINcode.Size = new System.Drawing.Size(37, 20); + this.xPINcode.TabIndex = 14; + this.xPINcode.Text = "0000"; + // + // xConfirmNP + // + this.xConfirmNP.AutoSize = true; + this.xConfirmNP.Location = new System.Drawing.Point(13, 46); + this.xConfirmNP.Name = "xConfirmNP"; + this.xConfirmNP.Size = new System.Drawing.Size(198, 17); + this.xConfirmNP.TabIndex = 22; + this.xConfirmNP.Text = "NoPlay potwierdzany przez sędziego"; + this.xConfirmNP.UseVisualStyleBackColor = true; // // xScoreCorrection // this.xScoreCorrection.AutoSize = true; - this.xScoreCorrection.Location = new System.Drawing.Point(339, 276); + this.xScoreCorrection.Location = new System.Drawing.Point(13, 69); this.xScoreCorrection.Name = "xScoreCorrection"; this.xScoreCorrection.Size = new System.Drawing.Size(186, 17); this.xScoreCorrection.TabIndex = 23; this.xScoreCorrection.Text = "zawodnicy sami poprawiają zapisy"; this.xScoreCorrection.UseVisualStyleBackColor = true; // - // xAutoShowScoreRecap + // groupBox2 // - this.xAutoShowScoreRecap.AutoSize = true; - this.xAutoShowScoreRecap.Location = new System.Drawing.Point(339, 184); - this.xAutoShowScoreRecap.Name = "xAutoShowScoreRecap"; - this.xAutoShowScoreRecap.Size = new System.Drawing.Size(228, 17); - this.xAutoShowScoreRecap.TabIndex = 13; - this.xAutoShowScoreRecap.Text = "podgląd zapisów na koniec rundy automat."; - this.xAutoShowScoreRecap.UseVisualStyleBackColor = true; + this.groupBox2.Controls.Add(this.xMemberNumbers); + this.groupBox2.Controls.Add(this.xShowPairNumbers); + this.groupBox2.Controls.Add(this.xMemberNumbersNoBlankEntry); + this.groupBox2.Controls.Add(this.xShowPlayerNames); + this.groupBox2.Location = new System.Drawing.Point(6, 34); + this.groupBox2.Name = "groupBox2"; + this.groupBox2.Size = new System.Drawing.Size(256, 138); + this.groupBox2.TabIndex = 39; + this.groupBox2.TabStop = false; + this.groupBox2.Text = "Rozstawienie"; // - // xScoreRecap + // xMemberNumbers // - this.xScoreRecap.AutoSize = true; - this.xScoreRecap.Location = new System.Drawing.Point(339, 161); - this.xScoreRecap.Name = "xScoreRecap"; - this.xScoreRecap.Size = new System.Drawing.Size(176, 17); - this.xScoreRecap.TabIndex = 12; - this.xScoreRecap.Text = "podgląd zapisów bieżącej rundy"; - this.xScoreRecap.UseVisualStyleBackColor = true; + this.xMemberNumbers.AutoSize = true; + this.xMemberNumbers.Location = new System.Drawing.Point(12, 67); + this.xMemberNumbers.Name = "xMemberNumbers"; + this.xMemberNumbers.Size = new System.Drawing.Size(133, 17); + this.xMemberNumbers.TabIndex = 6; + this.xMemberNumbers.Text = "pytaj o ID zawodników"; + this.xMemberNumbers.UseVisualStyleBackColor = true; + this.xMemberNumbers.CheckedChanged += new System.EventHandler(this.xMemberNumbers_CheckedChanged); // - // xNextSeatings + // xShowPairNumbers // - this.xNextSeatings.AutoSize = true; - this.xNextSeatings.Location = new System.Drawing.Point(6, 184); - this.xNextSeatings.Name = "xNextSeatings"; - this.xNextSeatings.Size = new System.Drawing.Size(192, 17); - this.xNextSeatings.TabIndex = 8; - this.xNextSeatings.Text = "pokazuj rozstawienie kolejnej rundy"; - this.xNextSeatings.UseVisualStyleBackColor = true; + this.xShowPairNumbers.AutoSize = true; + this.xShowPairNumbers.Location = new System.Drawing.Point(12, 44); + this.xShowPairNumbers.Name = "xShowPairNumbers"; + this.xShowPairNumbers.Size = new System.Drawing.Size(118, 17); + this.xShowPairNumbers.TabIndex = 5; + this.xShowPairNumbers.Text = "pokazuj numery par"; + this.xShowPairNumbers.UseVisualStyleBackColor = true; + // + // xMemberNumbersNoBlankEntry + // + this.xMemberNumbersNoBlankEntry.AutoSize = true; + this.xMemberNumbersNoBlankEntry.Enabled = false; + this.xMemberNumbersNoBlankEntry.Location = new System.Drawing.Point(33, 90); + this.xMemberNumbersNoBlankEntry.Name = "xMemberNumbersNoBlankEntry"; + this.xMemberNumbersNoBlankEntry.Size = new System.Drawing.Size(131, 17); + this.xMemberNumbersNoBlankEntry.TabIndex = 7; + this.xMemberNumbersNoBlankEntry.Text = "ID nie może być puste"; + this.xMemberNumbersNoBlankEntry.UseVisualStyleBackColor = true; + // + // xShowPlayerNames + // + this.xShowPlayerNames.AutoSize = true; + this.xShowPlayerNames.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(238))); + this.xShowPlayerNames.Location = new System.Drawing.Point(12, 21); + this.xShowPlayerNames.Name = "xShowPlayerNames"; + this.xShowPlayerNames.Size = new System.Drawing.Size(126, 17); + this.xShowPlayerNames.TabIndex = 9; + this.xShowPlayerNames.Text = "pokazuj nazwiska"; + this.xShowPlayerNames.UseVisualStyleBackColor = true; + // + // groupBox6 + // + this.groupBox6.Controls.Add(this.xAutoShutDownBPC); + this.groupBox6.Controls.Add(this.xRemainingBoards); + this.groupBox6.Controls.Add(this.xNextSeatings); + this.groupBox6.Controls.Add(this.xScoreRecap); + this.groupBox6.Controls.Add(this.xAutoShowScoreRecap); + this.groupBox6.Location = new System.Drawing.Point(268, 178); + this.groupBox6.Name = "groupBox6"; + this.groupBox6.Size = new System.Drawing.Size(294, 140); + this.groupBox6.TabIndex = 43; + this.groupBox6.TabStop = false; + this.groupBox6.Text = "Koniec rundy"; + // + // xAutoShutDownBPC + // + this.xAutoShutDownBPC.AutoSize = true; + this.xAutoShutDownBPC.Location = new System.Drawing.Point(13, 114); + this.xAutoShutDownBPC.Name = "xAutoShutDownBPC"; + this.xAutoShutDownBPC.Size = new System.Drawing.Size(166, 17); + this.xAutoShutDownBPC.TabIndex = 17; + this.xAutoShutDownBPC.Text = "automat. wyłącz BCS po sesji"; + this.xAutoShutDownBPC.UseVisualStyleBackColor = true; // // xRemainingBoards // this.xRemainingBoards.AutoSize = true; - this.xRemainingBoards.Location = new System.Drawing.Point(6, 299); + this.xRemainingBoards.Location = new System.Drawing.Point(13, 68); this.xRemainingBoards.Name = "xRemainingBoards"; this.xRemainingBoards.Size = new System.Drawing.Size(205, 17); this.xRemainingBoards.TabIndex = 11; this.xRemainingBoards.Text = "pokazuj liczbę rozdań do końca rundy"; this.xRemainingBoards.UseVisualStyleBackColor = true; // - // xConfirmNP + // xNextSeatings // - this.xConfirmNP.AutoSize = true; - this.xConfirmNP.Location = new System.Drawing.Point(339, 46); - this.xConfirmNP.Name = "xConfirmNP"; - this.xConfirmNP.Size = new System.Drawing.Size(198, 17); - this.xConfirmNP.TabIndex = 22; - this.xConfirmNP.Text = "NoPlay potwierdzany przez sędziego"; - this.xConfirmNP.UseVisualStyleBackColor = true; + this.xNextSeatings.AutoSize = true; + this.xNextSeatings.Location = new System.Drawing.Point(13, 91); + this.xNextSeatings.Name = "xNextSeatings"; + this.xNextSeatings.Size = new System.Drawing.Size(192, 17); + this.xNextSeatings.TabIndex = 8; + this.xNextSeatings.Text = "pokazuj rozstawienie kolejnej rundy"; + this.xNextSeatings.UseVisualStyleBackColor = true; // - // xPINcode + // xScoreRecap // - this.xPINcode.Location = new System.Drawing.Point(367, 21); - this.xPINcode.MaxLength = 4; - this.xPINcode.Name = "xPINcode"; - this.xPINcode.Size = new System.Drawing.Size(37, 20); - this.xPINcode.TabIndex = 14; - this.xPINcode.Text = "0000"; + this.xScoreRecap.AutoSize = true; + this.xScoreRecap.Location = new System.Drawing.Point(13, 22); + this.xScoreRecap.Name = "xScoreRecap"; + this.xScoreRecap.Size = new System.Drawing.Size(176, 17); + this.xScoreRecap.TabIndex = 12; + this.xScoreRecap.Text = "podgląd zapisów bieżącej rundy"; + this.xScoreRecap.UseVisualStyleBackColor = true; // - // label2 + // xAutoShowScoreRecap // - this.label2.AutoSize = true; - this.label2.Location = new System.Drawing.Point(336, 24); - this.label2.Name = "label2"; - this.label2.Size = new System.Drawing.Size(25, 13); - this.label2.TabIndex = 27; - this.label2.Text = "PIN"; + this.xAutoShowScoreRecap.AutoSize = true; + this.xAutoShowScoreRecap.Location = new System.Drawing.Point(13, 45); + this.xAutoShowScoreRecap.Name = "xAutoShowScoreRecap"; + this.xAutoShowScoreRecap.Size = new System.Drawing.Size(228, 17); + this.xAutoShowScoreRecap.TabIndex = 13; + this.xAutoShowScoreRecap.Text = "podgląd zapisów na koniec rundy automat."; + this.xAutoShowScoreRecap.UseVisualStyleBackColor = true; // - // xAutoShutDownBPC + // groupBox3 // - this.xAutoShutDownBPC.AutoSize = true; - this.xAutoShutDownBPC.Location = new System.Drawing.Point(339, 92); - this.xAutoShutDownBPC.Name = "xAutoShutDownBPC"; - this.xAutoShutDownBPC.Size = new System.Drawing.Size(166, 17); - this.xAutoShutDownBPC.TabIndex = 17; - this.xAutoShutDownBPC.Text = "automat. wyłącz BCS po sesji"; - this.xAutoShutDownBPC.UseVisualStyleBackColor = true; + this.groupBox3.Controls.Add(this.xCollectPlay); + this.groupBox3.Controls.Add(this.xBoardOrderVerification); + this.groupBox3.Controls.Add(this.xIntermediateResults); + this.groupBox3.Controls.Add(this.xAutoBoardNumber); + this.groupBox3.Controls.Add(this.xCollectBidding); + this.groupBox3.Location = new System.Drawing.Point(4, 178); + this.groupBox3.Name = "groupBox3"; + this.groupBox3.Size = new System.Drawing.Size(257, 140); + this.groupBox3.TabIndex = 40; + this.groupBox3.TabStop = false; + this.groupBox3.Text = "Zapis rozdania"; // - // xIntermediateResults + // xCollectPlay // - this.xIntermediateResults.AutoSize = true; - this.xIntermediateResults.Location = new System.Drawing.Point(339, 69); - this.xIntermediateResults.Name = "xIntermediateResults"; - this.xIntermediateResults.Size = new System.Drawing.Size(161, 17); - this.xIntermediateResults.TabIndex = 16; - this.xIntermediateResults.Text = "zbieranie danych pośrednich"; - this.xIntermediateResults.UseVisualStyleBackColor = true; + this.xCollectPlay.AutoSize = true; + this.xCollectPlay.Location = new System.Drawing.Point(12, 114); + this.xCollectPlay.Name = "xCollectPlay"; + this.xCollectPlay.Size = new System.Drawing.Size(146, 17); + this.xCollectPlay.TabIndex = 31; + this.xCollectPlay.Text = "zbieraj przebieg rozgrywki"; + this.xCollectPlay.UseVisualStyleBackColor = true; // // xBoardOrderVerification // this.xBoardOrderVerification.AutoSize = true; - this.xBoardOrderVerification.Location = new System.Drawing.Point(6, 276); + this.xBoardOrderVerification.Location = new System.Drawing.Point(12, 45); this.xBoardOrderVerification.Name = "xBoardOrderVerification"; this.xBoardOrderVerification.Size = new System.Drawing.Size(156, 17); this.xBoardOrderVerification.TabIndex = 15; this.xBoardOrderVerification.Text = "sprawdzaj kolejność rozdań"; this.xBoardOrderVerification.UseVisualStyleBackColor = true; // - // xMemberNumbersNoBlankEntry + // xIntermediateResults // - this.xMemberNumbersNoBlankEntry.AutoSize = true; - this.xMemberNumbersNoBlankEntry.Enabled = false; - this.xMemberNumbersNoBlankEntry.Location = new System.Drawing.Point(27, 161); - this.xMemberNumbersNoBlankEntry.Name = "xMemberNumbersNoBlankEntry"; - this.xMemberNumbersNoBlankEntry.Size = new System.Drawing.Size(131, 17); - this.xMemberNumbersNoBlankEntry.TabIndex = 7; - this.xMemberNumbersNoBlankEntry.Text = "ID nie może być puste"; - this.xMemberNumbersNoBlankEntry.UseVisualStyleBackColor = true; + this.xIntermediateResults.AutoSize = true; + this.xIntermediateResults.Location = new System.Drawing.Point(12, 68); + this.xIntermediateResults.Name = "xIntermediateResults"; + this.xIntermediateResults.Size = new System.Drawing.Size(161, 17); + this.xIntermediateResults.TabIndex = 16; + this.xIntermediateResults.Text = "zbieranie danych pośrednich"; + this.xIntermediateResults.UseVisualStyleBackColor = true; // - // xMemberNumbers + // xAutoBoardNumber // - this.xMemberNumbers.AutoSize = true; - this.xMemberNumbers.Location = new System.Drawing.Point(6, 138); - this.xMemberNumbers.Name = "xMemberNumbers"; - this.xMemberNumbers.Size = new System.Drawing.Size(133, 17); - this.xMemberNumbers.TabIndex = 6; - this.xMemberNumbers.Text = "pytaj o ID zawodników"; - this.xMemberNumbers.UseVisualStyleBackColor = true; - this.xMemberNumbers.CheckedChanged += new System.EventHandler(this.xMemberNumbers_CheckedChanged); + this.xAutoBoardNumber.AutoSize = true; + this.xAutoBoardNumber.Location = new System.Drawing.Point(12, 22); + this.xAutoBoardNumber.Name = "xAutoBoardNumber"; + this.xAutoBoardNumber.Size = new System.Drawing.Size(174, 17); + this.xAutoBoardNumber.TabIndex = 10; + this.xAutoBoardNumber.Text = "automat. wpisuj numer rozdania"; + this.xAutoBoardNumber.UseVisualStyleBackColor = true; + // + // xCollectBidding + // + this.xCollectBidding.AutoSize = true; + this.xCollectBidding.Location = new System.Drawing.Point(12, 91); + this.xCollectBidding.Name = "xCollectBidding"; + this.xCollectBidding.Size = new System.Drawing.Size(97, 17); + this.xCollectBidding.TabIndex = 30; + this.xCollectBidding.Text = "zbieraj licytację"; + this.xCollectBidding.UseVisualStyleBackColor = true; + // + // groupBox5 + // + this.groupBox5.Controls.Add(this.xCheckLeadCard); + this.groupBox5.Controls.Add(this.xLeadCard); + this.groupBox5.Controls.Add(this.xViewHandrecord); + this.groupBox5.Location = new System.Drawing.Point(5, 324); + this.groupBox5.Name = "groupBox5"; + this.groupBox5.Size = new System.Drawing.Size(257, 121); + this.groupBox5.TabIndex = 42; + this.groupBox5.TabStop = false; + this.groupBox5.Text = "Rozkłady"; + // + // xCheckLeadCard + // + this.xCheckLeadCard.AutoSize = true; + this.xCheckLeadCard.Location = new System.Drawing.Point(12, 71); + this.xCheckLeadCard.Name = "xCheckLeadCard"; + this.xCheckLeadCard.Size = new System.Drawing.Size(180, 17); + this.xCheckLeadCard.TabIndex = 32; + this.xCheckLeadCard.Text = "sprawdź kartę wistu z rozkładem"; + this.xCheckLeadCard.UseVisualStyleBackColor = true; // // xLeadCard // this.xLeadCard.AutoSize = true; - this.xLeadCard.Location = new System.Drawing.Point(339, 230); + this.xLeadCard.Location = new System.Drawing.Point(12, 48); this.xLeadCard.Name = "xLeadCard"; this.xLeadCard.Size = new System.Drawing.Size(111, 17); this.xLeadCard.TabIndex = 21; this.xLeadCard.Text = "pytaj o kartę wistu"; this.xLeadCard.UseVisualStyleBackColor = true; // - // xShowContract - // - this.xShowContract.AutoSize = true; - this.xShowContract.Location = new System.Drawing.Point(339, 207); - this.xShowContract.Name = "xShowContract"; - this.xShowContract.Size = new System.Drawing.Size(150, 17); - this.xShowContract.TabIndex = 20; - this.xShowContract.Text = "pokazuj znaczki brydżowe"; - this.xShowContract.UseVisualStyleBackColor = true; + // xViewHandrecord // - // xShowPairNumbers + this.xViewHandrecord.AutoSize = true; + this.xViewHandrecord.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(238))); + this.xViewHandrecord.Location = new System.Drawing.Point(12, 25); + this.xViewHandrecord.Name = "xViewHandrecord"; + this.xViewHandrecord.Size = new System.Drawing.Size(123, 17); + this.xViewHandrecord.TabIndex = 29; + this.xViewHandrecord.Text = "pokazuj rozkłady"; + this.xViewHandrecord.UseVisualStyleBackColor = true; // - this.xShowPairNumbers.AutoSize = true; - this.xShowPairNumbers.Location = new System.Drawing.Point(6, 115); - this.xShowPairNumbers.Name = "xShowPairNumbers"; - this.xShowPairNumbers.Size = new System.Drawing.Size(118, 17); - this.xShowPairNumbers.TabIndex = 5; - this.xShowPairNumbers.Text = "pokazuj numery par"; - this.xShowPairNumbers.UseVisualStyleBackColor = true; + // groupBox4 + // + this.groupBox4.Controls.Add(this.lGroupSectionsWarning); + this.groupBox4.Controls.Add(this.xGroupSections); + this.groupBox4.Controls.Add(this.xShowResults); + this.groupBox4.Controls.Add(this.xRepeatResults); + this.groupBox4.Controls.Add(this.xShowPercentage); + this.groupBox4.Controls.Add(this.xShowContract); + this.groupBox4.Controls.Add(this.xResultsOverview); + this.groupBox4.Location = new System.Drawing.Point(268, 34); + this.groupBox4.Name = "groupBox4"; + this.groupBox4.Size = new System.Drawing.Size(294, 138); + this.groupBox4.TabIndex = 41; + this.groupBox4.TabStop = false; + this.groupBox4.Text = "Protokół"; + // + // lGroupSectionsWarning + // + this.lGroupSectionsWarning.Cursor = System.Windows.Forms.Cursors.Help; + this.lGroupSectionsWarning.Image = ((System.Drawing.Image)(resources.GetObject("lGroupSectionsWarning.Image"))); + this.lGroupSectionsWarning.Location = new System.Drawing.Point(9, 87); + this.lGroupSectionsWarning.Name = "lGroupSectionsWarning"; + this.lGroupSectionsWarning.Size = new System.Drawing.Size(22, 18); + this.lGroupSectionsWarning.TabIndex = 29; + this.lGroupSectionsWarning.Visible = false; + this.lGroupSectionsWarning.Click += new System.EventHandler(this.lGroupSectionsWarning_Click); // // xGroupSections // this.xGroupSections.AutoSize = true; this.xGroupSections.Enabled = false; - this.xGroupSections.Location = new System.Drawing.Point(27, 92); + this.xGroupSections.Location = new System.Drawing.Point(34, 89); this.xGroupSections.Name = "xGroupSections"; - this.xGroupSections.Size = new System.Drawing.Size(215, 17); + this.xGroupSections.Size = new System.Drawing.Size(227, 17); this.xGroupSections.TabIndex = 4; - this.xGroupSections.Text = "oddzielne maksowanie każdego sektora"; + this.xGroupSections.Text = "wspólne maksowanie wszystkich sektorów"; this.xGroupSections.UseVisualStyleBackColor = true; // - // xShowPercentage + // xShowResults // - this.xShowPercentage.AutoSize = true; - this.xShowPercentage.Enabled = false; - this.xShowPercentage.Location = new System.Drawing.Point(27, 69); - this.xShowPercentage.Name = "xShowPercentage"; - this.xShowPercentage.Size = new System.Drawing.Size(102, 17); - this.xShowPercentage.TabIndex = 3; - this.xShowPercentage.Text = "pokaż % wyniku"; - this.xShowPercentage.UseVisualStyleBackColor = true; + this.xShowResults.AutoSize = true; + this.xShowResults.Location = new System.Drawing.Point(13, 20); + this.xShowResults.Name = "xShowResults"; + this.xShowResults.Size = new System.Drawing.Size(159, 17); + this.xShowResults.TabIndex = 1; + this.xShowResults.Text = "pokazuj wynik rozdania jako"; + this.xShowResults.UseVisualStyleBackColor = true; + this.xShowResults.CheckedChanged += new System.EventHandler(this.xShowResults_CheckedChanged); // // xRepeatResults // this.xRepeatResults.AutoSize = true; this.xRepeatResults.Enabled = false; - this.xRepeatResults.Location = new System.Drawing.Point(27, 46); + this.xRepeatResults.Location = new System.Drawing.Point(34, 43); this.xRepeatResults.Name = "xRepeatResults"; this.xRepeatResults.Size = new System.Drawing.Size(155, 17); this.xRepeatResults.TabIndex = 2; this.xRepeatResults.Text = "nieskończone przeglądanie"; this.xRepeatResults.UseVisualStyleBackColor = true; // - // xShowResults + // xShowPercentage // - this.xShowResults.AutoSize = true; - this.xShowResults.Location = new System.Drawing.Point(6, 23); - this.xShowResults.Name = "xShowResults"; - this.xShowResults.Size = new System.Drawing.Size(159, 17); - this.xShowResults.TabIndex = 1; - this.xShowResults.Text = "pokazuj wynik rozdania jako"; - this.xShowResults.UseVisualStyleBackColor = true; - this.xShowResults.CheckedChanged += new System.EventHandler(this.xShowResults_CheckedChanged); + this.xShowPercentage.AutoSize = true; + this.xShowPercentage.Enabled = false; + this.xShowPercentage.Location = new System.Drawing.Point(34, 66); + this.xShowPercentage.Name = "xShowPercentage"; + this.xShowPercentage.Size = new System.Drawing.Size(102, 17); + this.xShowPercentage.TabIndex = 3; + this.xShowPercentage.Text = "pokaż % wyniku"; + this.xShowPercentage.UseVisualStyleBackColor = true; // - // label1 + // xShowContract // - this.label1.AutoSize = true; - this.label1.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Italic, System.Drawing.GraphicsUnit.Point, ((byte)(238))); - this.label1.ForeColor = System.Drawing.SystemColors.WindowText; - this.label1.Location = new System.Drawing.Point(83, 4); - this.label1.Name = "label1"; - this.label1.Size = new System.Drawing.Size(398, 13); - this.label1.TabIndex = 0; - this.label1.Text = "Te same ustawienia są ustawiane dla wszystkich sektorów, przynajmniej na razie :-" + - ")"; + this.xShowContract.AutoSize = true; + this.xShowContract.Location = new System.Drawing.Point(13, 112); + this.xShowContract.Name = "xShowContract"; + this.xShowContract.Size = new System.Drawing.Size(150, 17); + this.xShowContract.TabIndex = 20; + this.xShowContract.Text = "pokazuj znaczki brydżowe"; + this.xShowContract.UseVisualStyleBackColor = true; + // + // xResultsOverview + // + this.xResultsOverview.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; + this.xResultsOverview.Enabled = false; + this.xResultsOverview.FormattingEnabled = true; + this.xResultsOverview.Items.AddRange(new object[] { + "frekwens, 6x1", + "frekwens, 6x2", + "frekwens, 4x1", + "traveler, 6x1", + "traveler, 6x2", + "traveler, 4x1"}); + this.xResultsOverview.Location = new System.Drawing.Point(178, 18); + this.xResultsOverview.Name = "xResultsOverview"; + this.xResultsOverview.Size = new System.Drawing.Size(103, 21); + this.xResultsOverview.TabIndex = 28; // // tabPage2 // - this.tabPage2.Controls.Add(this.label9); - this.tabPage2.Controls.Add(this.eOomRounds); - this.tabPage2.Controls.Add(this.bForceSync); - this.tabPage2.Controls.Add(this.lNazwyTeamow); - this.tabPage2.Controls.Add(this.lSkok); - this.tabPage2.Controls.Add(this.eInterval); - this.tabPage2.Controls.Add(this.label10); - this.tabPage2.Controls.Add(this.label7); - this.tabPage2.Controls.Add(this.bTruncate); - this.tabPage2.Controls.Add(this.bMysqlSettings); - this.tabPage2.Controls.Add(this.label8); - this.tabPage2.Controls.Add(this.bAutoSync); - this.tabPage2.Controls.Add(this.bSync); - this.tabPage2.Controls.Add(this.lTables); - this.tabPage2.Controls.Add(this.lSections); - this.tabPage2.Controls.Add(this.lType); - this.tabPage2.Controls.Add(this.label6); - this.tabPage2.Controls.Add(this.label5); - this.tabPage2.Controls.Add(this.label4); - this.tabPage2.Controls.Add(this.lTournament); - this.tabPage2.Controls.Add(this.bTournament); - this.tabPage2.Controls.Add(this.label3); + this.tabPage2.Controls.Add(this.sectionToolStrip); + this.tabPage2.Controls.Add(this.namesPanel); + this.tabPage2.Controls.Add(this.syncToolStrip); + this.tabPage2.Controls.Add(this.toolStrip4); this.tabPage2.Location = new System.Drawing.Point(4, 22); this.tabPage2.Name = "tabPage2"; this.tabPage2.Padding = new System.Windows.Forms.Padding(3); - this.tabPage2.Size = new System.Drawing.Size(563, 374); + this.tabPage2.Size = new System.Drawing.Size(569, 511); this.tabPage2.TabIndex = 1; this.tabPage2.Text = "Nazwiska"; this.tabPage2.UseVisualStyleBackColor = true; // - // label9 - // - this.label9.AutoSize = true; - this.label9.Font = new System.Drawing.Font("Microsoft Sans Serif", 6F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(238))); - this.label9.Location = new System.Drawing.Point(10, 278); - this.label9.Name = "label9"; - this.label9.Size = new System.Drawing.Size(230, 9); - this.label9.TabIndex = 24; - this.label9.Text = "Rundy dla OOM (jeśli nie wiesz do czego to jest, to nic nie wpisuj!)"; + // sectionToolStrip + // + this.sectionToolStrip.BackColor = System.Drawing.Color.White; + this.sectionToolStrip.Dock = System.Windows.Forms.DockStyle.Bottom; + this.sectionToolStrip.GripMargin = new System.Windows.Forms.Padding(0); + this.sectionToolStrip.GripStyle = System.Windows.Forms.ToolStripGripStyle.Hidden; + this.sectionToolStrip.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { + this.eOomRounds, + this.lOomLabel, + this.toolStripButton2, + this.toolStripLabel1, + this.cbNamesSection}); + this.sectionToolStrip.Location = new System.Drawing.Point(3, 458); + this.sectionToolStrip.Name = "sectionToolStrip"; + this.sectionToolStrip.Size = new System.Drawing.Size(563, 25); + this.sectionToolStrip.TabIndex = 30; + this.sectionToolStrip.Text = "toolStrip5"; // // eOomRounds // - this.eOomRounds.Location = new System.Drawing.Point(12, 290); + this.eOomRounds.Alignment = System.Windows.Forms.ToolStripItemAlignment.Right; + this.eOomRounds.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.eOomRounds.Enabled = false; this.eOomRounds.Name = "eOomRounds"; - this.eOomRounds.Size = new System.Drawing.Size(100, 20); - this.eOomRounds.TabIndex = 23; + this.eOomRounds.Size = new System.Drawing.Size(80, 25); + this.eOomRounds.ToolTipText = "Jeśli nie wiesz do czego to jest, to nic nie wpisuj!"; + // + // lOomLabel + // + this.lOomLabel.Alignment = System.Windows.Forms.ToolStripItemAlignment.Right; + this.lOomLabel.Enabled = false; + this.lOomLabel.Name = "lOomLabel"; + this.lOomLabel.Size = new System.Drawing.Size(92, 22); + this.lOomLabel.Text = "Rundy dla OOM"; + this.lOomLabel.ToolTipText = "Jeśli nie wiesz do czego to jest, to nic nie wpisuj!"; + // + // toolStripButton2 + // + this.toolStripButton2.Alignment = System.Windows.Forms.ToolStripItemAlignment.Right; + this.toolStripButton2.BackColor = System.Drawing.Color.Transparent; + this.toolStripButton2.CheckOnClick = true; + this.toolStripButton2.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Text; + this.toolStripButton2.ImageTransparentColor = System.Drawing.Color.Magenta; + this.toolStripButton2.Name = "toolStripButton2"; + this.toolStripButton2.Size = new System.Drawing.Size(23, 22); + this.toolStripButton2.Text = "✔"; + this.toolStripButton2.TextAlign = System.Drawing.ContentAlignment.MiddleRight; + this.toolStripButton2.ToolTipText = "Jeśli nie wiesz do czego to jest, to nic nie wpisuj!"; + this.toolStripButton2.CheckedChanged += new System.EventHandler(this.toolStripButton2_CheckedChanged); + // + // toolStripLabel1 + // + this.toolStripLabel1.Name = "toolStripLabel1"; + this.toolStripLabel1.Size = new System.Drawing.Size(43, 22); + this.toolStripLabel1.Text = "Sektor:"; + // + // cbNamesSection + // + this.cbNamesSection.BackColor = System.Drawing.Color.White; + this.cbNamesSection.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; + this.cbNamesSection.DropDownWidth = 75; + this.cbNamesSection.Name = "cbNamesSection"; + this.cbNamesSection.Size = new System.Drawing.Size(75, 25); + // + // namesPanel + // + this.namesPanel.Controls.Add(this.bTeamsNamesSettings); + this.namesPanel.Controls.Add(this.checkBox1); + this.namesPanel.Controls.Add(this.button1); + this.namesPanel.Controls.Add(this.numNamesRefreshInterval); + this.namesPanel.Controls.Add(this.label9); + this.namesPanel.Controls.Add(this.label7); + this.namesPanel.Controls.Add(this.numTeamsTableOffset); + this.namesPanel.Controls.Add(this.label3); + this.namesPanel.Controls.Add(this.namesGridView); + this.namesPanel.Controls.Add(this.lTournament); + this.namesPanel.Controls.Add(this.label4); + this.namesPanel.Controls.Add(this.lType); + this.namesPanel.Controls.Add(this.label5); + this.namesPanel.Controls.Add(this.lSkok); + this.namesPanel.Controls.Add(this.lSections); + this.namesPanel.Controls.Add(this.label8); + this.namesPanel.Controls.Add(this.label6); + this.namesPanel.Controls.Add(this.lTables); + this.namesPanel.Location = new System.Drawing.Point(3, 31); + this.namesPanel.Name = "namesPanel"; + this.namesPanel.Size = new System.Drawing.Size(562, 425); + this.namesPanel.TabIndex = 29; + // + // bTeamsNamesSettings + // + this.bTeamsNamesSettings.FlatAppearance.BorderSize = 0; + this.bTeamsNamesSettings.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.bTeamsNamesSettings.Image = ((System.Drawing.Image)(resources.GetObject("bTeamsNamesSettings.Image"))); + this.bTeamsNamesSettings.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft; + this.bTeamsNamesSettings.Location = new System.Drawing.Point(188, 40); + this.bTeamsNamesSettings.Name = "bTeamsNamesSettings"; + this.bTeamsNamesSettings.Size = new System.Drawing.Size(136, 23); + this.bTeamsNamesSettings.TabIndex = 36; + this.bTeamsNamesSettings.UseVisualStyleBackColor = true; + this.bTeamsNamesSettings.Visible = false; + this.bTeamsNamesSettings.Click += new System.EventHandler(this.bTeamsNamesSettings_Click); + // + // checkBox1 + // + this.checkBox1.AutoSize = true; + this.checkBox1.Checked = true; + this.checkBox1.CheckState = System.Windows.Forms.CheckState.Checked; + this.checkBox1.Location = new System.Drawing.Point(252, 74); + this.checkBox1.Name = "checkBox1"; + this.checkBox1.Size = new System.Drawing.Size(154, 17); + this.checkBox1.TabIndex = 35; + this.checkBox1.Text = "Odśwież podgląd co (sek.):"; + this.checkBox1.UseVisualStyleBackColor = true; + this.checkBox1.CheckedChanged += new System.EventHandler(this.checkBox1_CheckedChanged); + // + // button1 + // + this.button1.AutoSize = true; + this.button1.FlatAppearance.BorderColor = System.Drawing.SystemColors.Window; + this.button1.FlatStyle = System.Windows.Forms.FlatStyle.Flat; + this.button1.Image = ((System.Drawing.Image)(resources.GetObject("button1.Image"))); + this.button1.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft; + this.button1.Location = new System.Drawing.Point(468, 69); + this.button1.Name = "button1"; + this.button1.Size = new System.Drawing.Size(90, 25); + this.button1.TabIndex = 34; + this.button1.Text = "Usuń zmiany"; + this.button1.TextAlign = System.Drawing.ContentAlignment.MiddleRight; + this.button1.UseVisualStyleBackColor = true; + this.button1.Click += new System.EventHandler(this.button1_Click); + // + // numNamesRefreshInterval + // + this.numNamesRefreshInterval.Location = new System.Drawing.Point(408, 73); + this.numNamesRefreshInterval.Maximum = new decimal(new int[] { + 120, + 0, + 0, + 0}); + this.numNamesRefreshInterval.Minimum = new decimal(new int[] { + 1, + 0, + 0, + 0}); + this.numNamesRefreshInterval.Name = "numNamesRefreshInterval"; + this.numNamesRefreshInterval.Size = new System.Drawing.Size(41, 20); + this.numNamesRefreshInterval.TabIndex = 33; + this.numNamesRefreshInterval.Value = new decimal(new int[] { + 3, + 0, + 0, + 0}); + this.numNamesRefreshInterval.ValueChanged += new System.EventHandler(this.numNamesRefreshInterval_ValueChanged); // - // bForceSync + // label9 // - this.bForceSync.Font = new System.Drawing.Font("Microsoft Sans Serif", 6.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(238))); - this.bForceSync.Location = new System.Drawing.Point(336, 97); - this.bForceSync.Name = "bForceSync"; - this.bForceSync.Size = new System.Drawing.Size(152, 40); - this.bForceSync.TabIndex = 22; - this.bForceSync.Text = "Wymuś przesłanie wszystkich do serwerka ponownie"; - this.bForceSync.UseVisualStyleBackColor = true; - this.bForceSync.Click += new System.EventHandler(this.bForceSync_Click); + this.label9.AutoSize = true; + this.label9.Location = new System.Drawing.Point(3, 389); + this.label9.Name = "label9"; + this.label9.Size = new System.Drawing.Size(499, 13); + this.label9.TabIndex = 31; + this.label9.Text = "Zmiany wprowadzone powyżej nie zostaną nadpisane danymi z turnieju i nie zostaną " + + "zapisane w turnieju."; // - // lNazwyTeamow + // label7 // - this.lNazwyTeamow.AutoSize = true; - this.lNazwyTeamow.Location = new System.Drawing.Point(301, 51); - this.lNazwyTeamow.Name = "lNazwyTeamow"; - this.lNazwyTeamow.Size = new System.Drawing.Size(227, 13); - this.lNazwyTeamow.TabIndex = 20; - this.lNazwyTeamow.Text = "w piernikach będą wyświetlane nazwy teamów"; - this.lNazwyTeamow.Visible = false; + this.label7.AutoSize = true; + this.label7.Location = new System.Drawing.Point(3, 67); + this.label7.Name = "label7"; + this.label7.Size = new System.Drawing.Size(226, 26); + this.label7.TabIndex = 30; + this.label7.Text = "Podgląd nazwisk:\r\n(najedź, by zobaczyć skrócony tekst dla BWS)"; + // + // numTeamsTableOffset + // + this.numTeamsTableOffset.Location = new System.Drawing.Point(505, 43); + this.numTeamsTableOffset.Maximum = new decimal(new int[] { + 1000, + 0, + 0, + 0}); + this.numTeamsTableOffset.Name = "numTeamsTableOffset"; + this.numTeamsTableOffset.Size = new System.Drawing.Size(53, 20); + this.numTeamsTableOffset.TabIndex = 29; + this.numTeamsTableOffset.Value = new decimal(new int[] { + 100, + 0, + 0, + 0}); // - // lSkok + // label3 // - this.lSkok.AutoSize = true; - this.lSkok.Location = new System.Drawing.Point(77, 150); - this.lSkok.Name = "lSkok"; - this.lSkok.Size = new System.Drawing.Size(188, 13); - this.lSkok.TabIndex = 19; - this.lSkok.Text = "mam nadzieję, że skok stołów = 100 :)"; - this.lSkok.Visible = false; + this.label3.AutoSize = true; + this.label3.Location = new System.Drawing.Point(16, 18); + this.label3.Name = "label3"; + this.label3.Size = new System.Drawing.Size(42, 13); + this.label3.TabIndex = 0; + this.label3.Text = "Turniej:"; // - // eInterval + // namesGridView // - this.eInterval.Enabled = false; - this.eInterval.Location = new System.Drawing.Point(389, 177); - this.eInterval.MaxLength = 4; - this.eInterval.Name = "eInterval"; - this.eInterval.Size = new System.Drawing.Size(45, 20); - this.eInterval.TabIndex = 18; - this.eInterval.Text = "60"; + this.namesGridView.AllowUserToAddRows = false; + this.namesGridView.AllowUserToDeleteRows = false; + this.namesGridView.AllowUserToResizeColumns = false; + this.namesGridView.AllowUserToResizeRows = false; + this.namesGridView.AutoSizeColumnsMode = System.Windows.Forms.DataGridViewAutoSizeColumnsMode.Fill; + this.namesGridView.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize; + this.namesGridView.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] { + this.Number, + this.NorthSouth, + this.EastWest}); + this.namesGridView.Location = new System.Drawing.Point(2, 98); + this.namesGridView.Name = "namesGridView"; + this.namesGridView.Size = new System.Drawing.Size(557, 287); + this.namesGridView.TabIndex = 28; + this.namesGridView.CellMouseEnter += new System.Windows.Forms.DataGridViewCellEventHandler(this.namesGridView_CellMouseEnter); + this.namesGridView.CellValueChanged += new System.Windows.Forms.DataGridViewCellEventHandler(this.namesGridView_CellValueChanged); // - // label10 + // Number // - this.label10.AutoSize = true; - this.label10.Location = new System.Drawing.Point(440, 180); - this.label10.Name = "label10"; - this.label10.Size = new System.Drawing.Size(27, 13); - this.label10.TabIndex = 17; - this.label10.Text = "sek."; + this.Number.HeaderText = "Nr"; + this.Number.Name = "Number"; + this.Number.ReadOnly = true; // - // label7 + // NorthSouth // - this.label7.AutoSize = true; - this.label7.Location = new System.Drawing.Point(364, 180); - this.label7.Name = "label7"; - this.label7.Size = new System.Drawing.Size(19, 13); - this.label7.TabIndex = 16; - this.label7.Text = "co"; + this.NorthSouth.FillWeight = 300F; + this.NorthSouth.HeaderText = "N lub E"; + this.NorthSouth.Name = "NorthSouth"; // - // bTruncate + // EastWest // - this.bTruncate.Location = new System.Drawing.Point(434, 223); - this.bTruncate.Name = "bTruncate"; - this.bTruncate.Size = new System.Drawing.Size(123, 23); - this.bTruncate.TabIndex = 15; - this.bTruncate.Text = "Usuń nazwiska z bws"; - this.bTruncate.UseVisualStyleBackColor = true; - this.bTruncate.Visible = false; - this.bTruncate.Click += new System.EventHandler(this.bTruncate_Click); + this.EastWest.FillWeight = 300F; + this.EastWest.HeaderText = "S lub W"; + this.EastWest.Name = "EastWest"; // - // bMysqlSettings + // lTournament // - this.bMysqlSettings.Location = new System.Drawing.Point(434, 336); - this.bMysqlSettings.Name = "bMysqlSettings"; - this.bMysqlSettings.Size = new System.Drawing.Size(123, 23); - this.bMysqlSettings.TabIndex = 14; - this.bMysqlSettings.Text = "Ustawienia MySQL"; - this.bMysqlSettings.UseVisualStyleBackColor = true; - this.bMysqlSettings.Click += new System.EventHandler(this.bMysqlSettings_Click); + this.lTournament.AutoSize = true; + this.lTournament.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(238))); + this.lTournament.Location = new System.Drawing.Point(64, 18); + this.lTournament.Name = "lTournament"; + this.lTournament.Size = new System.Drawing.Size(0, 16); + this.lTournament.TabIndex = 2; // - // label8 + // label4 // - this.label8.AutoSize = true; - this.label8.Location = new System.Drawing.Point(268, 3); - this.label8.Name = "label8"; - this.label8.Size = new System.Drawing.Size(292, 13); - this.label8.TabIndex = 12; - this.label8.Text = "(do serwerka wysyłane są tylko nazwiska, które się zmieniły)"; + this.label4.AutoSize = true; + this.label4.Location = new System.Drawing.Point(30, 45); + this.label4.Name = "label4"; + this.label4.Size = new System.Drawing.Size(28, 13); + this.label4.TabIndex = 3; + this.label4.Text = "Typ:"; // - // bAutoSync + // lType // - this.bAutoSync.Enabled = false; - this.bAutoSync.Location = new System.Drawing.Point(336, 150); - this.bAutoSync.Name = "bAutoSync"; - this.bAutoSync.Size = new System.Drawing.Size(152, 27); - this.bAutoSync.TabIndex = 11; - this.bAutoSync.Text = "Synchronizuj cyklicznie"; - this.bAutoSync.UseVisualStyleBackColor = true; - this.bAutoSync.Click += new System.EventHandler(this.bAutoSync_Click); + this.lType.AutoSize = true; + this.lType.Location = new System.Drawing.Point(64, 45); + this.lType.Name = "lType"; + this.lType.Size = new System.Drawing.Size(0, 13); + this.lType.TabIndex = 6; // - // bSync + // label5 // - this.bSync.Enabled = false; - this.bSync.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(238))); - this.bSync.Location = new System.Drawing.Point(336, 67); - this.bSync.Name = "bSync"; - this.bSync.Size = new System.Drawing.Size(152, 33); - this.bSync.TabIndex = 9; - this.bSync.Text = "Synchronizuj teraz"; - this.bSync.UseVisualStyleBackColor = true; - this.bSync.Click += new System.EventHandler(this.bSync_Click); + this.label5.AutoSize = true; + this.label5.Location = new System.Drawing.Point(342, 18); + this.label5.Name = "label5"; + this.label5.Size = new System.Drawing.Size(55, 13); + this.label5.TabIndex = 4; + this.label5.Text = "Sektorów:"; // - // lTables + // lSkok // - this.lTables.AutoSize = true; - this.lTables.Location = new System.Drawing.Point(77, 127); - this.lTables.Name = "lTables"; - this.lTables.Size = new System.Drawing.Size(0, 13); - this.lTables.TabIndex = 8; + this.lSkok.AutoSize = true; + this.lSkok.Location = new System.Drawing.Point(430, 45); + this.lSkok.Name = "lSkok"; + this.lSkok.Size = new System.Drawing.Size(74, 13); + this.lSkok.TabIndex = 19; + this.lSkok.Text = "skok stołów ="; + this.lSkok.Visible = false; // // lSections // this.lSections.AutoSize = true; - this.lSections.Location = new System.Drawing.Point(77, 102); + this.lSections.Location = new System.Drawing.Point(403, 18); this.lSections.Name = "lSections"; this.lSections.Size = new System.Drawing.Size(0, 13); this.lSections.TabIndex = 7; // - // lType + // label8 // - this.lType.AutoSize = true; - this.lType.Location = new System.Drawing.Point(77, 77); - this.lType.Name = "lType"; - this.lType.Size = new System.Drawing.Size(0, 13); - this.lType.TabIndex = 6; + this.label8.AutoSize = true; + this.label8.Location = new System.Drawing.Point(5, 406); + this.label8.Name = "label8"; + this.label8.Size = new System.Drawing.Size(323, 13); + this.label8.TabIndex = 12; + this.label8.Text = "Do serwerka wysyłane są tylko nazwiska, które się zaktualizowały."; // // label6 // this.label6.AutoSize = true; - this.label6.Location = new System.Drawing.Point(9, 127); + this.label6.Location = new System.Drawing.Point(353, 45); this.label6.Name = "label6"; this.label6.Size = new System.Drawing.Size(44, 13); this.label6.TabIndex = 5; this.label6.Text = "Stołów:"; // - // label5 + // lTables // - this.label5.AutoSize = true; - this.label5.Location = new System.Drawing.Point(9, 102); - this.label5.Name = "label5"; - this.label5.Size = new System.Drawing.Size(55, 13); - this.label5.TabIndex = 4; - this.label5.Text = "Sektorów:"; + this.lTables.AutoSize = true; + this.lTables.Location = new System.Drawing.Point(403, 45); + this.lTables.Name = "lTables"; + this.lTables.Size = new System.Drawing.Size(0, 13); + this.lTables.TabIndex = 8; // - // label4 + // syncToolStrip + // + this.syncToolStrip.BackColor = System.Drawing.Color.White; + this.syncToolStrip.Dock = System.Windows.Forms.DockStyle.Bottom; + this.syncToolStrip.GripMargin = new System.Windows.Forms.Padding(0); + this.syncToolStrip.GripStyle = System.Windows.Forms.ToolStripGripStyle.Hidden; + this.syncToolStrip.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { + this.bSync, + this.eInterval, + this.bAutoSync}); + this.syncToolStrip.Location = new System.Drawing.Point(3, 483); + this.syncToolStrip.Name = "syncToolStrip"; + this.syncToolStrip.Size = new System.Drawing.Size(563, 25); + this.syncToolStrip.TabIndex = 27; + this.syncToolStrip.Text = "toolStrip5"; // - this.label4.AutoSize = true; - this.label4.Location = new System.Drawing.Point(9, 77); - this.label4.Name = "label4"; - this.label4.Size = new System.Drawing.Size(28, 13); - this.label4.TabIndex = 3; - this.label4.Text = "Typ:"; + // bSync // - // lTournament + this.bSync.Font = new System.Drawing.Font("Segoe UI", 9F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(238))); + this.bSync.Image = ((System.Drawing.Image)(resources.GetObject("bSync.Image"))); + this.bSync.ImageTransparentColor = System.Drawing.Color.Magenta; + this.bSync.Name = "bSync"; + this.bSync.Size = new System.Drawing.Size(130, 22); + this.bSync.Text = "Synchronizuj teraz"; + this.bSync.Click += new System.EventHandler(this.bSync_Click); // - this.lTournament.AutoSize = true; - this.lTournament.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(238))); - this.lTournament.Location = new System.Drawing.Point(135, 30); - this.lTournament.Name = "lTournament"; - this.lTournament.Size = new System.Drawing.Size(0, 16); - this.lTournament.TabIndex = 2; + // eInterval // - // bTournament + this.eInterval.Alignment = System.Windows.Forms.ToolStripItemAlignment.Right; + this.eInterval.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle; + this.eInterval.Name = "eInterval"; + this.eInterval.Size = new System.Drawing.Size(50, 25); // - this.bTournament.Location = new System.Drawing.Point(54, 27); - this.bTournament.Name = "bTournament"; - this.bTournament.Size = new System.Drawing.Size(75, 23); - this.bTournament.TabIndex = 1; - this.bTournament.Text = "wybierz"; - this.bTournament.UseVisualStyleBackColor = true; - this.bTournament.Click += new System.EventHandler(this.bTournament_Click); + // bAutoSync // - // label3 + this.bAutoSync.Alignment = System.Windows.Forms.ToolStripItemAlignment.Right; + this.bAutoSync.Image = ((System.Drawing.Image)(resources.GetObject("bAutoSync.Image"))); + this.bAutoSync.ImageTransparentColor = System.Drawing.Color.Magenta; + this.bAutoSync.Margin = new System.Windows.Forms.Padding(30, 1, 0, 2); + this.bAutoSync.Name = "bAutoSync"; + this.bAutoSync.Size = new System.Drawing.Size(114, 22); + this.bAutoSync.Text = "Synchronizuj co:"; + this.bAutoSync.Click += new System.EventHandler(this.bAutoSync_Click); // - this.label3.AutoSize = true; - this.label3.Location = new System.Drawing.Point(6, 32); - this.label3.Name = "label3"; - this.label3.Size = new System.Drawing.Size(42, 13); - this.label3.TabIndex = 0; - this.label3.Text = "Turniej:"; + // toolStrip4 + // + this.toolStrip4.BackColor = System.Drawing.Color.White; + this.toolStrip4.GripMargin = new System.Windows.Forms.Padding(0); + this.toolStrip4.GripStyle = System.Windows.Forms.ToolStripGripStyle.Hidden; + this.toolStrip4.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { + this.toolStripSplitButton1, + this.bMysqlSettings, + this.bForceSync, + this.bTruncate}); + this.toolStrip4.Location = new System.Drawing.Point(3, 3); + this.toolStrip4.Name = "toolStrip4"; + this.toolStrip4.Size = new System.Drawing.Size(563, 25); + this.toolStrip4.TabIndex = 26; + this.toolStrip4.Text = "toolStrip4"; + // + // toolStripSplitButton1 + // + this.toolStripSplitButton1.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { + this.bMySQLTournament, + this.bRRBTournament}); + this.toolStripSplitButton1.Image = ((System.Drawing.Image)(resources.GetObject("toolStripSplitButton1.Image"))); + this.toolStripSplitButton1.ImageTransparentColor = System.Drawing.Color.Magenta; + this.toolStripSplitButton1.Name = "toolStripSplitButton1"; + this.toolStripSplitButton1.Size = new System.Drawing.Size(76, 22); + this.toolStripSplitButton1.Text = "Turniej"; + this.toolStripSplitButton1.ToolTipText = "Wybierz turniej"; + this.toolStripSplitButton1.ButtonClick += new System.EventHandler(this.toolStripSplitButton1_ButtonClick); + // + // bMySQLTournament + // + this.bMySQLTournament.Image = ((System.Drawing.Image)(resources.GetObject("bMySQLTournament.Image"))); + this.bMySQLTournament.Name = "bMySQLTournament"; + this.bMySQLTournament.Size = new System.Drawing.Size(95, 22); + this.bMySQLTournament.Text = "JFR"; + this.bMySQLTournament.ToolTipText = "JFR Pary lub JFR Teamy"; + this.bMySQLTournament.Click += new System.EventHandler(this.bMySQLTournament_Click); + // + // bRRBTournament + // + this.bRRBTournament.Image = ((System.Drawing.Image)(resources.GetObject("bRRBTournament.Image"))); + this.bRRBTournament.Name = "bRRBTournament"; + this.bRRBTournament.Size = new System.Drawing.Size(95, 22); + this.bRRBTournament.Text = "RRB"; + this.bRRBTournament.ToolTipText = "Red Rose Bridge"; + this.bRRBTournament.Click += new System.EventHandler(this.bRRBTournament_Click); + // + // bMysqlSettings + // + this.bMysqlSettings.Alignment = System.Windows.Forms.ToolStripItemAlignment.Right; + this.bMysqlSettings.Image = ((System.Drawing.Image)(resources.GetObject("bMysqlSettings.Image"))); + this.bMysqlSettings.ImageTransparentColor = System.Drawing.Color.Magenta; + this.bMysqlSettings.Name = "bMysqlSettings"; + this.bMysqlSettings.Size = new System.Drawing.Size(125, 22); + this.bMysqlSettings.Text = "Ustawienia MySQL"; + this.bMysqlSettings.Click += new System.EventHandler(this.bMysqlSettings_Click); + // + // bForceSync + // + this.bForceSync.Image = ((System.Drawing.Image)(resources.GetObject("bForceSync.Image"))); + this.bForceSync.ImageTransparentColor = System.Drawing.Color.Magenta; + this.bForceSync.Margin = new System.Windows.Forms.Padding(65, 1, 0, 2); + this.bForceSync.Name = "bForceSync"; + this.bForceSync.Size = new System.Drawing.Size(122, 22); + this.bForceSync.Text = "Wymuś przesłanie"; + this.bForceSync.ToolTipText = "Wymuś przesłanie wszystkich do serwerka ponownie"; + this.bForceSync.Click += new System.EventHandler(this.bForceSync_Click); + // + // bTruncate + // + this.bTruncate.Image = ((System.Drawing.Image)(resources.GetObject("bTruncate.Image"))); + this.bTruncate.ImageTransparentColor = System.Drawing.Color.Magenta; + this.bTruncate.Name = "bTruncate"; + this.bTruncate.Size = new System.Drawing.Size(139, 22); + this.bTruncate.Text = "Usuń nazwiska z BWS"; + this.bTruncate.Click += new System.EventHandler(this.bTruncate_Click); // // tabPage3 // - this.tabPage3.Controls.Add(this.bClearHands); - this.tabPage3.Controls.Add(this.lRecordSections); - this.tabPage3.Controls.Add(this.cblSections); - this.tabPage3.Controls.Add(this.label14); + this.tabPage3.Controls.Add(this.label17); + this.tabPage3.Controls.Add(this.label18); + this.tabPage3.Controls.Add(this.label15); + this.tabPage3.Controls.Add(this.label16); this.tabPage3.Controls.Add(this.label13); - this.tabPage3.Controls.Add(this.lWczytywane); + this.tabPage3.Controls.Add(this.label14); this.tabPage3.Controls.Add(this.label12); + this.tabPage3.Controls.Add(this.label10); + this.tabPage3.Controls.Add(this.gwSections); + this.tabPage3.Controls.Add(this.toolStrip3); + this.tabPage3.Controls.Add(this.lRecordSections); this.tabPage3.Controls.Add(this.label11); - this.tabPage3.Controls.Add(this.bLoadHands); this.tabPage3.Location = new System.Drawing.Point(4, 22); this.tabPage3.Name = "tabPage3"; this.tabPage3.Padding = new System.Windows.Forms.Padding(3); - this.tabPage3.Size = new System.Drawing.Size(563, 374); + this.tabPage3.Size = new System.Drawing.Size(569, 511); this.tabPage3.TabIndex = 2; this.tabPage3.Text = "Rozkłady"; this.tabPage3.UseVisualStyleBackColor = true; // - // bClearHands + // label17 // - this.bClearHands.Location = new System.Drawing.Point(334, 336); - this.bClearHands.Name = "bClearHands"; - this.bClearHands.Size = new System.Drawing.Size(223, 23); - this.bClearHands.TabIndex = 8; - this.bClearHands.Text = "Usuń rozkłady dla wszystkich sektorów"; - this.bClearHands.UseVisualStyleBackColor = true; - this.bClearHands.Click += new System.EventHandler(this.bClearHands_Click); + this.label17.AutoSize = true; + this.label17.Location = new System.Drawing.Point(458, 460); + this.label17.Name = "label17"; + this.label17.Size = new System.Drawing.Size(71, 13); + this.label17.TabIndex = 18; + this.label17.Text = "brak rozdania"; // - // lRecordSections + // label18 // - this.lRecordSections.AutoSize = true; - this.lRecordSections.Location = new System.Drawing.Point(23, 150); - this.lRecordSections.Name = "lRecordSections"; - this.lRecordSections.Size = new System.Drawing.Size(46, 13); - this.lRecordSections.TabIndex = 7; - this.lRecordSections.Text = "Sektory:"; + this.label18.AutoSize = true; + this.label18.BackColor = System.Drawing.SystemColors.ControlDark; + this.label18.Location = new System.Drawing.Point(432, 456); + this.label18.MinimumSize = new System.Drawing.Size(20, 20); + this.label18.Name = "label18"; + this.label18.Size = new System.Drawing.Size(20, 20); + this.label18.TabIndex = 17; + this.label18.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; // - // cblSections + // label15 // - this.cblSections.BorderStyle = System.Windows.Forms.BorderStyle.None; - this.cblSections.CheckOnClick = true; - this.cblSections.FormattingEnabled = true; - this.cblSections.Location = new System.Drawing.Point(26, 178); - this.cblSections.MultiColumn = true; - this.cblSections.Name = "cblSections"; - this.cblSections.Size = new System.Drawing.Size(456, 105); - this.cblSections.TabIndex = 6; - this.cblSections.SelectedIndexChanged += new System.EventHandler(this.cblSections_SelectedIndexChanged); + this.label15.AutoSize = true; + this.label15.Location = new System.Drawing.Point(322, 460); + this.label15.Name = "label15"; + this.label15.Size = new System.Drawing.Size(104, 13); + this.label15.TabIndex = 16; + this.label15.Text = "rozkład niewczytany"; // - // label14 + // label16 // - this.label14.AutoSize = true; - this.label14.Location = new System.Drawing.Point(6, 315); - this.label14.Name = "label14"; - this.label14.Size = new System.Drawing.Size(247, 13); - this.label14.TabIndex = 5; - this.label14.Text = "to także należy ręcznie zrobić Upload (patrz wyżej)."; + this.label16.AutoSize = true; + this.label16.BackColor = System.Drawing.Color.Crimson; + this.label16.Location = new System.Drawing.Point(296, 456); + this.label16.MinimumSize = new System.Drawing.Size(20, 20); + this.label16.Name = "label16"; + this.label16.Size = new System.Drawing.Size(20, 20); + this.label16.TabIndex = 15; + this.label16.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; // // label13 // this.label13.AutoSize = true; - this.label13.Location = new System.Drawing.Point(6, 293); + this.label13.Location = new System.Drawing.Point(156, 460); this.label13.Name = "label13"; - this.label13.Size = new System.Drawing.Size(476, 13); - this.label13.TabIndex = 4; - this.label13.Text = "Jeżeli Server->Show hand records w BCS nie pokazuje rozkładów (i/lub nie pokazują" + - " ich pierniczki)"; + this.label13.Size = new System.Drawing.Size(134, 13); + this.label13.TabIndex = 14; + this.label13.Text = "rozkład wczytany z analizą"; // - // lWczytywane + // label14 // - this.lWczytywane.AutoSize = true; - this.lWczytywane.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(238))); - this.lWczytywane.Location = new System.Drawing.Point(218, 84); - this.lWczytywane.Name = "lWczytywane"; - this.lWczytywane.Size = new System.Drawing.Size(139, 13); - this.lWczytywane.TabIndex = 3; - this.lWczytywane.Text = "Wczytywane rozkłady: "; + this.label14.AutoSize = true; + this.label14.BackColor = System.Drawing.Color.LimeGreen; + this.label14.ForeColor = System.Drawing.Color.White; + this.label14.Location = new System.Drawing.Point(130, 456); + this.label14.MinimumSize = new System.Drawing.Size(20, 20); + this.label14.Name = "label14"; + this.label14.Size = new System.Drawing.Size(20, 20); + this.label14.TabIndex = 13; + this.label14.Text = "A"; + this.label14.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; // // label12 // this.label12.AutoSize = true; - this.label12.Location = new System.Drawing.Point(6, 36); + this.label12.Location = new System.Drawing.Point(34, 460); this.label12.Name = "label12"; - this.label12.Size = new System.Drawing.Size(408, 13); - this.label12.TabIndex = 2; - this.label12.Text = "W przeciwnym razie trzeba w BCS wybrać: Session->Upload hand records->Upload..."; + this.label12.Size = new System.Drawing.Size(90, 13); + this.label12.TabIndex = 12; + this.label12.Text = "rozkład wczytany"; // - // label11 + // label10 // - this.label11.AutoSize = true; - this.label11.Location = new System.Drawing.Point(6, 14); - this.label11.Name = "label11"; - this.label11.Size = new System.Drawing.Size(280, 13); - this.label11.TabIndex = 1; - this.label11.Text = "Rozkłady muszą zostać wczytane przed \"Uruchom BCS\"."; + this.label10.AutoSize = true; + this.label10.BackColor = System.Drawing.Color.LimeGreen; + this.label10.Location = new System.Drawing.Point(8, 456); + this.label10.MinimumSize = new System.Drawing.Size(20, 20); + this.label10.Name = "label10"; + this.label10.Size = new System.Drawing.Size(20, 20); + this.label10.TabIndex = 11; + this.label10.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; + // + // gwSections + // + this.gwSections.AllowUserToAddRows = false; + this.gwSections.AllowUserToDeleteRows = false; + this.gwSections.AllowUserToResizeColumns = false; + this.gwSections.AllowUserToResizeRows = false; + this.gwSections.ClipboardCopyMode = System.Windows.Forms.DataGridViewClipboardCopyMode.Disable; + this.gwSections.ColumnHeadersBorderStyle = System.Windows.Forms.DataGridViewHeaderBorderStyle.Sunken; + dataGridViewCellStyle1.Alignment = System.Windows.Forms.DataGridViewContentAlignment.TopLeft; + dataGridViewCellStyle1.BackColor = System.Drawing.SystemColors.Control; + dataGridViewCellStyle1.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(238))); + dataGridViewCellStyle1.ForeColor = System.Drawing.SystemColors.WindowText; + dataGridViewCellStyle1.SelectionBackColor = System.Drawing.SystemColors.Highlight; + dataGridViewCellStyle1.SelectionForeColor = System.Drawing.SystemColors.HighlightText; + dataGridViewCellStyle1.WrapMode = System.Windows.Forms.DataGridViewTriState.True; + this.gwSections.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle1; + this.gwSections.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize; + this.gwSections.Location = new System.Drawing.Point(9, 118); + this.gwSections.MultiSelect = false; + this.gwSections.Name = "gwSections"; + this.gwSections.RowHeadersWidthSizeMode = System.Windows.Forms.DataGridViewRowHeadersWidthSizeMode.AutoSizeToAllHeaders; + this.gwSections.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.CellSelect; + this.gwSections.ShowCellErrors = false; + this.gwSections.ShowEditingIcon = false; + this.gwSections.ShowRowErrors = false; + this.gwSections.Size = new System.Drawing.Size(554, 335); + this.gwSections.TabIndex = 10; + this.gwSections.CellContentDoubleClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.gwSections_CellDoubleClick); + this.gwSections.CellDoubleClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.gwSections_CellDoubleClick); + this.gwSections.CurrentCellDirtyStateChanged += new System.EventHandler(this.gwSections_CurrentCellDirtyStateChanged); + // + // toolStrip3 + // + this.toolStrip3.BackColor = System.Drawing.Color.White; + this.toolStrip3.Dock = System.Windows.Forms.DockStyle.Bottom; + this.toolStrip3.GripMargin = new System.Windows.Forms.Padding(0); + this.toolStrip3.GripStyle = System.Windows.Forms.ToolStripGripStyle.Hidden; + this.toolStrip3.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { + this.bLoadHands, + this.bClearHands}); + this.toolStrip3.Location = new System.Drawing.Point(3, 483); + this.toolStrip3.Name = "toolStrip3"; + this.toolStrip3.Size = new System.Drawing.Size(563, 25); + this.toolStrip3.TabIndex = 9; + this.toolStrip3.Text = "toolStrip3"; // // bLoadHands // - this.bLoadHands.Location = new System.Drawing.Point(26, 84); + this.bLoadHands.Font = new System.Drawing.Font("Segoe UI", 9F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(238))); + this.bLoadHands.Image = ((System.Drawing.Image)(resources.GetObject("bLoadHands.Image"))); + this.bLoadHands.ImageTransparentColor = System.Drawing.Color.Magenta; this.bLoadHands.Name = "bLoadHands"; - this.bLoadHands.Size = new System.Drawing.Size(149, 42); - this.bLoadHands.TabIndex = 0; - this.bLoadHands.Text = "Wczytaj rozkłady"; - this.bLoadHands.UseVisualStyleBackColor = true; + this.bLoadHands.Size = new System.Drawing.Size(274, 22); + this.bLoadHands.Text = "Wczytaj rozkłady do zaznaczonych sektorów"; this.bLoadHands.Click += new System.EventHandler(this.bLoadHands_Click); // + // bClearHands + // + this.bClearHands.Alignment = System.Windows.Forms.ToolStripItemAlignment.Right; + this.bClearHands.Image = ((System.Drawing.Image)(resources.GetObject("bClearHands.Image"))); + this.bClearHands.ImageTransparentColor = System.Drawing.Color.Magenta; + this.bClearHands.Name = "bClearHands"; + this.bClearHands.Size = new System.Drawing.Size(230, 22); + this.bClearHands.Text = "Usuń rozkłady dla wszystkich sektorów"; + this.bClearHands.Click += new System.EventHandler(this.bClearHands_Click); + // + // lRecordSections + // + this.lRecordSections.AutoSize = true; + this.lRecordSections.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(238))); + this.lRecordSections.Location = new System.Drawing.Point(6, 102); + this.lRecordSections.Name = "lRecordSections"; + this.lRecordSections.Size = new System.Drawing.Size(54, 13); + this.lRecordSections.TabIndex = 7; + this.lRecordSections.Text = "Sektory:"; + // + // label11 + // + this.label11.AutoSize = true; + this.label11.Location = new System.Drawing.Point(6, 12); + this.label11.Name = "label11"; + this.label11.Size = new System.Drawing.Size(479, 78); + this.label11.TabIndex = 1; + this.label11.Text = resources.GetString("label11.Text"); + // // timer // this.timer.Tick += new System.EventHandler(this.timer_Tick); @@ -979,92 +1429,116 @@ // this.openPBN.Filter = "PBN|*.pbn"; // - // label15 - // - this.label15.AutoSize = true; - this.label15.Location = new System.Drawing.Point(315, 319); - this.label15.Name = "label15"; - this.label15.Size = new System.Drawing.Size(121, 13); - this.label15.TabIndex = 33; - this.label15.Text = "Wymagana wersja BCS:"; - // - // label16 - // - this.label16.AutoSize = true; - this.label16.Location = new System.Drawing.Point(330, 336); - this.label16.Name = "label16"; - this.label16.Size = new System.Drawing.Size(106, 13); - this.label16.TabIndex = 34; - this.label16.Text = "Wykryta wersja BCS:"; + // toolStrip1 + // + this.toolStrip1.GripMargin = new System.Windows.Forms.Padding(0); + this.toolStrip1.GripStyle = System.Windows.Forms.ToolStripGripStyle.Hidden; + this.toolStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { + this.labelFilename, + this.bLaunch, + this.bUpdateSession}); + this.toolStrip1.Location = new System.Drawing.Point(0, 0); + this.toolStrip1.Name = "toolStrip1"; + this.toolStrip1.Padding = new System.Windows.Forms.Padding(0, 10, 1, 5); + this.toolStrip1.Size = new System.Drawing.Size(583, 42); + this.toolStrip1.TabIndex = 3; + this.toolStrip1.Text = "toolStrip1"; // - // label17 + // labelFilename // - this.label17.AutoSize = true; - this.label17.Location = new System.Drawing.Point(330, 352); - this.label17.Name = "label17"; - this.label17.Size = new System.Drawing.Size(105, 13); - this.label17.TabIndex = 35; - this.label17.Text = "Wymagany firmware:"; + this.labelFilename.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(238))); + this.labelFilename.Name = "labelFilename"; + this.labelFilename.Size = new System.Drawing.Size(0, 24); // - // lRequiredVersion + // bLaunch // - this.lRequiredVersion.AutoSize = true; - this.lRequiredVersion.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(238))); - this.lRequiredVersion.Location = new System.Drawing.Point(448, 319); - this.lRequiredVersion.Name = "lRequiredVersion"; - this.lRequiredVersion.Size = new System.Drawing.Size(0, 13); - this.lRequiredVersion.TabIndex = 36; + this.bLaunch.Alignment = System.Windows.Forms.ToolStripItemAlignment.Right; + this.bLaunch.Font = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(238))); + this.bLaunch.Image = ((System.Drawing.Image)(resources.GetObject("bLaunch.Image"))); + this.bLaunch.ImageTransparentColor = System.Drawing.Color.Magenta; + this.bLaunch.Margin = new System.Windows.Forms.Padding(0, 1, 10, 2); + this.bLaunch.Name = "bLaunch"; + this.bLaunch.Size = new System.Drawing.Size(65, 24); + this.bLaunch.Text = "BCS"; + this.bLaunch.ToolTipText = "Uruchom BCS"; + this.bLaunch.Click += new System.EventHandler(this.bLaunch_Click); // - // lDetectedVersion + // bUpdateSession // - this.lDetectedVersion.AutoSize = true; - this.lDetectedVersion.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(238))); - this.lDetectedVersion.Location = new System.Drawing.Point(448, 336); - this.lDetectedVersion.Name = "lDetectedVersion"; - this.lDetectedVersion.Size = new System.Drawing.Size(0, 13); - this.lDetectedVersion.TabIndex = 37; + this.bUpdateSession.Alignment = System.Windows.Forms.ToolStripItemAlignment.Right; + this.bUpdateSession.Image = ((System.Drawing.Image)(resources.GetObject("bUpdateSession.Image"))); + this.bUpdateSession.ImageTransparentColor = System.Drawing.Color.Magenta; + this.bUpdateSession.Name = "bUpdateSession"; + this.bUpdateSession.Size = new System.Drawing.Size(65, 24); + this.bUpdateSession.Text = "Update"; + this.bUpdateSession.ToolTipText = "Update ustawień w trakcie sesji"; + this.bUpdateSession.Click += new System.EventHandler(this.updateSession_Click); // - // lRequiredFirmware + // namesTimer // - this.lRequiredFirmware.AutoSize = true; - this.lRequiredFirmware.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(238))); - this.lRequiredFirmware.Location = new System.Drawing.Point(448, 352); - this.lRequiredFirmware.Name = "lRequiredFirmware"; - this.lRequiredFirmware.Size = new System.Drawing.Size(0, 13); - this.lRequiredFirmware.TabIndex = 38; + this.namesTimer.Interval = 3000; + this.namesTimer.Tick += new System.EventHandler(this.namesTimer_Tick); // // MainForm // this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; - this.ClientSize = new System.Drawing.Size(577, 511); + this.ClientSize = new System.Drawing.Size(583, 608); + this.Controls.Add(this.toolStrip1); this.Controls.Add(this.groupBox1); this.Controls.Add(this.statusStrip1); - this.Controls.Add(this.groupBoxTop); - this.Controls.Add(this.menu); this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle; this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon"))); - this.MainMenuStrip = this.menu; this.MaximizeBox = false; this.Name = "MainForm"; + this.SizeGripStyle = System.Windows.Forms.SizeGripStyle.Hide; this.Text = "Aktywator"; this.FormClosed += new System.Windows.Forms.FormClosedEventHandler(this.MainForm_FormClosed); this.Load += new System.EventHandler(this.MainForm_Load); this.Shown += new System.EventHandler(this.MainForm_Shown); - this.groupBoxTop.ResumeLayout(false); - this.groupBoxTop.PerformLayout(); - this.menu.ResumeLayout(false); - this.menu.PerformLayout(); this.statusStrip1.ResumeLayout(false); this.statusStrip1.PerformLayout(); this.groupBox1.ResumeLayout(false); this.tabControl1.ResumeLayout(false); this.tabPage1.ResumeLayout(false); - this.tabPage1.PerformLayout(); + this.panel1.ResumeLayout(false); + this.panel1.PerformLayout(); + this.toolStrip2.ResumeLayout(false); + this.toolStrip2.PerformLayout(); + this.statusStrip2.ResumeLayout(false); + this.statusStrip2.PerformLayout(); + this.groupBox7.ResumeLayout(false); + this.groupBox7.PerformLayout(); + this.groupBox2.ResumeLayout(false); + this.groupBox2.PerformLayout(); + this.groupBox6.ResumeLayout(false); + this.groupBox6.PerformLayout(); + this.groupBox3.ResumeLayout(false); + this.groupBox3.PerformLayout(); + this.groupBox5.ResumeLayout(false); + this.groupBox5.PerformLayout(); + this.groupBox4.ResumeLayout(false); + this.groupBox4.PerformLayout(); this.tabPage2.ResumeLayout(false); this.tabPage2.PerformLayout(); + this.sectionToolStrip.ResumeLayout(false); + this.sectionToolStrip.PerformLayout(); + this.namesPanel.ResumeLayout(false); + this.namesPanel.PerformLayout(); + ((System.ComponentModel.ISupportInitialize)(this.numNamesRefreshInterval)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.numTeamsTableOffset)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.namesGridView)).EndInit(); + this.syncToolStrip.ResumeLayout(false); + this.syncToolStrip.PerformLayout(); + this.toolStrip4.ResumeLayout(false); + this.toolStrip4.PerformLayout(); this.tabPage3.ResumeLayout(false); this.tabPage3.PerformLayout(); + ((System.ComponentModel.ISupportInitialize)(this.gwSections)).EndInit(); + this.toolStrip3.ResumeLayout(false); + this.toolStrip3.PerformLayout(); + this.toolStrip1.ResumeLayout(false); + this.toolStrip1.PerformLayout(); this.ResumeLayout(false); this.PerformLayout(); @@ -1072,14 +1546,7 @@ #endregion - private System.Windows.Forms.GroupBox groupBoxTop; - private System.Windows.Forms.Label labelFilename; private System.Windows.Forms.OpenFileDialog open; - private System.Windows.Forms.Button bLaunch; - private System.Windows.Forms.MenuStrip menu; - private System.Windows.Forms.ToolStripMenuItem toolStripMenuItem1; - private System.Windows.Forms.ToolStripMenuItem konwertujuzupelnijBrakiToolStripMenuItem; - private System.Windows.Forms.ToolStripMenuItem updateUstawieńWSerwerkuWTrakcieSesjiToolStripMenuItem; private System.Windows.Forms.StatusStrip statusStrip1; private System.Windows.Forms.ToolStripStatusLabel status1; private System.Windows.Forms.ToolStripStatusLabel status2; @@ -1103,7 +1570,6 @@ public System.Windows.Forms.CheckBox xShowResults; public System.Windows.Forms.TabPage tabPage2; public System.Windows.Forms.CheckBox xConfirmNP; - public System.Windows.Forms.Label label1; public System.Windows.Forms.CheckBox xShowPlayerNames; public System.Windows.Forms.CheckBox xAutoBoardNumber; public System.Windows.Forms.CheckBox xScoreCorrection; @@ -1112,10 +1578,7 @@ public System.Windows.Forms.CheckBox xNextSeatings; public System.Windows.Forms.CheckBox xRemainingBoards; public System.Windows.Forms.CheckBox xResetFunctionKey; - private System.Windows.Forms.Button bSave; - private System.Windows.Forms.Button bLoad; private System.Windows.Forms.Label lTournament; - private System.Windows.Forms.Button bTournament; private System.Windows.Forms.Label label3; private System.Windows.Forms.Label label4; private System.Windows.Forms.Label lTables; @@ -1123,42 +1586,85 @@ private System.Windows.Forms.Label lType; private System.Windows.Forms.Label label6; private System.Windows.Forms.Label label5; - private System.Windows.Forms.Button bSync; - private System.Windows.Forms.Button bAutoSync; private System.Windows.Forms.Label label8; - private System.Windows.Forms.Button bMysqlSettings; - private System.Windows.Forms.Button bTruncate; - private System.Windows.Forms.TextBox eInterval; - private System.Windows.Forms.Label label10; - private System.Windows.Forms.Label label7; private System.Windows.Forms.Timer timer; private System.Windows.Forms.Label lSkok; - private System.Windows.Forms.Label lNazwyTeamow; - private System.Windows.Forms.Button bForceSync; public System.Windows.Forms.ComboBox xResultsOverview; public System.Windows.Forms.CheckBox xViewHandrecord; private System.Windows.Forms.TabPage tabPage3; - private System.Windows.Forms.Button bLoadHands; - private System.Windows.Forms.Label label12; private System.Windows.Forms.Label label11; - public System.Windows.Forms.Label lWczytywane; private System.Windows.Forms.OpenFileDialog openPBN; - private System.Windows.Forms.Label label14; - private System.Windows.Forms.Label label13; - private System.Windows.Forms.Label label9; - private System.Windows.Forms.TextBox eOomRounds; public System.Windows.Forms.CheckBox xCollectPlay; public System.Windows.Forms.CheckBox xCollectBidding; public System.Windows.Forms.CheckBox xCheckLeadCard; - public System.Windows.Forms.CheckedListBox cblSections; private System.Windows.Forms.Label lRecordSections; - private System.Windows.Forms.Button bClearHands; + private System.Windows.Forms.GroupBox groupBox6; + private System.Windows.Forms.GroupBox groupBox7; + private System.Windows.Forms.GroupBox groupBox5; + private System.Windows.Forms.GroupBox groupBox4; + private System.Windows.Forms.GroupBox groupBox3; + private System.Windows.Forms.GroupBox groupBox2; + private System.Windows.Forms.ToolStrip toolStrip1; + private System.Windows.Forms.ToolStripLabel labelFilename; + private System.Windows.Forms.ToolStripButton bLaunch; + private System.Windows.Forms.ToolStripButton bUpdateSession; + private System.Windows.Forms.ToolStrip toolStrip3; + private System.Windows.Forms.ToolStripButton bLoadHands; + private System.Windows.Forms.ToolStripButton bClearHands; + private System.Windows.Forms.ToolStrip toolStrip4; + private System.Windows.Forms.ToolStripSplitButton toolStripSplitButton1; + private System.Windows.Forms.ToolStripMenuItem bMySQLTournament; + private System.Windows.Forms.ToolStripMenuItem bRRBTournament; + private System.Windows.Forms.ToolStripButton bMysqlSettings; + private System.Windows.Forms.ToolStrip syncToolStrip; + private System.Windows.Forms.ToolStripButton bSync; + private System.Windows.Forms.ToolStripButton bForceSync; + private System.Windows.Forms.ToolStripButton bTruncate; + private System.Windows.Forms.ToolStripButton bAutoSync; + private System.Windows.Forms.ToolStripTextBox eInterval; + private System.Windows.Forms.ToolStripTextBox eOomRounds; + private System.Windows.Forms.ToolStripLabel lOomLabel; + private System.Windows.Forms.ToolStripButton toolStripButton2; + private System.Windows.Forms.DataGridView namesGridView; + private System.Windows.Forms.Panel namesPanel; + public System.Windows.Forms.NumericUpDown numTeamsTableOffset; + private System.Windows.Forms.Label label9; + private System.Windows.Forms.Label label7; + private System.Windows.Forms.Button button1; + private System.Windows.Forms.NumericUpDown numNamesRefreshInterval; + private System.Windows.Forms.Label label1; + public System.Windows.Forms.Label lFirstSectorSettings; + public System.Windows.Forms.ComboBox cbSettingsSection; + private System.Windows.Forms.DataGridViewTextBoxColumn Number; + private System.Windows.Forms.DataGridViewTextBoxColumn NorthSouth; + private System.Windows.Forms.DataGridViewTextBoxColumn EastWest; + private System.Windows.Forms.CheckBox checkBox1; + private System.Windows.Forms.Panel panel1; + private System.Windows.Forms.StatusStrip statusStrip2; + private System.Windows.Forms.ToolStripStatusLabel toolStripStatusLabel1; + private System.Windows.Forms.ToolStripStatusLabel lRequiredVersion; + private System.Windows.Forms.ToolStripStatusLabel toolStripStatusLabel2; + private System.Windows.Forms.ToolStripStatusLabel lDetectedVersion; + private System.Windows.Forms.ToolStripStatusLabel toolStripStatusLabel3; + private System.Windows.Forms.ToolStripStatusLabel lRequiredFirmware; + private System.Windows.Forms.ToolStrip toolStrip2; + private System.Windows.Forms.ToolStripButton bLoad; + private System.Windows.Forms.ToolStripButton bSave; + public System.Windows.Forms.Label lGroupSectionsWarning; + internal System.Windows.Forms.Button bTeamsNamesSettings; + public System.Windows.Forms.Timer namesTimer; + public System.Windows.Forms.DataGridView gwSections; + private System.Windows.Forms.Label label10; private System.Windows.Forms.Label label17; - private System.Windows.Forms.Label label16; + private System.Windows.Forms.Label label18; private System.Windows.Forms.Label label15; - private System.Windows.Forms.Label lRequiredFirmware; - private System.Windows.Forms.Label lDetectedVersion; - private System.Windows.Forms.Label lRequiredVersion; + private System.Windows.Forms.Label label16; + private System.Windows.Forms.Label label13; + private System.Windows.Forms.Label label14; + private System.Windows.Forms.Label label12; + private System.Windows.Forms.ToolStrip sectionToolStrip; + private System.Windows.Forms.ToolStripLabel toolStripLabel1; + private System.Windows.Forms.ToolStripComboBox cbNamesSection; } } diff --git a/Aktywator/MainForm.cs b/Aktywator/MainForm.cs index b1efe50..d510f42 100644 --- a/Aktywator/MainForm.cs +++ b/Aktywator/MainForm.cs @@ -7,17 +7,19 @@ using System.Text; using System.Windows.Forms; using System.Data.OleDb; using Microsoft.Win32; +using System.Reflection; namespace Aktywator { public partial class MainForm : Form { - public string version = "1.0.8"; - public string date = "27.07.2017"; + public string version = Assembly.GetExecutingAssembly().GetName().Version.ToString(); + public string date = Properties.Resources.BuildDate.Trim(); private Bws bws; private List<Setting> bwsSettings; private Tournament tournament; + internal static TeamNamesSettings teamNames; private Version BCSVersion; @@ -31,7 +33,7 @@ namespace Aktywator private void MainForm_Load(object sender, EventArgs e) { - if (MySQL.getPass() == "") (new MysqlSettings()).ShowDialog(); + if (!MySQL.getConfigured()) (new MysqlSettings()).ShowDialog(); } private void MainForm_Shown(object sender, EventArgs e) @@ -63,20 +65,74 @@ namespace Aktywator } bws = new Bws(filename, this); - if (!bws.isBm2()) - if (MessageBox.Show("Ten BWS nie jest przygotowany dla BM2. Przekonwertować?", "Konwersja do BM2", - MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.Yes) - bws.convert(); + bws.convert(); labelFilename.Text = filename; + labelFilename.ToolTipText = filename; + this.shortenFilenameLabel(); + + this.fillSectionSelector(bws.getSections()); + cbNamesSection.Items.Clear(); + foreach (object i in cbSettingsSection.Items) + { + cbNamesSection.Items.Add(i); + } + // cloning Setting List returned from Bws, because we're going to extend it for version tracking purposes this.bwsSettings = new List<Setting>(bws.initSettings()); this.bwsSettings.Add(new Setting("BM2ShowPlayerNames", this.xShowPlayerNames, bws, new Version(2, 0, 0), new Version(1, 3, 1))); bindSettingChanges(); bws.loadSettings(); + + tournament = this.detectTeamyTournament(); + if (tournament != null) + { + updateTournamentInfo(tournament); + } + else + { + syncToolStrip.Visible = false; + namesPanel.Visible = false; + } + this.WindowState = FormWindowState.Normal; } + private void shortenFilenameLabel() + { + String originalLabel = (String)labelFilename.Text.Clone(); + int firstBackslash = originalLabel.IndexOf('\\') + 1; + int lettersToCut = 5; + while (Graphics.FromHwnd(IntPtr.Zero).MeasureString(labelFilename.Text, labelFilename.Font).Width > 400) + { + lettersToCut++; + labelFilename.Text = originalLabel.Substring(0, firstBackslash) + "[...]" + + originalLabel.Substring(firstBackslash + lettersToCut); + } + } + + private Tournament detectTeamyTournament() + { + try + { + string name = bws.getMySQLDatabaseForSection(); + if (name != null) + { + return new TeamyTournament(name); + } + } + catch (Exception e) { } + return null; + } + + private void fillSectionSelector(string sections) + { + cbSettingsSection.SelectedIndex = 0; + foreach (string section in sections.Split(',')) { + cbSettingsSection.Items.Add(bws.sectorNumberToLetter(Int32.Parse(section.Trim()))); + } + } + private void bindSettingChanges() { foreach (Setting s in this.bwsSettings) @@ -271,12 +327,19 @@ namespace Aktywator xRepeatResults.Enabled = true; xShowPercentage.Enabled = true; xResultsOverview.Enabled = true; + xGroupSections.Enabled = true; } else { xRepeatResults.Enabled = false; xShowPercentage.Enabled = false; + xShowPercentage.Checked = false; xResultsOverview.Enabled = false; + xGroupSections.Enabled = false; + } + if (cbSettingsSection.Items.Count > 2) + { + bws.sectionGroupWarning(); } } @@ -292,42 +355,95 @@ namespace Aktywator } } - private void bTournament_Click(object sender, EventArgs e) + private void bMySQLTournament_Click(object sender, EventArgs e) { + startLoading(); try { ChooseTournament choose = new ChooseTournament(); choose.ShowDialog(); if (choose.chosenTournament != null) { - if ((tournament != null) && (tournament.mysql != null)) - tournament.mysql.close(); - tournament = choose.chosenTournament; - tournament.mysql.connect(); - - lTournament.Text = tournament.name; - lType.Text = tournament.type == 1 ? "Pary" : "Teamy"; - lSections.Text = tournament.getSectionsNum(); - lTables.Text = tournament.getTablesNum(); - bSync.Enabled = true; - bAutoSync.Enabled = true; - eInterval.Enabled = true; - if (tournament.type == 2) + updateTournamentInfo(tournament); + } + } + catch (Exception ee) + { + MessageBox.Show(ee.Message, "Błąd", MessageBoxButtons.OK, MessageBoxIcon.Stop); + } + stopLoading(); + } + + private void bRRBTournament_Click(object sender, EventArgs e) + { + startLoading(); + 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); + } + bTeamsNamesSettings.Visible = false; + } + catch (Exception ee) + { + MessageBox.Show(ee.Message, "Błąd", MessageBoxButtons.OK, MessageBoxIcon.Stop); + } + stopLoading(); + } + + private void updateTournamentInfo(Tournament tournament) + { + if (tournament != null) + { + tournament.setup(); + + lTournament.Text = tournament.getName(); + lType.Text = tournament.getTypeLabel(); + lSections.Text = tournament.getSectionsNum(); + lTables.Text = tournament.getTablesNum(); + if (tournament.GetType().Equals(typeof(TeamyTournament))) + { + lSkok.Visible = true; + numTeamsTableOffset.Visible = true; + bTeamsNamesSettings.Visible = true; + teamNames = new TeamNamesSettings(); + teamNames.initTournament((TeamyTournament)tournament, this); + bTeamsNamesSettings.Text = teamNames.getLabel(); + cbNamesSection.Items.Remove("*"); + string sectionForTournament = bws.detectTeamySection(tournament.getName()); + if (sectionForTournament != null) { - lSkok.Visible = true; - lNazwyTeamow.Visible = true; + cbNamesSection.SelectedItem = sectionForTournament; } else { - lSkok.Visible = false; - lNazwyTeamow.Visible = false; + cbNamesSection.SelectedItem = cbNamesSection.Items[0]; } } + else + { + lSkok.Visible = false; + numTeamsTableOffset.Visible = false; + bTeamsNamesSettings.Visible = false; + cbNamesSection.SelectedIndex = 0; + } + syncToolStrip.Visible = true; + namesPanel.Visible = true; + tournament.clearCellLocks(namesGridView); + tournament.displayNameList(namesGridView); + tournament.clearCellLocks(namesGridView); + namesTimer.Enabled = true; } - catch (Exception ee) + else { - MessageBox.Show(ee.Message, "Błąd", MessageBoxButtons.OK, MessageBoxIcon.Stop); + lSkok.Visible = false; + numTeamsTableOffset.Visible = false; } } @@ -335,7 +451,7 @@ namespace Aktywator { try { - bws.syncNames(tournament, true, eOomRounds.Text); + bws.syncNames(tournament, true, eOomRounds.Text, cbNamesSection.SelectedItem.ToString(), namesGridView); } catch (Exception ee) { @@ -352,7 +468,7 @@ namespace Aktywator { try { - bws.sql.query("UPDATE PlayerNumbers SET Name='XXX' AND Updated=True WHERE 1=1"); + bws.sql.query("UPDATE PlayerNumbers SET Name=NULL AND Updated=True WHERE 1=1"); MessageBox.Show("Wykonano!", "Usuń nazwiska", MessageBoxButtons.OK, MessageBoxIcon.Information); } catch (Exception ee) @@ -374,23 +490,23 @@ namespace Aktywator timer.Interval = interval * 1000; eInterval.Enabled = false; bAutoSync.Text = "pracuje się..."; - bTournament.Enabled = false; bMysqlSettings.Enabled = false; + toolStripSplitButton1.Enabled = false; timer.Enabled = true; } else { timer.Enabled = false; - bAutoSync.Text = "Synchronizuj cyklicznie"; + bAutoSync.Text = "Synchronizuj co:"; eInterval.Enabled = true; - bTournament.Enabled = true; bMysqlSettings.Enabled = true; + toolStripSplitButton1.Enabled = true; } } private void timer_Tick(object sender, EventArgs e) { - bws.syncNames(tournament, false, eOomRounds.Text); + bws.syncNames(tournament, false, eOomRounds.Text, cbNamesSection.SelectedItem.ToString(), namesGridView); } private void bForceSync_Click(object sender, EventArgs e) @@ -438,11 +554,6 @@ namespace Aktywator } } - private void cblSections_SelectedIndexChanged(object sender, EventArgs e) - { - this.lWczytywane.Text = bws.getBoardRangeText(bws.getSelectedSections()); - } - private void bClearHands_Click(object sender, EventArgs e) { try @@ -456,5 +567,110 @@ namespace Aktywator } } + private void updateSession_Click(object sender, EventArgs e) + { + if (trySave()) + { + bws.updateSettings(); + MessageBox.Show("Wykonano!", "Settings update", MessageBoxButtons.OK, MessageBoxIcon.Information); + } + } + + private void toolStripSplitButton1_ButtonClick(object sender, EventArgs e) + { + toolStripSplitButton1.ShowDropDown(); + } + + private void toolStripButton2_CheckedChanged(object sender, EventArgs e) + { + eOomRounds.Enabled = toolStripButton2.Checked; + lOomLabel.Enabled = toolStripButton2.Checked; + } + + private void namesGridView_CellValueChanged(object sender, DataGridViewCellEventArgs e) + { + if (e.RowIndex > -1 && e.ColumnIndex > 0) + { + DataGridViewCell cell = namesGridView.Rows[e.RowIndex].Cells[e.ColumnIndex]; + cell.Tag = true; + cell.Style.BackColor = Color.Yellow; + } + } + + public void namesTimer_Tick(object sender, EventArgs e) + { + tournament.displayNameList(namesGridView); + } + + private void button1_Click(object sender, EventArgs e) + { + tournament.clearCellLocks(namesGridView); + tournament.displayNameList(namesGridView); + } + + private void numNamesRefreshInterval_ValueChanged(object sender, EventArgs e) + { + namesTimer.Interval = Convert.ToInt32(numNamesRefreshInterval.Value) * 1000; + } + + private void namesGridView_CellMouseEnter(object sender, DataGridViewCellEventArgs e) + { + if (e.RowIndex > -1 && e.ColumnIndex > 0) + { + DataGridViewCell cell = namesGridView.Rows[e.RowIndex].Cells[e.ColumnIndex]; + cell.ToolTipText = tournament.shortenNameToBWS(cell.Value.ToString()); + } + } + + private void cbSettingsSection_SelectedIndexChanged(object sender, EventArgs e) + { + bws.loadSettings(); + } + + private void checkBox1_CheckedChanged(object sender, EventArgs e) + { + namesTimer.Enabled = checkBox1.Checked; + } + + private void lGroupSectionsWarning_Click(object sender, EventArgs e) + { + MessageBox.Show("Opcja grupowania zapisów w sektorach (albo osobnego maksowania sektorów) nie może być zaktualizowana w trakcie trwania sesji!", "Ustawienia grupowania zapisów w sektorach", MessageBoxButtons.OK, MessageBoxIcon.Question); + } + + private void bTeamsNamesSettings_Click(object sender, EventArgs e) + { + teamNames.ShowDialog(); + } + + internal void startLoading() + { + tabControl1.Enabled = false; + this.Cursor = Cursors.WaitCursor; + } + + internal void stopLoading() + { + tabControl1.Enabled = true; + this.Cursor = Cursors.Default; + } + + private void gwSections_CellDoubleClick(object sender, DataGridViewCellEventArgs e) + { + if (e.RowIndex > -1 && e.ColumnIndex > 0 && gwSections.Rows[e.RowIndex].Cells[e.ColumnIndex].Tag != null) + { + HandRecordPreview preview = new HandRecordPreview((HandRecord)gwSections.Rows[e.RowIndex].Cells[e.ColumnIndex].Tag, gwSections.Rows[e.RowIndex].HeaderCell.Value + "-" + gwSections.Columns[e.ColumnIndex].HeaderCell.Value); + preview.ShowDialog(); + } + } + + private void gwSections_CurrentCellDirtyStateChanged(object sender, EventArgs e) + { + DataGridView grid = (DataGridView)sender; + if (grid.IsCurrentCellDirty) + { + grid.CommitEdit(DataGridViewDataErrorContexts.Commit); + } + } + } } diff --git a/Aktywator/MainForm.resx b/Aktywator/MainForm.resx index eb1dcd5..4b7b92d 100644 --- a/Aktywator/MainForm.resx +++ b/Aktywator/MainForm.resx @@ -120,22 +120,374 @@ <metadata name="open.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> <value>17, 17</value> </metadata> - <metadata name="menu.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> - <value>212, 17</value> - </metadata> <metadata name="statusStrip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> <value>411, 17</value> </metadata> + <metadata name="toolStrip2.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> + <value>459, 56</value> + </metadata> + <assembly alias="System.Drawing" name="System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" /> + <data name="bLoad.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64"> + <value> + iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8 + YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAE+SURBVDhPY6Aa2HToxn90vG7flf8rd57/v2Tzyf+LN5/s + hirFDkAacIE5qw/8N/NKwW/I+v1XocoxwdqdJ//vOnoFbMiiTSd6oFpQwerdF6HKUUHBTOX/566d+V/f + v+S/lV862BCoFlSwfNsZqJb//x++PAfWCMPh1QL/1+089X/you24DVi86QRUO8TWY1dXgdlBZYL/bz+6 + 8P/l269gA0w9k7EbMG/dYbAGEAAZAAM/f/35/+7j9/8Pn3/Eb8CslfugWhDgz99//z99/Qk28NbDd/gN + mLZ0F1Tb//9vPt4Da/r+4/f/qw+PgNmXb7/GbwBIEgZAGpDxntN7/p+++px4A56+vf7fP0sAHHB3Hr// + f/Hmq/9Hzj8h3gDkgLt6983/k5ef/d976iFxBoBofBivASBJYjBUCzUAAwMAeL/WUt07dwcAAAAASUVO + RK5CYII= +</value> + </data> + <data name="bSave.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64"> + <value> + iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8 + YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAIzSURBVDhPrZLrS9NRGMd//0LvexP0orc1NYZrsRr8yjWU + ZcOwIrr9wltpuswLKZamUcsLZCtcOmm1moSTiryAKWIii6VoZeaKpji8ohPB4Nt5zn55sqIX0QPPm8P5 + fM55LtJ/iefPIqD0tS6hxbuIh+45NDWGcdcxhbrar7DfDOJaxThKSz6gsGAEeblDOH8uABWXJAK7OoHa + mlX8LVZW12BK6cLhlKc8VVySvE8WuKCqcl69+nsQHJ5bwW7LC2g0CqyHPELgfjDLBaUlk+r1jfED/hRa + QIzZh4JLEzhoaRYCZ8M0F1y0fVQRET/Db8fC2CZ7kZM9iqREpxDU3w5xQVbmkIpF41e4LxDCZoMbijII + s9khBDXVX7hAOTOoon+GOwc+Y1N8I44cfYWEhDohuF41gY52sFECx0++hvVYL+82NYxqpm/Ty1G4G8nW + l5BluxBcKRtDmw9sB4Bm1zc292VUlM/wplLDqOaM9MA6fCCpFUZjpRAUFY7C8wi471xjixOBKTV7Q1pO + 2JCaVhyFExm83wODoUwIbHnDDAaqb0X4ywSxY8ToZPjfT2N4fAZK7lXsNbVwWLfHBb2+WAhoLR13sP5t + EhB8Nv8G3gVnEZxaxIXLdsQaXAxuQuyue9DF5wtBRvobVvcSh7caPdiyQ8bjth742vvQ0T2A3n4/9pmt + 0OgbEMfg7dp6aLU5QpCZ5k8+faqHrydtGC0JzZlGRd2mhlHN9ColwTvjsoTg30OSvgNCVjq+glI0hgAA + AABJRU5ErkJggg== +</value> + </data> + <metadata name="statusStrip2.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> + <value>343, 56</value> + </metadata> + <data name="lGroupSectionsWarning.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64"> + <value> + iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAALGOfPtRkwAAACBjSFJNAAB6 + JQAAgIMAAPn/AACA6QAAdTAAAOpgAAA6mAAAF2+SX8VGAAAACXBIWXMAAAsMAAALDAE/QCLIAAACaklE + QVQ4T6WRX0hTYRjGdxMkikcqmeWURbeamAg60pVK82KgppIzCh3WNvwzRtjCuahhCYabyzRrFcQyVEbQ + hSj+YaKrkCBnDpuSTsu55lEXG1mG29PZuRiunau6+MH3PTzPw/u9HwvAf8EoBlmcKOa+GTi7p68ndrsV + xGEmTxBGMcjbgfz5JfvN3/MzSn9HLTHI5AnCKFr68oTzU5f9vp9PsbnWCNsID50NxEkmb4QQ5P3rQvLz + chdUzTUQiYpgGZOht4XjYvJGCGYjX2mflvibVFdgMpmg0WiQyEmAdTADulpC8rc/7EItLurjkHA3OLqo + shw6nQ5SqRRsNgFyqRovNfG/qIUe2J8JKxh/ntO3sqCm3v4MzepqKBQK5PLPQFGfg+2vcixbTge0MsK4 + PxM6WPrzkuyTInpxvh0DzGY1Ss+XIj0tBeahKnhWrmJroQyjj7gB6mu5EQVmY67V/U27Rxd49XA7WyAQ + nIKoPBO2dxXY/FRCUYTVMY5fX0fYwgqGDDy+Y0YWoMO+Tni3W7G6qIThQTG62gVYmy3DxgceNqx8uKa4 + GNTGBNqlscJQgaU/3+3beUKN/pgOf3erqLEluFhZguzsLOg1KSDnCkDOFsA1mYQvw1HoUhBeuuBVR4bS + 6bgN7w9DKOxZk2PVVgVhYTrSUo9hcSIL7ulUuCzHsT7BhnM0GuaH0YG74thelrYhOeDx9mCLbAuFtx1i + emHk3Dlq9Oyw8Po4AefIQQzrY3BPGk+yeho5U93XT8BwIxnd1xJp7suPQleXQNNaE09zR3wEty4domm6 + EAdVRRzaJOwXoV/4N8D6AwpMvVRjyTFwAAAAAElFTkSuQmCC +</value> + </data> + <metadata name="sectionToolStrip.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> + <value>564, 33</value> + </metadata> + <data name="bTeamsNamesSettings.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64"> + <value> + iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAALGOfPtRkwAAACBjSFJNAAB6 + JQAAgIMAAPn/AACA6QAAdTAAAOpgAAA6mAAAF2+SX8VGAAAACXBIWXMAAAsMAAALDAE/QCLIAAACOUlE + QVQ4T6WN30tTYRjHz1/QRRdddG8ZERlkYEKCRDDJYsOpFYgNnRkS5jLdYgqGo2CRpZCVNldqls62RGds + beZmg3A/zM1xrJ3J6mJhaoOgdnTn23vO8BebEfTA933Oed/n83koAP+VlAvHiAZvDS0w6pTkd/tbugiH + 6V0QwzY/dHcuYCXah5/Rx4gEtGhpKIfe+B66YQcZ20FgnJgjPVlPHygQ8rcj4GqKBewVbNX5EwiFwsJb + aV2Pj7RUAb95vZoVpWiolkAhP4vai6fBC5j5ebB9WlgkeSwZSRUMWmZIT9baKks2MsJWmmbw6aMfbHcr + fMVH0aVS8SPUZNMlkaGmDHysysosasDsFmBwHOK/fie/SSVWFhHvaMS0KAOM1YS65nt49aQxnwfDd2vh + u56UbAo8DnCjveCiX8HFlhAnmwPSI/A+vA2H+wuk5dWwGNUYGv+AmVaFALdlZ28KFi6fQuJGMdgOJVY7 + 1WDKcjGlkoOOxDBgmsCbIQWWF7SgnTXQaNQCfDPn8BlBsPw9ClrfhrB4P37IcvBZchCT5/IQ8ARhn3LD + 3F8pwEG7DK8fibBn9y7IpZlZZC9FvbTOgkusYWkxCp/+Plz5e2Er2AfvoAE25zRGe0pS4HrZoVwe3hB4 + g98w5mTQPx5E79ickOdGG0a6Cv8KCwL+OF5YhWMFFdvS2f0MLvMtRDzXtsIHtsIbgnThBRyXwIt28Y4w + n5SL9Vy5Wg9xUQmZoCA5mZGZboZP2st/D6g/Itrj+skTv/gAAAAASUVORK5CYII= +</value> + </data> + <data name="button1.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64"> + <value> + iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8 + YQUAAAAZdEVYdFNvZnR3YXJlAEFkb2JlIEltYWdlUmVhZHlxyWU8AAABs0lEQVQ4T6WPz0uTcRzH/Sc8 + eIzI7lJBxzwE6SXq4Gld6lCHBGFB4iFiHkroILaoLGO2GA8LtzYwdG2zWcNNUYSt1qHDYotW+6HO3Pbs + 2fPq+31qDmqPDPs8fHh9Pjzv7ws+XcB/9f7gi6T4u+dCCZSFDZz+mEy1vj9v/hGYlSuQZmg0LJPmAk84 + KQBVVTfYLGewyIWxOP5wgkvDNpluL3AHNin/rPPQn+dlpEijAfeUDAPWFRzeODdsdgYtVk4NXBHxNgLX + /Brjz5Kcvvqea5NfuOPKcnYkisOXEDIdpzfCI1fAXPDct8Jupc6R8x6ODgXpvx5lYnYDVdWo1jQK23vM + uEOcPHdZxNsIZuaWBSBXrNB70YPlVoTE5wKauGWvqlLaqfDqzaq54LESEvhdW+UaW2eOUVAcaFrDoNyj + 65/MBQ9eLAq06tv9CUr9x/nx1G5Q7gcKpmZfC7SqUVP5/mSK/GCfwe1cnqVYsjOBrutkpu3kTvSQtd00 + KPd3a6nOBPLuUl836bu3KWe/GpR7R4JpJYhnMWaE5c1v4x+MeXn1I95A/GCB/NlJN9/I3h8O13T9AroZ + BuMIQa3eAAAAAElFTkSuQmCC +</value> + </data> + <metadata name="Number.UserAddedColumn" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> + <value>True</value> + </metadata> + <metadata name="NorthSouth.UserAddedColumn" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> + <value>True</value> + </metadata> + <metadata name="EastWest.UserAddedColumn" type="System.Boolean, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> + <value>True</value> + </metadata> + <metadata name="syncToolStrip.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> + <value>343, 21</value> + </metadata> + <data name="bSync.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64"> + <value> + iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8 + YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAEDSURBVDhPYxjcYM6WCf+X7Z/hAeWSDiav6vzfMr36/4z1 + PSlQIdJAz8Km/zseLiXekEV7pv4HORtkM0hzy4ya/7ufrvg/7XgDcYaANJ/8uOX/kXfr/u9/ter/zidL + /m97sPh/z8Gy/w2bcsGGTN/YmwxVjglANh97v/H/2keT/y++0f1/xtlGiOatOf9LViX9T5kU9j+9LOE/ + VDkmADl738uV/9s2F/+vXZX1v2RB0v+s6VFgzX7lzv9llKT/mziaBEGVYwKQn5W1lf7rmGn/N3Uw/m/j + afU/oTcQodnJxBeqlDhQP6mCfM0gADIApFlFT4V0zSAAMkDXXNcYyh2egIEBAMXxnq0p/I6SAAAAAElF + TkSuQmCC +</value> + </data> + <data name="bAutoSync.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64"> + <value> + iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8 + YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAH5SURBVDhPYyAG8CryqumkqZRDuSQACwZOIMmlGaoY0/G1 + 8L+wNp8pRIIAkPUUD/eeb7ch9VjY3ewL0fdLbyQ+7/5W+j9yvedZoDQrRBV2wGTVqDev7HnC/9YfOf87 + /+f/b/6T8b/4VfT/xBs+/yOuOf+XTxRuhqrFBGZVupOKnsf8D97o+Nhmou4uix6tDV4bja/G3nL773Xc + 7L/1fvX/8vPFPzNwMUhAtSCAsAGfaeBO+4/i9kI5QK4IRJSBQT5etCLgluV/k6VKX6VSeJaySDJYA4VZ + ILJIQNZXPIFbmt0ByoUD9Xap9XIpgvNYBRj0oEI4ASOURgVcDJJQFmmAU5ZTileX1wLKRQWCDPxQFibg + 0OSQ1yyWbwreb/9SPlCyESoMAyxKlWJTuTWZXaB8BOASYZBUL5Lr99pl+Dbpmvf/1Jv+//lNOQOBdglw + 6jLISCcIhdpv1TlpOFn2BlA5B0QXEuBWZNULOmn7P+6i+//YKy7/Ux8CDbnn8inhqtfL2Kvun2Pvu/63 + 3yT5i0WcwRyqBRMoxkk2Rj2w/5/62Ot/5c/Y/9V/Ev4XvA/7H3Hd6b8B0GZmOWYnqFKcgM1lvcHZqt9x + /807NDYYVassVM+Rms1ny5kOlIOnDbyA15DDMvK6/VegL+WgQqQDXkM2XyAFyokEAAMDAL2km0Wc3s1o + AAAAAElFTkSuQmCC +</value> + </data> + <metadata name="toolStrip4.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> + <value>238, 56</value> + </metadata> + <data name="bMySQLTournament.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64"> + <value> + iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAL + DAAACwwBP0AiyAAAAAZiS0dEAP8A/wD/oL2nkwAAAAd0SU1FB+EIFwsSCeEPYfYAAAM9SURBVFhHvZVN + SBRhGMcn6BI6u6u7FUZ2KAJ3N3M128wyv60IoujSoVsgCXWKLll+ZH6mVpaVH+FFESXqIJUVdrXMLewS + ZpZmWl2KLgldnp5n5p1td+aZdlbbHvjBy8zL/P7zzjvPK6U2yWDGlsZ4lQZBvQ68Ji23SLT382oDJQsu + KPrghKL3TiicRt4hU8hbAY4phHjM0utvAfJeJkJuABlPhD1jyDNkVIBjb22MApC8ZN4Fu546IHvEATuf + IMMOyHqIPBDg2FMTywCfXOC/awf/HTtsH7BDZj/SZ4NtvSo09lTHIID29sVzLsjosUF6N9JpA99NGdJu + INcFOHZXxThAaivu9GakKR68uOM9dXHgqRXg2F0Z4wDeOhRfRDEuNcncFXGQcl6Fxv8vwAWU43K7K4VY + kSOx+ATBELgJ6T+nX412u7IKSggBjmOyCYMBcBWUALQKWghcCZIq0Biv0T2ao3VG6pzV+XYISAkGhDK8 + uABaCK39aiHoc4SB17KGHFA041Q6JnXOga5yWCx9EcZsxsllBBAhgkFCSGuTlb1CnytvIhF6G8rg+5FB + lolVm/gQZgGISIcRtWj6VMRg+1n4kt9oyoyvLPoAdI8wBEGoE2p75V5PPfw6NQlfC1tgJu2EKa9ljzGE + lQD6INSgCvBE3LewBu53tSpy4ufxUZjaeAgmk0tY3iTlQmCFMzxENAE0socTYP/8WnjYeTko11jIqYKJ + uM2mvFqZtLwAvnabIh/uuGqQa2hLHYklBSgIuOBRRxsr1vh2uJ8VckQVYMegAx7fusZK9UynHGOFeqTU + RmsBfPUyjLRcYWUci6XjrFCPtLUhcgBfnQyd3vD2ykmJ0DlWkOjhnJzQ5F0eY2/n5IR+Hoey+bTKrDEP + kI7ybjd/sHBygpurR6jVyqriAxyYWwe3TeQEJye4uXqEWq3sCmOAgx/Xw1hLLyuIBCfUI9Rq5ZSHB1Dl + fezDrcAJ9Qi1WhSgeNalymeTYby5n32wFSz/eqFFAai3kzxwaelyYs5/hhXqEWq1dp+TwV8tw/PTxoMl + Gn4cHWJlHEL9pwY2OJQb9Aa0jJzADJpv9c0JoTQWN/lfI1QhJUm/AThlCtnRqx5GAAAAAElFTkSuQmCC +</value> + </data> + <data name="bRRBTournament.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64"> + <value> + iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAL + DAAACwwBP0AiyAAAAAZiS0dEAP8A/wD/oL2nkwAAAAd0SU1FB+EIFwsUE0o3PwoAAAFySURBVFhH5ZBb + cgMhEAN9/0s7EkaTYRDLGieVj3RV43kINpXHhmf//RP4cXkLBJ/ZPm5c7RwMVC9BYPiA3O0cXKy0YOEe + n8ThcgMc7JzA0D3cXPUSs4CNFLWu+wYG7uHmqpeYNVhkiauzARr3cHPVS8waLN41QOMensRRMw0WpwZo + 6uPNWmcxa7A4dQCD/Hjzog9ieeAEhts/AL8DsTzQgkVkWOceWnIgh2rtMhYE4uOyr27DC/IIflT20W14 + oXoELh7f/WfwX5Xt48bVrsBdNrPeoRs+IHe7AmdO4ua0ne7xSRwuJ1gP4nD5WZzL4KqXmAnWgziUsX3I + YVXLVS8xE6wHcShj+5DDqparXmImWA/iUMb2yXZGgKZliKNmKpyFzFRrBr5AZYO1zmJW4Sxkhq767jdc + yld72a9wWdvDmRpyPX53RLbnXb8mhaZH4F3ibpbz13pDviT76h14p3ofpD/5uOBd+T4fflz8xBu/xePx + BZRDJQYQ19gkAAAAAElFTkSuQmCC +</value> + </data> + <data name="toolStripSplitButton1.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64"> + <value> + iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8 + YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAJ1SURBVDhPvZJZSNRRHEb/Dz30kkVmJEKSJWKBGBhSPYgY + Ua6UKyipYblRZijmuDTjrrPoqFMq2ow6jTpaWYphhVAoEqHlQompWVBUiqmhkttpHEWyfAiCPvjgcu89 + hx+XK/yXZBZXu0iUOq7lVpKt0pMk1SSvHf1dQuJUeEfKg1bWlxIrzNIMsvgMtW9wXDFCgzbf31B+b0tt + ttxIb5JIUYmHT7Qcr8gCo4DBXg1zk/XG/pjQsTCmRl8pp1GbnrbGbIh3lAKvCCXu4UUI9VUKZidqNsBL + n0tY6I+l5lYu1aVZqIvTKCtI5aZMRFFOAmue1dRqpMx+1azDywaYQRH0h2/aPwS3y3P4/qlsHW5tkBr7 + UJ9Hky6He9VZ6NXp6MokVKquU6FMplQhQiVNXJVVl2Ux/b7QOPZIu5jGGgVLIxIYzdjYd4a94SQYiIPX + 0fTU+RET6lklqFXpTA3lwgcZ92vldD6SrV76dfRXwdDlw2KHG3OPnXlbZUfYOaepK2Eeh4RypZhvbySM + dqTQqJOxPCyGvohVsOe8AQxgsdOTubaTTLccZ7zhMJJIawJcTAuMb1CiSGG8N5E7WindzwyTDMQaBBeg + O4jl52eYf3qamVYnJhod+FJrS1fmDgLdrHCw2WZjFKjyRPS1pXJXmwdDqfDSMO4LX+bb3Zl54sxkkyNj + ejs+ag7QLzNFHL4f+4PmzUZ4JYXZCdRX5tL/IIqufGG9nbIttOVspTltO3XJZqgTLLhx1ZJA133LjvaW + rmu4IORnxJMvvkh2YghJl/2JOe9JqN8Jzp46issxO47YWWNrZcFe813s3mnCHlOTjf/g3yIIPwHVOuT9 + xNmtFAAAAABJRU5ErkJggg== +</value> + </data> + <data name="bMysqlSettings.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64"> + <value> + iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8 + YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAOPSURBVFhH7ZXZT1NBFMZJTHzmnTfi8qJgkMhSSBFTgdRA + LVwrhK0FJWwi2lsWCUUWsQKhgFgoUCg7qGwtBIoUjEiMGiWCiSKKG0jF5S+ox5nJLbY1MWBvE2P4kpOm + zZz5zjkz86vLjv4rnb0yCzjOlN0D5ifnSkSPiOIuTUA0raf52To3SfEMdE59gfgCAwSn9LmFJWlFpy4O + Q6hYG8CksKukkhnonf4OYvkUcLlGs1q/SgpQDb1H34fN4em90Da6CuFpPc6ZSHSOPldcZCRFaMbXocv4 + DbqnNqBzcgPqb68Qc35KF4RI2hOZFHYlPK93j5PLf2jG1kkRqYpZEGaPgLjQQMxr+5bQJHrM3sIb7kwK + e4rNHwfJ5Wlo0q1BD+o8XTFnM+boC7egefgdVLQtwNHYRvARVLF7DCKpDo38K4nuqa8QRY/aGARF10PT + 4MpmeIWVs1tAZNZtiL1kgMbhj9B15zMkF0/bGFCZ3cj4NVxrfQqBp+rAg1fMbgFY+KlxuSNm1cAb0I6t + QZxsCIJjG4A61wPqwWU0/nl0B9Rmz+AqNybFMdmDhiNUZoQla4l5Xf8raNG9g+aht6BGBWFzXMSRiEo4 + FFrGJRs4KmyM3zkGDkX17/IXKon5cbEGddprrmxfJAUocOcx8h8+ERWkiH2cvO2PH1MO33QL5SiZ4cEv + 0k0ClTO+yBHVSzmRNYBpx4tvOxkU00AKCKBq4eCxcvfDoWW5+wPywItffpjZduvC5vhtxxcaCeVKtS/A + mnQlLQs2tMMXbY9fDgoZCWabvxemnKUITDn8aU26DsP6Ju2wOeu0w5TD3Vsop+h4aUO6gvrHzqMdJe/f + LZLpXii6ljbNI6U604mMAToia9D1RFofHSrpMOXVzIFG/x6klXeBc1r1kEl3THjsMbmjv2FWkDVEM0uI + eAnNtAW3Cs0zgls/YbXjyLVGrDVmcefMEiJuQqurPW4bbi07jlyMWEHGTYJZ1eCHTcwK0NiZJUSBUbW0 + PW49Q0rZQy7q+FOReh7deBPI1U+An9pr4kmaadw5Ng+glCYZOnv1wDJklk6AT3j1PJPKjuw5L1c9smE9 + MXcG7y2y53yr7oMN6xvR6J3Ce4ssnMdnizmfq7wP1qzPvnrHcd7/SWgCSd78q+AvrE70jVK5BYquP7dm + va9A+ciDX3HAId5vV/sD86EBXbq9/jnsdrtVsfpns6N/Qy4uPwHXbAHig+JDxwAAAABJRU5ErkJggg== +</value> + </data> + <data name="bForceSync.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64"> + <value> + iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8 + YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAEsSURBVDhPYxh8YM6WCf+X7Z/hAeXCAS5xDDB5Vef/lunV + /2es70mBCoEBLnEM0LOw6f+Oh0sxFOMSZ1i0Z+p/kPNANoAUtcyo+b/76Yr/0443gBVPXdPZBBQ/gy4O + NwSk+eTHLf+PvFv3f/+rVf93Plnyf9uDxf97Dpb9b9iUC1a84cp8rOLTN/Ymg/127P3G/2sfTf6/+Eb3 + /xlnGyGKtub8L1mV9D9lUtj/9LIEnOJgv+17ufJ/2+bi/7Wrsv6XLEj6nzU9CqzIr9z5v4yS9P+0jkis + 4iaOJkEMIL8payv91zHT/m/qYPzfxtPqf0JvIFyRvpVuk4md8Rl0cRMnE19wGKCD+kkVWBXhEscAIIUg + RSp6KiiKcIljAJBCXXNdYygXDnCJD3nAwAAAPZ0MvaekYv4AAAAASUVORK5CYII= +</value> + </data> + <data name="bTruncate.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64"> + <value> + iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAYAAABXAvmHAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8 + YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAuJSURBVGhD7ZkJUFRXFoY7IGuzNvRCN2s3zb6DrIKIImgU + iKIisomIosYouMQVjQtiYjQu0ZhkMpXUZIxZRo3OjFNJ3BEhzU5AaeiwNFvTIIpaTpz8cxpeZjJJpVAG + oqnKV3Wr6ff+e/vce88597wH63eeNQZKi5+/Lyt++86ZTz+4c+7U+32nP92uOnnSn7n9VGjKzHRuy8le + 2jzvhQ9U2WmXSyNCL14JC9zA3B7i+7Iy7gNZyV/6P/sTunauQfvGHHTvyEPvoQLc+eNR1O1/9VyAvb0z + Ix9zaubMMWpenpOtXJ974/aezejatAL1idNwxt0ZS0zZZ221tRNJZjgo/r5VEfxQVtSuemMnmnPmoWV5 + EpR5C9GxKQdd21eje9ca3H/jFSjz8/+5bcb0TYOdxgh5dDSvIWluQdfLL6vvvXsAA0cL0LR4Ps66OiHV + 0PATYxZrBskEQ2oiYepU/6P5+d935r9Ixs9B2+oMKNdloTP/JXTv2QDVvnz07N+Gnn1b0f/aZuDQDtxY + ukgWKBJ5M0OMGo2pCza1rlvXf/e9w3j40VvoLNiA65PDkW9u/rU1S2shSayHlD/iyNbNO/DhW1DSqnes + zYRyfTY6tq4k419GD+1Iz+HdUB8pQO/BneilifTSJP5VuB53NqzAhtDg1cww/xeKrKwXlKtekvcd3I0H + f9iHgXf34daKRTghFg9E6ei8ShIPavqD4p/CZrN5by1Mudq8OQ+qTcug2r4KKlr5njd2QH1sL3qPvYa+ + N/egTzOBA9sHJ9BXQBPYtgL/op06GRv1CYfFMmGGeyIU6ekCxeLMj1VbVuP2ztW4V7gOqh1rUDJ9Craa + mZXQuLNJRh/DYxTn77/pb0uW9HVtycXt/fnof3sf+jTtuGYCtAM0oV663rt3I9Q7cqHeuBTqF5OAZXNQ + GRf9bYRQ6MuM9VjIU1IylEsy+npWpaJv+Rz0r81AU9ZcnPNwRbyu/nGSeA4pnwBDQ0Pv1eHh78tyFkFd + sJG28nXcfWcfbh/eNeQ+ezehd9daqLcsR8+qNHRnxaM7KQoDiWFQzIv9bpadXTIz1C+iWfWm1JSzHWkz + 0T07DOrECVCnT0NldDCOCIWdUi2tF0n23yAdCXbm5tMKJ4Zdqs9OQz+508CR3bj9+maofzA+LwPd2bPQ + tSAanfFB6Jjigd5IKfqnB2GFVLySGeZnKLKzExqSZ6q7olzQMV4AVaQT2qZ6ocjHCetMOUV6LFY0ySjR + jA5GgTzekg/CJ8ibFyWhn7LUne0voXdNJrqXzEZXagw6E0LQEeON9nAJ2v356HY3wf0IZ+x0c1nPjPEf + GlKT32yIC4fcxRDNtiyo3Nho9OLhvFiEZCOjD0niNaQcfWwShMI9/wgJHuhMj8Nt8nl1eiwZHzpkfIQj + lAFCKMn4FokuGsXaUAU5YKuLU76mM7mMi3zBnJrKUEeUCFmoEbHQZK+FCls9fMzlPgwzYO/S/IZGO6Zw + xo0LXGMrOi0L9UHn9AD0xHigY4IYSn8B2tyM0eyohwaxLmrttFBpw8ItPxE+nzjhhCxxyp1SN3Ncs2Sh + WMCCzJqFiyJ9HLSwUNnr6C2moS2GfuFXwkOfveCQjXW93M8O3X48dLoYMMbrkPHjUG6jhRIy8jqtdrnU + CEV2OrjCY6GIvl+zYuFzvj4K+fxGU23dWTTcqPn7k2I139z84AV7PhRiQzQ5aOMbWvlB48lFNMZfpXaF + z8JlMlrz9yX6/IxviK0cToWetvZkGsNgaKiniJW2XsxunmXpdWs26KzHDTJes9JXqF1m2iXNdzL+BM8A + S83NvxjHYgUz3Z8ZjKINjbYUSziPin8wmgy++KOm+X5ZYvnISZ89j+nzbLEzPHxtjZvbo8sUpBpjL4m0 + BttF4XODE7hArlRqr4fz/tJvhcbGv27QDocyPeWYIi4MV+3H4YqtDq5KDFFEwVvqbIxSKRvFDnoostXC + ZZrEN3TtlJ/bRabr06UjL48tX5R+vnySB65YP4drYgNcd7NAmbcAVQHW+NpLhHpKpbd8uah2NYWMUux1 + 2qEGSqnbJQ7HmGGeDi2LFnEaM+fLyoPtB40vdjJBqTcflcF2kEe54qqvBJs5nPJDIgtFa6gUbcG2uOnB + QQXthuYwa/WzQaKV1bB105jQmJpqq0hPaqgKskWR6DlcdzKGjIyvDnWAIsYL5WHu2CsUNJI0jJrbAaGw + tDXcHZ0RYsi9LFDpoIsKOuiqnCT3RAYGP39AGUs0xstT5yurQsUottVGiSMbZR4WqBpvA0W0B6oivXHM + RtRjzNKeyXTRwNkt5P+9PcoL3ZOkkHtb0k5QyeFihPddxecZzdjTkJFho8hKbqme6IwSClRNgMrItyt9 + +JBTMVcd4Yq37W3v22jppJH8p4cUez3P8lNllDe6qGq96WWJSkcDtPpbI00kWsJoxg5lbq6lPCOpqYbK + Zhn5sszFFGVkfAWtfn2AFWpDHHBOag9vXf21JP/F8mAjj/dxe6QX2sLFqPPmos7NBOXeTg/s9fXtGMnY + 0JqVXFoT64cyPwHKPLnkNhyUu3NQQ0bU+lnhS6kNYg2ND5PUcqjHL1NobfXX9kgPNIeJUUMx0ezDwzvO + knPM7dGnPivtTEN8KCqC7FDuL0S5F5eaJaqo1frycMVZiOUcjsYA+6Eew2L6jqNdSTfFRFOILWrdzdAS + YIcYDldT3I0ulQtTdzcmTkIlBW3FeGuU+whoy3mooFZLlWixKw+FPN5NkgYM9Xg89Kn+/8hVouihlNvo + RzHkboov3W2amdujQ8fa3BntKTNQE+GEikBrVPha0QT4g63al08HFQ/vWVt9J9TSGVF9w9XR8ZaNd7qn + CndAg6sxWsg107jcnz3JjYgQsZj3YGFab8NUT1SR61QwK68xvkLTaAJfOQrJ740OkHxEr1Q0jDcxSW4M + oudjX0sopHoodRP1s1lsHnN75JSnJZ3qmj0BtWGOgzm+/MerT1te7C7AKxYWlSR1HOoxclYIhfvV9Aja + QhNop8y2WiAoZG6NjE9CQhJ6FieiiVa/jnJ+dYg9Kih4NStfRa2M2jl6EJfo6Gvy/ajwZ6n9172eZmil + 5+kbdqK7RuRhzK0np2vBbEV7SjTksT6om+RGJYIElQEichvB4OpfdRUhx9z8NElHrSzm67A9yp3s7nVK + xtEjqgmSOGabmVtPRnVQUFJH9jy0zpuEphnjUT/ZAzXkRpVUXVZrzgCKhfdsRXfZ2tpRTJdRI8HCIqfb + xw5tnnyclXBHlpHqYyLPdC2jCSRPQVN8MG5Ge6E2XDoYB9X+Asi8bJBlZnaSpEPv5UeZ41KHr9q9nKDw + FCPIwEDzXvTxqaDMc3PWzN6u5XPRlhoDxQthaJjqg2/CnVAVaIsafyuUejogzIC9guky6ljp6rpc4HIf + trs6YpdAcIq5/HjUeXo6t6QmQrUyGW3pz+Pb2RFoiPVFXQQFMpXOtYEiXHK1BY81+EZhzFgustrW4yrF + BQe7e2wKD+by8ByTSPy6FyRAlZsGZWYcmudEQj7dH/WRLqihB5e6IBt84WILMxYrgukyJpiamppX+YoH + WsV2VBzqJjCXhyfI1NT/ftZcqPMy0J49Cy3zp6BxRiBuRrmhjkqJWkqnZ50cHtGpNZ7pMmZkOTqu7/dw + xTJT04PMpeGZaGLi+CAjEer1mejImYvWlFgoEkJwizJRQwQFcrAT9vD5ZSQdtuIcDY64O5cf53Jrma+P + R+20ibUDuenoWpnCxEE4mmJ8cCvKBdcoO4TpG/7vvzbHEHMdHY84Y2PNqfz4GW+ymVl8R3wUevPSBl+h + K+dPRktCMMpC3VEgsKwmiXRI+avx5K8fl3I4hU1TQtC5MI7Og2hURfnhKJ/fZ6GtHc9Inn0S9A23nrC2 + 7jpNOXmLJfeGuZbWXLpMJcpvCF0Wy43ysKZk0LjNmJy8v/Pbh8X6N3byy1ecBZtwAAAAAElFTkSuQmCC +</value> + </data> + <metadata name="toolStrip3.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> + <value>133, 56</value> + </metadata> + <data name="bLoadHands.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64"> + <value> + iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8 + YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAJ1SURBVDhPvZJZSNRRHEb/Dz30kkVmJEKSJWKBGBhSPYgY + Ua6UKyipYblRZijmuDTjrrPoqFMq2ow6jTpaWYphhVAoEqHlQompWVBUiqmhkttpHEWyfAiCPvjgcu89 + hx+XK/yXZBZXu0iUOq7lVpKt0pMk1SSvHf1dQuJUeEfKg1bWlxIrzNIMsvgMtW9wXDFCgzbf31B+b0tt + ttxIb5JIUYmHT7Qcr8gCo4DBXg1zk/XG/pjQsTCmRl8pp1GbnrbGbIh3lAKvCCXu4UUI9VUKZidqNsBL + n0tY6I+l5lYu1aVZqIvTKCtI5aZMRFFOAmue1dRqpMx+1azDywaYQRH0h2/aPwS3y3P4/qlsHW5tkBr7 + UJ9Hky6He9VZ6NXp6MokVKquU6FMplQhQiVNXJVVl2Ux/b7QOPZIu5jGGgVLIxIYzdjYd4a94SQYiIPX + 0fTU+RET6lklqFXpTA3lwgcZ92vldD6SrV76dfRXwdDlw2KHG3OPnXlbZUfYOaepK2Eeh4RypZhvbySM + dqTQqJOxPCyGvohVsOe8AQxgsdOTubaTTLccZ7zhMJJIawJcTAuMb1CiSGG8N5E7WindzwyTDMQaBBeg + O4jl52eYf3qamVYnJhod+FJrS1fmDgLdrHCw2WZjFKjyRPS1pXJXmwdDqfDSMO4LX+bb3Zl54sxkkyNj + ejs+ag7QLzNFHL4f+4PmzUZ4JYXZCdRX5tL/IIqufGG9nbIttOVspTltO3XJZqgTLLhx1ZJA133LjvaW + rmu4IORnxJMvvkh2YghJl/2JOe9JqN8Jzp46issxO47YWWNrZcFe813s3mnCHlOTjf/g3yIIPwHVOuT9 + xNmtFAAAAABJRU5ErkJggg== +</value> + </data> + <data name="bClearHands.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64"> + <value> + iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8 + YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAaLSURBVFhHtVcJTFRXFMXuS9qma9q06ZKmbWqbtpYgIgwf + RWTCMAKyCcwGDLiAygCK+xcBrRsgyCLrWB3ZRcoiMOiAbDMgEhUVpQjIvg0MqIAUbt/7fA2UxaHqSU4y + +fP+Pffed++772s8b7QnJOxtOX26vVYiedCUnLpd09T1LQ2SfIn++8WiTZIoaYiPH+zJy4OujAxAjkCd + WNx7NTKSTxD8N16oI60SSXx7dPTDAUU5DF6ugIFKTAV05eSALCJ87FbIsbZCX38LJnPj68/dkWaxOKYV + iavkZZToQAWiQo5YDgNyzDJoTUuFK/5+o6W7fO4muLispBzR0FgwYeEZcC8u7kQLFi8vnSaKn6nKMEtA + VVpMsf5PMUgdHIYlAqcNRkact2kz/w+NUTHhzUHiIWx4LlFVySVQFV+C/uIi6L9UBH2ICZaWHctMnL6i + Tc0fDVFRwU1BQUOU8aeKFk6wSIZYCF1XrvSILVd36K/iLqLNzQ93w8MDG5F4X1HRNFFK8LEoJYhYeJFi + H2KvQjGY6en5IJIgVAwWbzFtUn38HRZ6BDkwjI2pJSq7AH0XMQugr7p6KJ8kBySuQjikpTWoZ8LRps2q + h7rg4EP1oSHD2KjaohcwpdBQdXlUGhGoTHTfAEFmZkMHtLXT9U0FWrTpp+NOcLB/HUkOK5Gx2UWRGCUq + nWBBPkVVhRwqkpKUyRvdINFtA4QZG3Xs0NbxJVicn2nzc+PO0cN75Ei8V5qntmgfWqvE69E21eaeV6Zs + cockFH2C23rYr7Ool8m0NWSwOd/QErOj9uDBPbcPHRzpzcudNb3/FVXm51LEW3SrqLAvTbQZkmkHjnPs + R/y0tWJx+vWYjh/TMjPj5h/7d988EDDSk5szs6h0uqgy7zxFvLa5uLg/Y6s3pG7eCDj9Z9a5QpDhsnYD + U77h0lVOP1CDajbU7Pf3ueG/b6Q7J+upkU4WpsTRmgbUbtm7dkCaxybA6U9EqScXLvzHfY0jh2Eq+J0w + tfvI2tr6ZVpuKmr8fD1rSPJRd3bmpGjnFn1C9LyztPR+wYEAOItSj6NPQdGTJsbjR7iOu/VNuToE0+GL + hdbWr9FyU3F153a36+TuR92ZGfMTptl9uXJIdix4LN3TA856TDgQZ2EGUXZ2EoYJT38Zk/ctnfrpg6jC + x3PRVd+tqsGqqgFc7fMRxmyQl48qYqNHM7xEkC7yoNJ/ao0NRFtYyBlswXJ9E+6Pi5kO7846jq94exTU + opPqXkSYqv/atVZ8vqsjjEmS5LgsNWXkL29POIejR+lP4HMhmmXSqc8WGOmxeb8sWen8waz7ftnDg1Ht + 5dXVFBIM946HwL3w46AsLbktk8nGZhKczG403arT04eytngDjh47kOwihCCm0ZCZmYCNiw63HEEQr9By + 01Hl5V5fHXh4qBkJN0eEQUtkOLSciICuc+n1D9CW4HqYSVyJTsXGkuLhnG1bAUePHUhD/Y4rXmjtaIP7 + nTDhf6qp6foqLTUzKr09btwNOjohHBUJrZjRJ6AtJgo6zsQq+2tqWvAsnyKOzoZmuXw4b88uyNziRTmQ + joouniDGfDkCd4LNX7Kcxft81oqfjDLR5rUy9GJTWCi0ItG22Ghoi4uBdsz4WOg4KYaB6so7eEuoAwkV + aYtC/rDA3w+y0GGDHchAqSfN2eOha+wP6LH5uoQZ/2vqMqrO1QsvzBaJeOV8/mh94BFKtF0cBx2YJ+Oh + A12lOhF7srLquhSKxvq83Gap717I9tkCWXT0EuvVEGdjk6FnyiX0WYLv6CuXmvc+1Br4hVBnNwOZUKi6 + 5ktOEe48dfIJOxClO7dDDhLPpqNPsLeFOBarVg8ds7ps3k8rVri+N//bL3phiZXVm0Jb4feyDS71JaJN + Ew5MEsdsRLVxHhUdFT1yIJHHgQjjlX0GLK4xKrjfDM25H87abmpgAb4y48qVrl+fSzryxtvEsVMcuB4c + CLjqsQPJzo5ALicemZsLzPRYfE0dC84nc7abusBtgwdGtptbIGlnM96EuuOxA2UBflT6U9e6UO221tLB + Dt/vGMYOnz213eYDnEY9lv376ZtEzvH2tqO1uDjRluTv2AYpTgIgDfTHA6zsvR4PGPpj4zkD1QWa3e8E + Ctcx8lyFjcmW5pBkYXH/lJV5zb5VFiKGiWApbjdcO2j1s3/pzAi6OPGhosty/BUfMPhGi3/rmnK/pNpt + 3hU/fyzAJxqeZnioYOLfz/axqaHxL2HUXse//ro1AAAAAElFTkSuQmCC +</value> + </data> + <data name="label11.Text" xml:space="preserve"> + <value>Rozkłady muszą zostać wczytane przed "Uruchom BCS". + +W przeciwnym razie trzeba w BCS wybrać: Session->Upload hand records->Upload... + +Jeżeli Server->Show hand records w BCS nie pokazuje rozkładów (i/lub nie pokazują ich pierniczki), +to także należy ręcznie zrobić Upload.</value> + </data> <metadata name="timer.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> <value>527, 17</value> </metadata> <metadata name="openPBN.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> <value>607, 17</value> </metadata> + <metadata name="toolStrip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> + <value>710, 17</value> + </metadata> + <data name="bLaunch.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64"> + <value> + iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8 + YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAADkSURBVDhPY0AHAgV8/wUKeH2hXNIBxAAKDAFpLrxuR74h + MAPINgSkKe+q7f+si1b/U8+ak24ISEPaOYv/iSdN/0cfNfwfsl+fNENAimOOGf8PPaD/33+39n/3rer/ + HdYrE28ISGHgHt3/nts0/zttUP1vvVLhv8limf86cyXBhkCV4QYgRS4b1f7brFb8b7pU7r/efMn/6rPE + SHOB+XL5//oLpP9rzhL/rzRVmHjNIABSrD1H/L/qdJH/cpMESdMMAiAN8pOF/kv185OuGQRAmsS7ecnT + DAIQjWRqBgGKNJMOGBgA1G2C1Zl37FUAAAAASUVORK5CYII= +</value> + </data> + <data name="bUpdateSession.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64"> + <value> + iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8 + YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAIISURBVDhPYxj8YPrOP/9BuH/Tt//Ny9/+L5v1+H9W/63/ + UGlUULvid3D5/I+r/eqvS0GFwAZ0bPj/v2zRr/+Jfc/+u5WdnQqVQgWVi37qtKz6cyq1/8l/s6RNd6DC + DD3rv/wvmPftf0zfx/9uFbf/2+YeP2KefEATKo0AFUu+TahY/O2/c/7p/6pBc99BhRlqF774H9Z6779z + 9s1PFtkX/hsn7fuvG72pByqNAFVLP17Imf7+v2ny/v+6kevnQoUZcifd+W+fdzrHqfTSNNu8c//1Yrb9 + 1w1beh4qjQCN8z99Tp/69r9xwt7/BjE7rEBiaWlnWJM6roADLKz1jnVw0z2wAfJesz+DxFBACdCAtKnv + /pul7ocbgAyyZr6zSZvy5r9h3C7sBlQs+Hghdcrb//a5p/9bpR+ZCRWGg5plv+dlTPvwXz9mx3+dkCUX + oMIIkD31ZV9879P/XlU3/vtW3HybOvHFnDygreULv9k0rP47v3z59/fBzff/64av+q8VtmIiVBsCRDTd + 1g6svXrUo+zKf9/aO//jep//z5z27n/ezI//c2Z9+g/SrBe9+b9m6JLTGmFrdaDaUIFr8QVfu+xjR43j + d//XjdkKxqBA04vZAgz55UDNi07rhS0NhirHDgxjd2nqhK3p0wyYe1HJb8oXENYKnH1JN3TJJPWQlbpQ + ZYMGMDAAAE5bDhZeNnGYAAAAAElFTkSuQmCC +</value> + </data> + <metadata name="namesTimer.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> + <value>343, 21</value> + </metadata> <metadata name="$this.TrayHeight" type="System.Int32, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> - <value>43</value> + <value>55</value> </metadata> - <assembly alias="System.Drawing" name="System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" /> <data name="$this.Icon" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64"> <value> AAABAAEAMDAAAAEAIACoJQAAFgAAACgAAAAwAAAAYAAAAAEAIAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA diff --git a/Aktywator/MySQL.cs b/Aktywator/MySQL.cs index 29b90b5..a4d19c2 100644 --- a/Aktywator/MySQL.cs +++ b/Aktywator/MySQL.cs @@ -86,5 +86,6 @@ namespace Aktywator public static string getUser() { return Properties.Settings.Default.USER; } public static string getPass() { return Properties.Settings.Default.PASS; } public static string getPort() { return Properties.Settings.Default.PORT; } + public static bool getConfigured() { return Properties.Settings.Default.CONFIGURED; } } } diff --git a/Aktywator/MySQLTournament.cs b/Aktywator/MySQLTournament.cs new file mode 100644 index 0000000..3bc9acc --- /dev/null +++ b/Aktywator/MySQLTournament.cs @@ -0,0 +1,82 @@ +using System; +using System.Collections.Generic; +using System.Text; +using MySql.Data.MySqlClient; +using data = MySql.Data.MySqlClient.MySqlDataReader; + +namespace Aktywator +{ + public class MySQLTournament : Tournament + { + public MySQL mysql; + + public MySQLTournament(string name, int type) + { + this._name = name; + this._type = type; + if (this._type < Tournament.TYPE_UNKNOWN || this._type > Tournament.TYPE_RRB) + { + this._type = Tournament.TYPE_UNKNOWN; + } + mysql = new MySQL(name); + } + + public static string getLabel(string name, int type) + { + return name + " [" + (type == Tournament.TYPE_PARY ? 'P' : 'T') + "]"; + } + + public override string ToString() + { + return MySQLTournament.getLabel(this.name, this.type); + } + + public static List<TournamentListItem> getTournaments() + { + List<TournamentListItem> list = new List<TournamentListItem>(); + MySQL c = new MySQL(""); + data dbs = c.select("SELECT TABLE_SCHEMA, COLUMN_NAME FROM information_schema.COLUMNS WHERE TABLE_NAME = 'admin' AND COLUMN_NAME IN ('dnazwa', 'teamcnt') ORDER BY TABLE_SCHEMA;"); + while (dbs.Read()) + { + TournamentListItem item = new TournamentListItem(); + item.Name = dbs.GetString(0); + item.Type = "dnazwa".Equals(dbs.GetString(1)) ? Tournament.TYPE_PARY : Tournament.TYPE_TEAMY; + item.Label = MySQLTournament.getLabel(item.Name, item.Type); + list.Add(item); + } + dbs.Close(); + return list; + } + + override internal void setup() + { + if (this.mysql != null) + { + this.mysql.close(); + this.mysql.connect(); + } + } + + override internal string getName() + { + return this.name; + } + + override public string getSectionsNum() + { + throw new NotImplementedException("Don't call this method on generic class instance"); + } + + override public string getTablesNum() + { + throw new NotImplementedException("Don't call this method on generic class instance"); + } + + override internal string getTypeLabel() + { + throw new NotImplementedException("Don't call this method on generic class instance"); + } + + } +} + diff --git a/Aktywator/MysqlSettings.cs b/Aktywator/MysqlSettings.cs index df2fb15..c6f1b8c 100644 --- a/Aktywator/MysqlSettings.cs +++ b/Aktywator/MysqlSettings.cs @@ -29,11 +29,18 @@ namespace Aktywator Properties.Settings.Default.USER = eUser.Text; Properties.Settings.Default.PASS = ePass.Text; Properties.Settings.Default.PORT = ePort.Text; - Properties.Settings.Default.Save(); string msg = MySQL.test(); - if (msg == "") Close(); - else MessageBox.Show(msg, "Nieprawidłowe ustawienia", MessageBoxButtons.OK, MessageBoxIcon.Stop); + if (msg == "") + { + Properties.Settings.Default.CONFIGURED = true; + Properties.Settings.Default.Save(); + Close(); + } + else + { + MessageBox.Show(msg, "Nieprawidłowe ustawienia", MessageBoxButtons.OK, MessageBoxIcon.Stop); + } } } } diff --git a/Aktywator/ParyTournament.cs b/Aktywator/ParyTournament.cs new file mode 100644 index 0000000..0c9209f --- /dev/null +++ b/Aktywator/ParyTournament.cs @@ -0,0 +1,56 @@ +using System; +using System.Collections.Generic; +using System.Text; +using MySql.Data.MySqlClient; + +namespace Aktywator +{ + class ParyTournament: MySQLTournament + { + public ParyTournament(string name, int type = Tournament.TYPE_PARY) + : base(name, type) + { + this._type = Tournament.TYPE_PARY; + } + + override internal string getTypeLabel() + { + return "Pary"; + } + + override public string getSectionsNum() + { + return this.mysql.selectOne("SELECT COUNT(DISTINCT seknum) FROM sektory;"); + } + + override public string getTablesNum() + { + return this.mysql.selectOne("SELECT COUNT(*) FROM sektory;"); + } + + override internal Dictionary<int, List<string>> getNameList() + { + Dictionary<int, List<String>> pairs = new Dictionary<int, List<string>>(); + MySqlDataReader dbData = this.mysql.select("SELECT idp, CONCAT(imie, ' ', nazw) name FROM zawodnicy ORDER BY idp"); + while (dbData.Read()) + { + int pairNo = dbData.GetInt32(0); + if (!pairs.ContainsKey(pairNo)) + { + pairs.Add(pairNo, new List<string>()); + } + pairs[pairNo].Add(dbData.IsDBNull(1) ? " " : dbData.GetString(1)); + } + foreach (KeyValuePair<int, List<string>> pair in pairs) + { + while (pair.Value.Count < 2) + { + pair.Value.Add(" "); + } + } + dbData.Close(); + return pairs; + } + + } +} diff --git a/Aktywator/Properties/AssemblyInfo.cs b/Aktywator/Properties/AssemblyInfo.cs index df9c1fc..423d93f 100644 --- a/Aktywator/Properties/AssemblyInfo.cs +++ b/Aktywator/Properties/AssemblyInfo.cs @@ -10,7 +10,7 @@ using System.Runtime.InteropServices; [assembly: AssemblyConfiguration("")] [assembly: AssemblyCompany("Michał Zimniewicz")] [assembly: AssemblyProduct("Aktywator")] -[assembly: AssemblyCopyright("Copyright © 2011-2016 Michał Zimniewicz")] +[assembly: AssemblyCopyright("Copyright © 2011-2017 Michał Zimniewicz")] [assembly: AssemblyTrademark("")] [assembly: AssemblyCulture("")] @@ -32,5 +32,5 @@ using System.Runtime.InteropServices; // You can specify all the values or you can default the Build and Revision Numbers // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("1.0.6.0")] -[assembly: AssemblyFileVersion("1.0.6.0")] +[assembly: AssemblyVersion("1.1.2.0")] +[assembly: AssemblyFileVersion("1.1.2.0")] diff --git a/Aktywator/Properties/Resources.Designer.cs b/Aktywator/Properties/Resources.Designer.cs index 927703d..d3dedab 100644 --- a/Aktywator/Properties/Resources.Designer.cs +++ b/Aktywator/Properties/Resources.Designer.cs @@ -1,17 +1,17 @@ //------------------------------------------------------------------------------ // <auto-generated> // This code was generated by a tool. -// Runtime Version:4.0.30319.1 +// Runtime Version:4.0.30319.42000 // // Changes to this file may cause incorrect behavior and will be lost if // the code is regenerated. // </auto-generated> //------------------------------------------------------------------------------ -namespace Aktywator.Properties -{ - - +namespace Aktywator.Properties { + using System; + + /// <summary> /// A strongly-typed resource class, for looking up localized strings, etc. /// </summary> @@ -22,50 +22,52 @@ namespace Aktywator.Properties [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] - internal class Resources - { - + public class Resources { + private static global::System.Resources.ResourceManager resourceMan; - + private static global::System.Globalization.CultureInfo resourceCulture; - + [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] - internal Resources() - { + internal Resources() { } - + /// <summary> /// Returns the cached ResourceManager instance used by this class. /// </summary> [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] - internal static global::System.Resources.ResourceManager ResourceManager - { - get - { - if ((resourceMan == null)) - { + public static global::System.Resources.ResourceManager ResourceManager { + get { + if (object.ReferenceEquals(resourceMan, null)) { global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("Aktywator.Properties.Resources", typeof(Resources).Assembly); resourceMan = temp; } return resourceMan; } } - + /// <summary> /// Overrides the current thread's CurrentUICulture property for all /// resource lookups using this strongly typed resource class. /// </summary> [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] - internal static global::System.Globalization.CultureInfo Culture - { - get - { + public static global::System.Globalization.CultureInfo Culture { + get { return resourceCulture; } - set - { + set { resourceCulture = value; } } + + /// <summary> + /// Looks up a localized string similar to 2017-08-23 + ///. + /// </summary> + public static string BuildDate { + get { + return ResourceManager.GetString("BuildDate", resourceCulture); + } + } } } diff --git a/Aktywator/Properties/Resources.resx b/Aktywator/Properties/Resources.resx index af7dbeb..0470204 100644 --- a/Aktywator/Properties/Resources.resx +++ b/Aktywator/Properties/Resources.resx @@ -46,7 +46,7 @@ mimetype: application/x-microsoft.net.object.binary.base64 value : The object must be serialized with - : System.Serialization.Formatters.Binary.BinaryFormatter + : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter : and then encoded with base64 encoding. mimetype: application/x-microsoft.net.object.soap.base64 @@ -60,6 +60,7 @@ : 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"> @@ -68,9 +69,10 @@ <xsd:sequence> <xsd:element name="value" type="xsd:string" minOccurs="0" /> </xsd:sequence> - <xsd:attribute name="name" type="xsd:string" /> + <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"> @@ -85,9 +87,10 @@ <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" msdata:Ordinal="1" /> + <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"> @@ -114,4 +117,8 @@ <resheader name="writer"> <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> </resheader> + <assembly alias="System.Windows.Forms" name="System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" /> + <data name="BuildDate" type="System.Resources.ResXFileRef, System.Windows.Forms"> + <value>..\Resources\BuildDate.txt;System.String, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089;windows-1250</value> + </data> </root>
\ No newline at end of file diff --git a/Aktywator/Properties/Settings.Designer.cs b/Aktywator/Properties/Settings.Designer.cs index b099227..b5c16ed 100644 --- a/Aktywator/Properties/Settings.Designer.cs +++ b/Aktywator/Properties/Settings.Designer.cs @@ -1,7 +1,7 @@ //------------------------------------------------------------------------------ // <auto-generated> // This code was generated by a tool. -// Runtime Version:4.0.30319.225 +// Runtime Version:4.0.30319.42000 // // Changes to this file may cause incorrect behavior and will be lost if // the code is regenerated. @@ -70,5 +70,17 @@ namespace Aktywator.Properties { this["PORT"] = value; } } + + [global::System.Configuration.UserScopedSettingAttribute()] + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.Configuration.DefaultSettingValueAttribute("False")] + public bool CONFIGURED { + get { + return ((bool)(this["CONFIGURED"])); + } + set { + this["CONFIGURED"] = value; + } + } } } diff --git a/Aktywator/Properties/Settings.settings b/Aktywator/Properties/Settings.settings index 76a000d..7dbc1ee 100644 --- a/Aktywator/Properties/Settings.settings +++ b/Aktywator/Properties/Settings.settings @@ -14,5 +14,8 @@ <Setting Name="PORT" Type="System.String" Scope="User"> <Value Profile="(Default)">3306</Value> </Setting> + <Setting Name="CONFIGURED" Type="System.Boolean" Scope="User"> + <Value Profile="(Default)">False</Value> + </Setting> </Settings> </SettingsFile>
\ No newline at end of file diff --git a/Aktywator/RRBTournament.cs b/Aktywator/RRBTournament.cs new file mode 100644 index 0000000..48040ee --- /dev/null +++ b/Aktywator/RRBTournament.cs @@ -0,0 +1,79 @@ +using System; +using System.Collections.Generic; +using System.Text; +using System.Xml; +using System.IO; + +namespace Aktywator +{ + class RRBTournament : Tournament + { + private XmlDocument _xml; + + public RRBTournament(string name) + { + this._name = name; + this._type = Tournament.TYPE_RRB; + } + + override internal void setup() + { + this._xml = new XmlDocument(); + this._xml.Load(this._name); + } + + override internal string getName() + { + string tName = this._xml.SelectSingleNode("//ustawienia/nazwa").InnerText.Trim(); + return tName.Length > 0 ? tName : Path.GetFileName(this._name); + } + + override public string getSectionsNum() + { + List<string> sections = new List<string>(); + foreach (XmlNode table in this._xml.SelectNodes("//monitor/stoly/stol")) + { + string section = table.SelectSingleNode("sektor").InnerText; + if (!sections.Contains(section)) + { + sections.Add(section); + } + } + return sections.Count.ToString(); + } + + override public string getTablesNum() + { + return this._xml.SelectNodes("//monitor/stoly/stol").Count.ToString(); + } + + override internal string getTypeLabel() + { + return "RRBridge"; + } + + 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")) + { + 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) + { + pair.Value.Add(" "); + } + } + return names; + } + } +} diff --git a/Aktywator/Resources/BuildDate.txt b/Aktywator/Resources/BuildDate.txt new file mode 100644 index 0000000..6b9b605 --- /dev/null +++ b/Aktywator/Resources/BuildDate.txt @@ -0,0 +1 @@ +2017-11-20 diff --git a/Aktywator/Setting.cs b/Aktywator/Setting.cs index d31a452..613065f 100644 --- a/Aktywator/Setting.cs +++ b/Aktywator/Setting.cs @@ -26,23 +26,33 @@ namespace Aktywator this.fwV = firmwareVersion; } - public void load() + public void load(string section = null) { StringBuilder str = new StringBuilder(); str.Append("SELECT "); str.Append(this.name); str.Append(" FROM Settings"); + if (section != null) + { + str.Append(" WHERE `Section` = "); + str.Append(section); + } field.Checked = false; string a = bws.sql.selectOne(str.ToString()); field.Checked = a.ToUpper() == "TRUE" ? true : false; } - public static string load(string name, Bws bws, StringBuilder errors) + public static string load(string name, Bws bws, StringBuilder errors, string section = null) { StringBuilder str = new StringBuilder(); str.Append("SELECT "); str.Append(name); str.Append(" FROM Settings"); + if (section != null) + { + str.Append(" WHERE `Section` = "); + str.Append(section); + } try { return bws.sql.selectOne(str.ToString()); @@ -55,23 +65,33 @@ namespace Aktywator } } - public void save() + public void save(string section = null) { StringBuilder str = new StringBuilder(); str.Append("UPDATE Settings SET "); str.Append(this.name); if (field.Checked) str.Append("=true"); else str.Append("=false"); + if (section != null) + { + str.Append(" WHERE `Section` = "); + str.Append(section); + } bws.sql.query(str.ToString()); } - public static void save(string name, string value, Bws bws, StringBuilder errors) + public static void save(string name, string value, Bws bws, StringBuilder errors, string section = null) { StringBuilder str = new StringBuilder(); str.Append("UPDATE Settings SET "); str.Append(name); str.Append("="); str.Append(value); + if (section != null) + { + str.Append(" WHERE `Section` = "); + str.Append(section); + } try { bws.sql.query(str.ToString()); @@ -135,5 +155,20 @@ namespace Aktywator } return str.ToString(); } + + public void createField(Sql sql, bool setDefault = true) + { + try + { + sql.query(this.getAddColumnSql()); + if (setDefault) + { + sql.query(this.getSetDefaultSql()); + } + } + catch (OleDbException) + { + } + } } } diff --git a/Aktywator/Sql.cs b/Aktywator/Sql.cs index c35b0dd..b3f2104 100644 --- a/Aktywator/Sql.cs +++ b/Aktywator/Sql.cs @@ -7,6 +7,10 @@ using data = System.Data.OleDb.OleDbDataReader; namespace Aktywator { + class OleDbRowMissingException : Exception + { + } + class Sql { private OleDbConnection connection; @@ -34,12 +38,19 @@ namespace Aktywator OleDbCommand cmd = new OleDbCommand(q, connection); return cmd.ExecuteNonQuery(); } - public string selectOne(string q) + public string selectOne(string q, bool checkForRow = false) { OleDbCommand cmd = new OleDbCommand(q, connection); object o = cmd.ExecuteScalar(); - if (o == null) return ""; - else return o.ToString(); + if (o == null) // it's null if the row does not exist, it'd be DBNull.Value if NULL was the value in existing row + { + if (!checkForRow) + { + return ""; + } + throw new OleDbRowMissingException(); + } + return o.ToString(); } public data select(string q) { @@ -72,5 +83,31 @@ namespace Aktywator } return true; } + + internal void insert(string table, Dictionary<string, object> columns) + { + StringBuilder query = new StringBuilder(); + query.Append("INSERT INTO "); + query.Append(table); + query.Append(" ("); + List<string> keys = new List<string>(); + List<string> parameters = new List<string>(); + foreach (string key in columns.Keys) + { + keys.Add("`" + key + "`"); + parameters.Add("@" + key); + } + string[] fields = keys.ToArray(); + query.Append(String.Join(", ", fields)); + query.Append(") VALUES("); + query.Append(String.Join(", ", parameters.ToArray())); + query.Append(")"); + OleDbCommand command = new OleDbCommand(query.ToString(), connection); + foreach (KeyValuePair<string, object> column in columns) + { + command.Parameters.AddWithValue("@" + column.Key, column.Value); + } + command.ExecuteScalar(); + } } } diff --git a/Aktywator/TeamNamesSettings.Designer.cs b/Aktywator/TeamNamesSettings.Designer.cs new file mode 100644 index 0000000..07b1d97 --- /dev/null +++ b/Aktywator/TeamNamesSettings.Designer.cs @@ -0,0 +1,206 @@ +namespace Aktywator +{ + partial class TeamNamesSettings + { + /// <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.lTournamentName = new System.Windows.Forms.Label(); + this.label3 = new System.Windows.Forms.Label(); + this.cbRounds = new System.Windows.Forms.ComboBox(); + this.label4 = new System.Windows.Forms.Label(); + this.cbSegments = new System.Windows.Forms.ComboBox(); + this.label5 = new System.Windows.Forms.Label(); + this.rbShowTeamNames = new System.Windows.Forms.RadioButton(); + this.label6 = new System.Windows.Forms.Label(); + this.cbSecondRow = new System.Windows.Forms.ComboBox(); + this.rbShowPlayerNames = new System.Windows.Forms.RadioButton(); + this.bClose = new System.Windows.Forms.Button(); + this.SuspendLayout(); + // + // label1 + // + this.label1.AutoSize = true; + this.label1.Location = new System.Drawing.Point(13, 13); + this.label1.Name = "label1"; + this.label1.Size = new System.Drawing.Size(42, 13); + this.label1.TabIndex = 0; + this.label1.Text = "Turniej:"; + // + // lTournamentName + // + this.lTournamentName.AutoSize = true; + this.lTournamentName.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(238))); + this.lTournamentName.Location = new System.Drawing.Point(61, 13); + this.lTournamentName.Name = "lTournamentName"; + this.lTournamentName.Size = new System.Drawing.Size(109, 13); + this.lTournamentName.TabIndex = 1; + this.lTournamentName.Text = "lTournamentName"; + // + // label3 + // + this.label3.AutoSize = true; + this.label3.Location = new System.Drawing.Point(13, 42); + this.label3.Name = "label3"; + this.label3.Size = new System.Drawing.Size(42, 13); + this.label3.TabIndex = 2; + this.label3.Text = "Runda:"; + // + // cbRounds + // + this.cbRounds.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; + this.cbRounds.FormattingEnabled = true; + this.cbRounds.Location = new System.Drawing.Point(61, 39); + this.cbRounds.Name = "cbRounds"; + this.cbRounds.Size = new System.Drawing.Size(41, 21); + this.cbRounds.TabIndex = 3; + // + // label4 + // + this.label4.AutoSize = true; + this.label4.Location = new System.Drawing.Point(108, 42); + this.label4.Name = "label4"; + this.label4.Size = new System.Drawing.Size(52, 13); + this.label4.TabIndex = 4; + this.label4.Text = "Segment:"; + // + // cbSegments + // + this.cbSegments.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; + this.cbSegments.FormattingEnabled = true; + this.cbSegments.Location = new System.Drawing.Point(166, 39); + this.cbSegments.Name = "cbSegments"; + this.cbSegments.Size = new System.Drawing.Size(41, 21); + this.cbSegments.TabIndex = 5; + // + // label5 + // + this.label5.AutoSize = true; + this.label5.Location = new System.Drawing.Point(13, 69); + this.label5.Name = "label5"; + this.label5.Size = new System.Drawing.Size(52, 13); + this.label5.TabIndex = 6; + this.label5.Text = "Wyświetl:"; + // + // rbShowTeamNames + // + this.rbShowTeamNames.AutoSize = true; + this.rbShowTeamNames.Checked = true; + this.rbShowTeamNames.Location = new System.Drawing.Point(16, 90); + this.rbShowTeamNames.Name = "rbShowTeamNames"; + this.rbShowTeamNames.Size = new System.Drawing.Size(95, 17); + this.rbShowTeamNames.TabIndex = 7; + this.rbShowTeamNames.TabStop = true; + this.rbShowTeamNames.Text = "nazwy teamów"; + this.rbShowTeamNames.UseVisualStyleBackColor = true; + // + // label6 + // + this.label6.AutoSize = true; + this.label6.Location = new System.Drawing.Point(32, 115); + this.label6.Name = "label6"; + this.label6.Size = new System.Drawing.Size(65, 13); + this.label6.TabIndex = 8; + this.label6.Text = "drugi wiersz:"; + // + // cbSecondRow + // + this.cbSecondRow.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; + this.cbSecondRow.FormattingEnabled = true; + this.cbSecondRow.Items.AddRange(new object[] { + "nic", + "wynik meczu w IMP", + "wynik drużyny w VP"}); + this.cbSecondRow.Location = new System.Drawing.Point(103, 112); + this.cbSecondRow.Name = "cbSecondRow"; + this.cbSecondRow.Size = new System.Drawing.Size(115, 21); + this.cbSecondRow.TabIndex = 9; + // + // rbShowPlayerNames + // + this.rbShowPlayerNames.AutoSize = true; + this.rbShowPlayerNames.Location = new System.Drawing.Point(16, 137); + this.rbShowPlayerNames.Name = "rbShowPlayerNames"; + this.rbShowPlayerNames.Size = new System.Drawing.Size(114, 17); + this.rbShowPlayerNames.TabIndex = 10; + this.rbShowPlayerNames.Text = "nazwiska z lineupu"; + this.rbShowPlayerNames.UseVisualStyleBackColor = true; + this.rbShowPlayerNames.CheckedChanged += new System.EventHandler(this.rbShowPlayerNames_CheckedChanged); + // + // bClose + // + this.bClose.Location = new System.Drawing.Point(16, 164); + this.bClose.Name = "bClose"; + this.bClose.Size = new System.Drawing.Size(202, 23); + this.bClose.TabIndex = 11; + this.bClose.Text = "Zamknij"; + this.bClose.UseVisualStyleBackColor = true; + this.bClose.Click += new System.EventHandler(this.bClose_Click); + // + // TeamNamesSettings + // + this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.ClientSize = new System.Drawing.Size(230, 199); + this.Controls.Add(this.bClose); + this.Controls.Add(this.rbShowPlayerNames); + this.Controls.Add(this.cbSecondRow); + this.Controls.Add(this.label6); + this.Controls.Add(this.rbShowTeamNames); + this.Controls.Add(this.label5); + this.Controls.Add(this.cbSegments); + this.Controls.Add(this.label4); + this.Controls.Add(this.cbRounds); + this.Controls.Add(this.label3); + this.Controls.Add(this.lTournamentName); + this.Controls.Add(this.label1); + this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedToolWindow; + this.Name = "TeamNamesSettings"; + this.Text = "JFR Teamy - nazwiska"; + this.FormClosed += new System.Windows.Forms.FormClosedEventHandler(this.TeamNamesSettings_FormClosed); + this.Shown += new System.EventHandler(this.TeamNamesSettings_Shown); + this.ResumeLayout(false); + this.PerformLayout(); + + } + + #endregion + + private System.Windows.Forms.Label label1; + private System.Windows.Forms.Label lTournamentName; + private System.Windows.Forms.Label label3; + private System.Windows.Forms.ComboBox cbRounds; + private System.Windows.Forms.Label label4; + private System.Windows.Forms.ComboBox cbSegments; + private System.Windows.Forms.Label label5; + private System.Windows.Forms.RadioButton rbShowTeamNames; + private System.Windows.Forms.Label label6; + private System.Windows.Forms.ComboBox cbSecondRow; + private System.Windows.Forms.RadioButton rbShowPlayerNames; + private System.Windows.Forms.Button bClose; + } +}
\ No newline at end of file diff --git a/Aktywator/TeamNamesSettings.cs b/Aktywator/TeamNamesSettings.cs new file mode 100644 index 0000000..034e362 --- /dev/null +++ b/Aktywator/TeamNamesSettings.cs @@ -0,0 +1,164 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Data; +using System.Drawing; +using System.Text; +using System.Windows.Forms; + +namespace Aktywator +{ + public partial class TeamNamesSettings : Form + { + public TeamNamesSettings() + { + InitializeComponent(); + } + + private MainForm form; + private TeamyTournament tournament; + public const int OpenClosedDiff = 1000; + + internal void initTournament(TeamyTournament tournament, MainForm form) + { + this.form = form; + this.tournament = tournament; + lTournamentName.Text = this.tournament.getName(); + int rounds = this.tournament.getRoundsNum(); + int segments = this.tournament.getSegmentsNum(); + cbRounds.Items.Clear(); + for (int i = 1; i <= rounds; i++) + { + cbRounds.Items.Add(i.ToString()); + } + cbSegments.Items.Clear(); + for (int i = 1; i <= segments; i++) + { + cbSegments.Items.Add(i.ToString()); + } + List<int> currentSegment = this.tournament.getCurrentSegment(); + cbRounds.SelectedIndex = currentSegment[0] - 1; + cbSegments.SelectedIndex = currentSegment[1] - 1; + cbSecondRow.SelectedIndex = 0; + } + + public string getLabel() + { + StringBuilder ret = new StringBuilder(); + ret.Append(cbRounds.SelectedItem); + ret.Append('-'); + ret.Append(cbSegments.SelectedItem); + ret.Append(", "); + if (rbShowTeamNames.Checked) + { + ret.Append("teamy"); + if (cbSecondRow.SelectedIndex == 1) + { + ret.Append(" + IMP"); + } + if (cbSecondRow.SelectedIndex == 2) + { + ret.Append(" + VP"); + } + } + else + { + ret.Append("lineup"); + } + return ret.ToString(); + } + + public bool arePlayerNamesDisplayed() + { + return rbShowPlayerNames.Checked; + } + + public string getQuery() + { + StringBuilder ret = new StringBuilder(); + ret.Append("SELECT teams.id, "); + if (rbShowTeamNames.Checked) + { + ret.Append("fullname, "); + switch (cbSecondRow.SelectedIndex) { + case 0: + ret.Append("' ' FROM teams ORDER BY teams.id"); + break; + case 1: + ret.Append("CONCAT("); + ret.Append("SUM(IF(segments.homet = teams.id, segments.impH+segments.corrH, segments.impV+segments.corrV))"); + ret.Append(" + IF(matches.homet = teams.id AND matches.carry > 0, matches.carry, 0)"); + ret.Append("+ IF(matches.visit = teams.id AND matches.carry < 0, -matches.carry, 0),"); + ret.Append("' IMP')"); + ret.Append("FROM teams LEFT JOIN segments ON (teams.id = segments.homet OR teams.id = segments.visit) AND segments.rnd = "); + ret.Append(cbRounds.SelectedItem); + ret.Append(" AND segments.segment < "); + ret.Append(cbSegments.SelectedItem); + ret.Append(" LEFT JOIN matches ON (teams.id = matches.homet OR teams.id = matches.visit) AND matches.rnd = "); + ret.Append(cbRounds.SelectedItem); + ret.Append(" GROUP BY teams.id ORDER BY teams.id"); + break; + case 2: + ret.Append("CONCAT(SUM(IF(matches.homet = teams.id, vph+corrh, vpv+corrv)) + teams.score, ' VP') FROM teams LEFT JOIN matches ON (teams.id = matches.homet OR teams.id = matches.visit) AND matches.rnd <= "); + ret.Append(cbRounds.SelectedItem); + ret.Append(" GROUP BY teams.id ORDER BY teams.id"); + break; + } + } + else + { + ret.Append("CONCAT(p1.gname, ' ', p1.sname), CONCAT(p2.gname, ' ', p2.sname) FROM teams JOIN segments ON segments.rnd = "); + ret.Append(cbRounds.SelectedItem); + ret.Append(" AND segments.segment = "); + ret.Append(cbSegments.SelectedItem); + ret.Append(" AND teams.id = segments.homet LEFT JOIN players p1 ON p1.id = segments.openN LEFT JOIN players p2 ON p2.id = segments.openS"); + + ret.Append(" UNION SELECT teams.id, CONCAT(p1.gname, ' ', p1.sname), CONCAT(p2.gname, ' ', p2.sname) FROM teams JOIN segments ON segments.rnd = "); + ret.Append(cbRounds.SelectedItem); + ret.Append(" AND segments.segment = "); + ret.Append(cbSegments.SelectedItem); + ret.Append(" AND teams.id = segments.visit LEFT JOIN players p1 ON p1.id = segments.openE LEFT JOIN players p2 ON p2.id = segments.openW"); + + ret.Append(" UNION SELECT teams.id + "); + ret.Append(TeamNamesSettings.OpenClosedDiff); + ret.Append(", CONCAT(p1.gname, ' ', p1.sname), CONCAT(p2.gname, ' ', p2.sname) FROM teams JOIN segments ON segments.rnd = "); + ret.Append(cbRounds.SelectedItem); + ret.Append(" AND segments.segment = "); + ret.Append(cbSegments.SelectedItem); + ret.Append(" AND teams.id = segments.homet LEFT JOIN players p1 ON p1.id = segments.closeE LEFT JOIN players p2 ON p2.id = segments.closeW"); + + ret.Append(" UNION SELECT teams.id + "); + ret.Append(TeamNamesSettings.OpenClosedDiff); + ret.Append(", CONCAT(p1.gname, ' ', p1.sname), CONCAT(p2.gname, ' ', p2.sname) FROM teams JOIN segments ON segments.rnd = "); + ret.Append(cbRounds.SelectedItem); + ret.Append(" AND segments.segment = "); + ret.Append(cbSegments.SelectedItem); + ret.Append(" AND teams.id = segments.visit LEFT JOIN players p1 ON p1.id = segments.closeN LEFT JOIN players p2 ON p2.id = segments.closeS"); + ret.Append(" ORDER BY id"); + } + return ret.ToString(); + } + + private void rbShowPlayerNames_CheckedChanged(object sender, EventArgs e) + { + cbSecondRow.Enabled = !rbShowPlayerNames.Checked; + } + + private void bClose_Click(object sender, EventArgs e) + { + this.Close(); + } + + private void TeamNamesSettings_FormClosed(object sender, FormClosedEventArgs e) + { + this.form.bTeamsNamesSettings.Text = this.getLabel(); + this.form.namesTimer_Tick(null, null); + this.form.namesTimer.Enabled = true; + } + + private void TeamNamesSettings_Shown(object sender, EventArgs e) + { + this.form.namesTimer.Enabled = false; + } + } +} diff --git a/Aktywator/TeamNamesSettings.resx b/Aktywator/TeamNamesSettings.resx new file mode 100644 index 0000000..7080a7d --- /dev/null +++ b/Aktywator/TeamNamesSettings.resx @@ -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=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> + </resheader> + <resheader name="writer"> + <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> + </resheader> +</root>
\ No newline at end of file diff --git a/Aktywator/TeamyTournament.cs b/Aktywator/TeamyTournament.cs new file mode 100644 index 0000000..8da063d --- /dev/null +++ b/Aktywator/TeamyTournament.cs @@ -0,0 +1,95 @@ +using System; +using System.Collections.Generic; +using System.Text; +using MySql.Data.MySqlClient; + +namespace Aktywator +{ + class TeamyTournament : MySQLTournament + { + public TeamyTournament(string name, int type = Tournament.TYPE_TEAMY) + : base(name, type) + { + this._type = Tournament.TYPE_TEAMY; + } + + override internal string getTypeLabel() + { + return "Teamy"; + } + + override public string getSectionsNum() + { + return "1"; + } + + override public string getTablesNum() + { + return this.mysql.selectOne("SELECT teamcnt FROM admin;"); + } + + override internal Dictionary<int, List<string>> getNameList() + { + Dictionary<int, List<String>> teams = new Dictionary<int, List<string>>(); + MySqlDataReader dbData = this.mysql.select(MainForm.teamNames.getQuery()); + while (dbData.Read()) + { + List<string> names = new List<string>(); + names.Add(dbData.IsDBNull(1) ? " " : dbData.GetString(1)); + names.Add(dbData.IsDBNull(2) ? " " : dbData.GetString(2)); + teams.Add(dbData.GetInt32(0), names); + } + dbData.Close(); + return teams; + } + + private int rounds = 0; + internal int getRoundsNum() + { + if (this.rounds == 0) + { + this.rounds = Int32.Parse(this.mysql.selectOne("SELECT roundcnt FROM admin")); + } + return this.rounds; + } + + private int segments = 0; + internal int getSegmentsNum() + { + if (this.segments == 0) + { + this.segments = Int32.Parse(this.mysql.selectOne("SELECT segmentsperround FROM admin")); + } + return this.segments; + } + + internal List<int> getCurrentSegment() + { + MySqlDataReader finished = this.mysql.select("SELECT rnd, segm FROM admin"); + List<int> segment = new List<int>(); + finished.Read(); + segment.Add(finished.GetInt32(0)); + segment.Add(finished.GetInt32(1)); + segment[1]++; + if (segment[1] > this.getSegmentsNum()) { + segment[0]++; + segment[1] = 1; + if (segment[0] > this.getRoundsNum()) + { + segment[0] = this.getRoundsNum(); + segment[1] = this.getSegmentsNum(); + } + } + if (segment[0] < 1) + { + segment[0] = 1; + } + if (segment[1] < 1) + { + segment[1] = 1; + } + finished.Close(); + return segment; + } + } +} diff --git a/Aktywator/Tournament.cs b/Aktywator/Tournament.cs index b46740b..117b1da 100644 --- a/Aktywator/Tournament.cs +++ b/Aktywator/Tournament.cs @@ -1,82 +1,160 @@ using System; using System.Collections.Generic; using System.Text; -using MySql.Data.MySqlClient; -using data = MySql.Data.MySqlClient.MySqlDataReader; +using System.Windows.Forms; +using System.Drawing; namespace Aktywator { - public class Tournament + abstract public class Tournament { - private string _name; + public const int TYPE_PARY = 1; + public const int TYPE_TEAMY = 2; + public const int TYPE_RRB = 3; + public const int TYPE_UNKNOWN = 0; + + protected string _name; public string name { get { return _name; } } - private int _type; // 0-unknown, 1-Pary, 2-Teamy + protected int _type = Tournament.TYPE_UNKNOWN; // 0-unknown, 1-Pary, 2-Teamy, 3-RRB public int type { get { return _type; } } - public MySQL mysql; + abstract internal void setup(); + + abstract internal string getName(); + + abstract public string getSectionsNum(); - public Tournament(string name) + abstract public string getTablesNum(); + + abstract internal string getTypeLabel(); + + virtual internal Dictionary<int, List<string>> getNameList() { - this._name = name; - mysql = new MySQL(name); - recognizeType(); + return new Dictionary<int, List<string>>(); } - private void recognizeType() + virtual public void displayNameList(DataGridView grid) { - if ((mysql.selectOne("SHOW TABLES LIKE 'admin'") == "admin") - && (mysql.selectOne("SHOW FIELDS IN admin LIKE 'dnazwa'") == "dnazwa") - && (mysql.selectOne("SHOW TABLES LIKE 'zawodnicy'") == "zawodnicy")) - _type = 1; - else if ((mysql.selectOne("SHOW TABLES LIKE 'admin'") == "admin") - && (mysql.selectOne("SHOW FIELDS IN admin LIKE 'teamcnt'") == "teamcnt") - && (mysql.selectOne("SHOW TABLES LIKE 'players'") == "players")) - _type = 2; - else _type = 0; + Dictionary<int, List<string>> names = this.getNameList(); + foreach (KeyValuePair<int, List<string>> item in names) { + if (!this.updateNameListRow(grid, item.Key, item.Value)) + { + this.addNameListRow(grid, item.Key, item.Value); + } + } + List<DataGridViewRow> toDelete = new List<DataGridViewRow>(); + foreach (DataGridViewRow row in grid.Rows) + { + if (!names.ContainsKey(Int32.Parse(row.Cells[0].Value.ToString()))) + { + toDelete.Add(row); + } + } + foreach (DataGridViewRow r in toDelete) + { + grid.Rows.Remove(r); + } + grid.Update(); + grid.Refresh(); } - public override string ToString() + virtual internal bool updateNameListRow(DataGridView grid, int pairNumber, List<string> names) { - return this.name + " [" + (this.type == 1 ? 'P' : 'T') + "]"; + foreach (DataGridViewRow row in grid.Rows) + { + if (Int32.Parse(row.Cells[0].Value.ToString()) == pairNumber) + { + for (int i = 1; i < 3; i++) + { + if (!(bool)row.Cells[i].Tag) + { + row.Cells[i].Value = names[i - 1]; + row.Cells[i].Tag = false; + row.Cells[i].Style.BackColor = Color.White; + } + } + return true; + } + } + return false; } - public static List<Tournament> getTournaments() + virtual internal void addNameListRow(DataGridView grid, int pairNumber, List<string> names) { - List<Tournament> list = new List<Tournament>(); - MySQL c = new MySQL(""); - data dbs = c.select("SHOW DATABASES;"); - while (dbs.Read()) + DataGridViewRow row = new DataGridViewRow(); + row.Cells.Add(new DataGridViewTextBoxCell()); + row.Cells[0].Value = pairNumber.ToString(); + foreach (string name in names) { - Tournament t = new Tournament(dbs.GetString(0)); - if (t.type > 0) - list.Add(t); - t.mysql.close(); + DataGridViewTextBoxCell cell = new DataGridViewTextBoxCell(); + cell.Value = name; + cell.Tag = false; + row.Cells.Add(cell); } - return list; + grid.Rows.Add(row); + grid.FirstDisplayedScrollingRowIndex = grid.RowCount - 1; } - public string getSectionsNum() + virtual internal void clearCellLocks(DataGridView grid) { - if (type == 1) - return mysql.selectOne("SELECT COUNT(DISTINCT seknum) FROM sektory;"); - else - return "1"; + foreach (DataGridViewRow row in grid.Rows) + { + for (int i = 1; i < 3; i++) + { + row.Cells[i].Tag = false; + row.Cells[i].Style.BackColor = Color.White; + } + } } - public string getTablesNum() + virtual internal string shortenNameToBWS(string name) { - if (type == 1) - return mysql.selectOne("SELECT COUNT(*) FROM sektory;"); + name = Common.bezOgonkow(name); + if ("pauza".Equals(name.Trim())) + { + return " "; + } else - return mysql.selectOne("SELECT teamcnt FROM admin;"); + { + if (this._type != Tournament.TYPE_TEAMY || MainForm.teamNames.arePlayerNamesDisplayed()) + { + string[] nameParts = name.Trim().Split(' '); + if (nameParts.Length > 0) + { + nameParts[0] = (nameParts[0].Length > 0) ? nameParts[0][0].ToString() : " "; + } + name = String.Join(" ", nameParts); + } + if (name.Length > 18) + { + name = name.Substring(0, 18); + } + return name; + } } + virtual public Dictionary<int, List<string>> getBWSNames(DataGridView grid) + { + Dictionary<int, List<string>> dict = new Dictionary<int, List<string>>(); + foreach (DataGridViewRow row in grid.Rows) + { + List<string> names = new List<string>(); + for (int i = 1; i < 3; i++) + { + names.Add(this.shortenNameToBWS(row.Cells[i].Value.ToString())); + } + dict.Add(Int32.Parse(row.Cells[0].Value.ToString()), names); + } + return dict; + } + + } } diff --git a/Aktywator/app.config b/Aktywator/app.config index 7473011..f8dd4d2 100644 --- a/Aktywator/app.config +++ b/Aktywator/app.config @@ -19,6 +19,9 @@ <setting name="PORT" serializeAs="String"> <value>3306</value> </setting> + <setting name="CONFIGURED" serializeAs="String"> + <value>False</value> + </setting> </Aktywator.Properties.Settings> </userSettings> </configuration>
\ No newline at end of file |