diff options
author | Michal Zimniewicz <mzimniew@man.poznan.pl> | 2015-01-28 10:49:16 +0100 |
---|---|---|
committer | Michal Zimniewicz <mzimniew@man.poznan.pl> | 2015-01-28 10:49:16 +0100 |
commit | df318093a899583fd434a451d51e0618fe69d96b (patch) | |
tree | 9d295f762b5c4adbeb21d3e63cc85bf501ba377c |
initial commit with not released version 1.0.4v1.0.4
30 files changed, 4249 insertions, 0 deletions
diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..c33d7a1 --- /dev/null +++ b/.gitignore @@ -0,0 +1,196 @@ +## Ignore Visual Studio temporary files, build results, and +## files generated by popular Visual Studio add-ons. + +# User-specific files +*.suo +*.user +*.userosscache +*.sln.docstates + +# User-specific files (MonoDevelop/Xamarin Studio) +*.userprefs + +# Build results +[Dd]ebug/ +[Dd]ebugPublic/ +[Rr]elease/ +[Rr]eleases/ +x64/ +x86/ +build/ +bld/ +[Bb]in/ +[Oo]bj/ + +# Roslyn cache directories +*.ide/ + +# MSTest test Results +[Tt]est[Rr]esult*/ +[Bb]uild[Ll]og.* + +#NUNIT +*.VisualState.xml +TestResult.xml + +# Build Results of an ATL Project +[Dd]ebugPS/ +[Rr]eleasePS/ +dlldata.c + +*_i.c +*_p.c +*_i.h +*.ilk +*.meta +*.obj +*.pch +*.pdb +*.pgc +*.pgd +*.rsp +*.sbr +*.tlb +*.tli +*.tlh +*.tmp +*.tmp_proj +*.log +*.vspscc +*.vssscc +.builds +*.pidb +*.svclog +*.scc + +# Chutzpah Test files +_Chutzpah* + +# Visual C++ cache files +ipch/ +*.aps +*.ncb +*.opensdf +*.sdf +*.cachefile + +# Visual Studio profiler +*.psess +*.vsp +*.vspx + +# TFS 2012 Local Workspace +$tf/ + +# Guidance Automation Toolkit +*.gpState + +# ReSharper is a .NET coding add-in +_ReSharper*/ +*.[Rr]e[Ss]harper +*.DotSettings.user + +# JustCode is a .NET coding addin-in +.JustCode + +# TeamCity is a build add-in +_TeamCity* + +# DotCover is a Code Coverage Tool +*.dotCover + +# NCrunch +_NCrunch_* +.*crunch*.local.xml + +# MightyMoose +*.mm.* +AutoTest.Net/ + +# Web workbench (sass) +.sass-cache/ + +# Installshield output folder +[Ee]xpress/ + +# DocProject is a documentation generator add-in +DocProject/buildhelp/ +DocProject/Help/*.HxT +DocProject/Help/*.HxC +DocProject/Help/*.hhc +DocProject/Help/*.hhk +DocProject/Help/*.hhp +DocProject/Help/Html2 +DocProject/Help/html + +# Click-Once directory +publish/ + +# Publish Web Output +*.[Pp]ublish.xml +*.azurePubxml +# TODO: Comment the next line if you want to checkin your web deploy settings +# but database connection strings (with potential passwords) will be unencrypted +*.pubxml +*.publishproj + +# NuGet Packages +*.nupkg +# The packages folder can be ignored because of Package Restore +**/packages/* +# except build/, which is used as an MSBuild target. +!**/packages/build/ +# Uncomment if necessary however generally it will be regenerated when needed +#!**/packages/repositories.config + +# Windows Azure Build Output +csx/ +*.build.csdef + +# Windows Store app package directory +AppPackages/ + +# Others +*.[Cc]ache +ClientBin/ +[Ss]tyle[Cc]op.* +~$* +*~ +*.dbmdl +*.dbproj.schemaview +*.pfx +*.publishsettings +node_modules/ +bower_components/ + +# RIA/Silverlight projects +Generated_Code/ + +# Backup & report files from converting an old project file +# to a newer Visual Studio version. Backup files are not needed, +# because we have git ;-) +_UpgradeReport_Files/ +Backup*/ +UpgradeLog*.XML +UpgradeLog*.htm + +# SQL Server files +*.mdf +*.ldf + +# Business Intelligence projects +*.rdl.data +*.bim.layout +*.bim_*.settings + +# Microsoft Fakes +FakesAssemblies/ + +# Node.js Tools for Visual Studio +.ntvs_analysis.dat + +# Visual Studio 6 build log +*.plg + +# Visual Studio 6 workspace options file +*.opt diff --git a/Aktywator.sln b/Aktywator.sln new file mode 100644 index 0000000..db29515 --- /dev/null +++ b/Aktywator.sln @@ -0,0 +1,30 @@ + +Microsoft Visual Studio Solution File, Format Version 11.00 +# Visual Studio 2010 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Aktywator", "Aktywator\Aktywator.csproj", "{F0D5F11F-C954-4360-B85F-130ACEFFD4A0}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{9BFA941F-AAEF-4DA3-B4D8-EBC1AB4C09E6}" + ProjectSection(SolutionItems) = preProject + Aktywator.txt = Aktywator.txt + todo.txt = todo.txt + EndProjectSection +EndProject +Global + GlobalSection(SubversionScc) = preSolution + Svn-Managed = True + Manager = AnkhSVN - Subversion Support for Visual Studio + EndGlobalSection + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|x86 = Debug|x86 + Release|x86 = Release|x86 + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {F0D5F11F-C954-4360-B85F-130ACEFFD4A0}.Debug|x86.ActiveCfg = Debug|x86 + {F0D5F11F-C954-4360-B85F-130ACEFFD4A0}.Debug|x86.Build.0 = Debug|x86 + {F0D5F11F-C954-4360-B85F-130ACEFFD4A0}.Release|x86.ActiveCfg = Release|x86 + {F0D5F11F-C954-4360-B85F-130ACEFFD4A0}.Release|x86.Build.0 = Release|x86 + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git a/Aktywator.txt b/Aktywator.txt new file mode 100644 index 0000000..a57de4c --- /dev/null +++ b/Aktywator.txt @@ -0,0 +1,102 @@ +Known issues: +- nie działa oddzielne maksowanie każdego sektora + +--------------------- +Aktywator 1.0.4 +12.04.2013 + +??? + +--------------------- +Aktywator 1.0.3 +24.08.2011 + +Fixed: +- plik .pbn jest prawidłowo zamykany po wczytaniu rozkładów + +--------------------- +Aktywator 1.0.2 +24.08.2011 + +New: +- pokazywanie rozkładów (wymaga BCS 2.5.15, serwera 1.3.107d i pierników 1.6.1) +(nasz dotychczasowy firmware to serwer 1.3.1d i pierniki 1.4.1) +- pierniki i serwerki ze starym i nowym firmware'em można mieszać +(testy (na normalnych turniejach) pokazują, że te wersje ze sobą współpracują) + +Fixed: +- program się wywalał jeśli nie było serwera MySQL + +--------------------- +Aktywator 0.4.3 +09.06.2011 + +Fixed: +- BCS wywalał się czasem przy starcie małych turniejów + +--------------------- +Aktywator 0.4.2 +07.05.2011 + +New: +- możliwość kontroli formatu w jakim prezentowane są zapisy z rozdania po wklepaniu +(domyślnie wybrany "najlepszy" format: frekwens, 6 wierszy, zapisy w 2 kolumnach NS/EW) + +Changes: +- kilka ustawień domyślnych się zmieniło (np. domyślnie wyłączone jest automatyczne wypełnianie numeru rozdania) + +--------------------- +Aktywator 0.4.1 +16.04.2011 + +New: +- obsługa "nazwisk" w Teamach (wyświetlamy nazwę teamu w pierniczku) +- można (nie trzeba) sobie ustawić w Windowsie, żeby zawsze bws-y były otwierane za pomocą Aktywatora (może być wygodne) +- cykliczny update nazwisk (przydatne np. w czasie wklepywania listy startowej) +- możliwość wymuszenia synchronizacji wszystkich nazwisk na linii bws->serwerek (ponieważ to, że nazwiska są w bws-ie, nie musi znaczyć, że są także w serwerku, jeśli serwer był resetowany w trakcie sesji) + +Fixed: +- w parach czasem nazwiska NS i EW były odwrotnie wpisane do bws + +--------------------- +Aktywator 0.3 +13.04.2011 + +New: +- obsługa nazwisk w Parach; można update'ować nazwiska dowolnie w trakcie sesji (tylko te które zmieniły się od ostatniego razu są wysyłane do serwerka) + +Fixed: +- poprawnie odnajduje katalog "Program Files" jak się ma x64 + +--------------------- +Aktywator 0.2 +12.04.2011 + +Changes: +- kliknięcie "Uruchom BCS" i "Update ustawień w trakcie sesji" biorą pod uwagę niezapisane zmiany w formularzu ustawień (zapisują te zmiany) +- dużo spraw kosmetycznych + +--------------------- +Aktywator 0.1 +11.04.2011 + +- konwersja bws'ów do formatu Bm II (dodanie brakujących ustawień i miejsc na nazwiska) +- obsługa ustawień Bm I i Bm II (większości, bez tych niegdy nieżywanych i bez ustawień pokazywania rankingu, ale te ostatnie będą niedługo) +- możliwość update'u ustawień w trakcie sesji + +--------------------- +Procedura użycia: +1) normalnie generujemy bws'a z Par lub Teamów (BMKopsowi mówimy "nie" - robi jakieś stare bws'y) +2) uruchamiamy go przez Aktywatora +3) zgadzamy się na konwersję (wykonywana jednorazowo dla każdego bws'a) +4) wybieramy ustawienia, zwłaszcza np. PIN i zatwierdzamy je klikając "Zapisz" (ustawienia domyślne Bm I są wzięte z Par/Teamów, ustawienia domyślne Bm II są zrobione wg mojego widzimisię) +5) klikamy "Uruchom BCS" +-- +W trakcie sesji możemy np.: +- zmienić ustawienia: zmieniamy, klikamy "Zapisz", a następnie z menu wybieramy wymuszenie na serwerku synchronizacji ustawień (to ostatnie jest konieczne w trakcie sesji, bo inaczej zmiany trafią tylko do bws'a, ale serwerek się o nich nie dowie) +- wrzucić nazwiska, poprawiać itd. + +Tips & tricks: +- Puszczamy I sesję. Jeśli od razu włączymy ustawienie "pokazuj nazwiska", a nazwisk jeszcze nie ma, to przed każdą rundą będzie wyskakiwał pusty ekran. Lepiej więc pierwszą sesję puścić bez pokazywania nazwisk, a dopiero w trakcie uzupełniania listy startowej włączyć cykliczną synchronizację nazwisk i zmienić ustawienie "pokazuj nazwiska" (zatwierdzając opcją z menu). + +ZAWSZE UPEWNIAMY SIĘ ŻE UŻYWAMY NAJŚWIEŻSZEJ WERSJI :) diff --git a/Aktywator/Aktywator.csproj b/Aktywator/Aktywator.csproj new file mode 100644 index 0000000..b153254 --- /dev/null +++ b/Aktywator/Aktywator.csproj @@ -0,0 +1,163 @@ +<?xml version="1.0" encoding="utf-8"?> +<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> + <PropertyGroup> + <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> + <Platform Condition=" '$(Platform)' == '' ">x86</Platform> + <ProductVersion>8.0.30703</ProductVersion> + <SchemaVersion>2.0</SchemaVersion> + <ProjectGuid>{F0D5F11F-C954-4360-B85F-130ACEFFD4A0}</ProjectGuid> + <OutputType>WinExe</OutputType> + <AppDesignerFolder>Properties</AppDesignerFolder> + <RootNamespace>Aktywator</RootNamespace> + <AssemblyName>Aktywator</AssemblyName> + <TargetFrameworkVersion>v2.0</TargetFrameworkVersion> + <FileAlignment>512</FileAlignment> + <IsWebBootstrapper>false</IsWebBootstrapper> + <PublishUrl>C:\Users\Michzimny\Desktop\test\</PublishUrl> + <Install>true</Install> + <InstallFrom>Disk</InstallFrom> + <UpdateEnabled>false</UpdateEnabled> + <UpdateMode>Foreground</UpdateMode> + <UpdateInterval>7</UpdateInterval> + <UpdateIntervalUnits>Days</UpdateIntervalUnits> + <UpdatePeriodically>false</UpdatePeriodically> + <UpdateRequired>false</UpdateRequired> + <MapFileExtensions>true</MapFileExtensions> + <ApplicationRevision>1</ApplicationRevision> + <ApplicationVersion>1.0.0.%2a</ApplicationVersion> + <UseApplicationTrust>false</UseApplicationTrust> + <PublishWizardCompleted>true</PublishWizardCompleted> + <BootstrapperEnabled>true</BootstrapperEnabled> + </PropertyGroup> + <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' "> + <PlatformTarget>x86</PlatformTarget> + <DebugSymbols>true</DebugSymbols> + <DebugType>full</DebugType> + <Optimize>false</Optimize> + <OutputPath>bin\Debug\</OutputPath> + <DefineConstants>DEBUG;TRACE</DefineConstants> + <ErrorReport>prompt</ErrorReport> + <WarningLevel>4</WarningLevel> + </PropertyGroup> + <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x86' "> + <PlatformTarget>x86</PlatformTarget> + <DebugType>pdbonly</DebugType> + <Optimize>true</Optimize> + <OutputPath>bin\Release\</OutputPath> + <DefineConstants>TRACE</DefineConstants> + <ErrorReport>prompt</ErrorReport> + <WarningLevel>4</WarningLevel> + </PropertyGroup> + <PropertyGroup> + <ApplicationIcon>aktywator.ico</ApplicationIcon> + </PropertyGroup> + <PropertyGroup> + <ManifestCertificateThumbprint>3540A0B1FD02954E5FF083621AA5C2187BEE7F1C</ManifestCertificateThumbprint> + </PropertyGroup> + <PropertyGroup> + <ManifestKeyFile>Aktywator_TemporaryKey.pfx</ManifestKeyFile> + </PropertyGroup> + <PropertyGroup> + <GenerateManifests>true</GenerateManifests> + </PropertyGroup> + <PropertyGroup> + <SignManifests>true</SignManifests> + </PropertyGroup> + <ItemGroup> + <Reference Include="MySql.Data, Version=6.3.6.0, Culture=neutral, PublicKeyToken=c5687fc88969c44d, processorArchitecture=MSIL" /> + <Reference Include="System" /> + <Reference Include="System.Data" /> + <Reference Include="System.Deployment" /> + <Reference Include="System.Drawing" /> + <Reference Include="System.Windows.Forms" /> + <Reference Include="System.Xml" /> + </ItemGroup> + <ItemGroup> + <Compile Include="Bws.cs" /> + <Compile Include="ChooseTournament.cs"> + <SubType>Form</SubType> + </Compile> + <Compile Include="ChooseTournament.Designer.cs"> + <DependentUpon>ChooseTournament.cs</DependentUpon> + </Compile> + <Compile Include="Common.cs" /> + <Compile Include="HandRecord.cs" /> + <Compile Include="MainForm.cs"> + <SubType>Form</SubType> + </Compile> + <Compile Include="MainForm.Designer.cs"> + <DependentUpon>MainForm.cs</DependentUpon> + </Compile> + <Compile Include="MySQL.cs" /> + <Compile Include="MysqlSettings.cs"> + <SubType>Form</SubType> + </Compile> + <Compile Include="MysqlSettings.Designer.cs"> + <DependentUpon>MysqlSettings.cs</DependentUpon> + </Compile> + <Compile Include="PBN.cs" /> + <Compile Include="Program.cs" /> + <Compile Include="Properties\AssemblyInfo.cs" /> + <Compile Include="Setting.cs" /> + <Compile Include="Settings.cs" /> + <Compile Include="Sql.cs" /> + <Compile Include="Tournament.cs" /> + <EmbeddedResource Include="ChooseTournament.resx"> + <DependentUpon>ChooseTournament.cs</DependentUpon> + </EmbeddedResource> + <EmbeddedResource Include="MainForm.resx"> + <DependentUpon>MainForm.cs</DependentUpon> + </EmbeddedResource> + <EmbeddedResource Include="MysqlSettings.resx"> + <DependentUpon>MysqlSettings.cs</DependentUpon> + </EmbeddedResource> + <EmbeddedResource Include="Properties\Resources.resx"> + <Generator>ResXFileCodeGenerator</Generator> + <LastGenOutput>Resources.Designer.cs</LastGenOutput> + <SubType>Designer</SubType> + </EmbeddedResource> + <Compile Include="Properties\Resources.Designer.cs"> + <AutoGen>True</AutoGen> + <DependentUpon>Resources.resx</DependentUpon> + </Compile> + <None Include="Aktywator_TemporaryKey.pfx" /> + <None Include="app.config" /> + <None Include="Properties\Settings.settings"> + <Generator>SettingsSingleFileGenerator</Generator> + <LastGenOutput>Settings.Designer.cs</LastGenOutput> + </None> + <Compile Include="Properties\Settings.Designer.cs"> + <AutoGen>True</AutoGen> + <DependentUpon>Settings.settings</DependentUpon> + <DesignTimeSharedInput>True</DesignTimeSharedInput> + </Compile> + </ItemGroup> + <ItemGroup> + <Content Include="aktywator.ico" /> + </ItemGroup> + <ItemGroup> + <BootstrapperPackage Include="Microsoft.Net.Client.3.5"> + <Visible>False</Visible> + <ProductName>.NET Framework 3.5 SP1 Client Profile</ProductName> + <Install>false</Install> + </BootstrapperPackage> + <BootstrapperPackage Include="Microsoft.Net.Framework.3.5.SP1"> + <Visible>False</Visible> + <ProductName>.NET Framework 3.5 SP1</ProductName> + <Install>true</Install> + </BootstrapperPackage> + <BootstrapperPackage Include="Microsoft.Windows.Installer.3.1"> + <Visible>False</Visible> + <ProductName>Windows Installer 3.1</ProductName> + <Install>true</Install> + </BootstrapperPackage> + </ItemGroup> + <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> + <!-- 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"> + </Target> + <Target Name="AfterBuild"> + </Target> + --> +</Project>
\ No newline at end of file diff --git a/Aktywator/Bws.cs b/Aktywator/Bws.cs new file mode 100644 index 0000000..0be06df --- /dev/null +++ b/Aktywator/Bws.cs @@ -0,0 +1,409 @@ +using System; +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; + +namespace Aktywator +{ + class Bws + { + private string _filename; + public string filename + { + get { return _filename; } + } + + public Sql sql; + public List<Setting> settings; + private MainForm main; + public bool settingsChanged = false; + + public Bws(string filename, MainForm main) + { + this._filename = filename; + sql = new Sql(filename); + this.main = main; + main.lWczytywane.Text += this.lowBoard() + "-" + this.highBoard(); + } + + public void initSettings() + { + settings = new List<Setting>(); + settings.Add(new Setting("ShowResults", main.xShowResults, this)); + settings.Add(new Setting("RepeatResults", main.xRepeatResults, this)); + settings.Add(new Setting("ShowPercentage", main.xShowPercentage, this)); + //settings.Add(new Setting("GroupSections", main.xGroupSections, this)); + settings.Add(new Setting("ShowPairNumbers", main.xShowPairNumbers, this)); + settings.Add(new Setting("IntermediateResults", main.xIntermediateResults, this)); + settings.Add(new Setting("ShowContract", main.xShowContract, this)); + settings.Add(new Setting("LeadCard", main.xLeadCard, this)); + settings.Add(new Setting("MemberNumbers", main.xMemberNumbers, this)); + settings.Add(new Setting("MemberNumbersNoBlankEntry", main.xMemberNumbersNoBlankEntry, this)); + settings.Add(new Setting("BoardOrderVerification", main.xBoardOrderVerification, this)); + settings.Add(new Setting("AutoShutDownBPC", main.xAutoShutDownBPC, this)); + settings.Add(new Setting("BM2ConfirmNP", main.xConfirmNP, this)); + settings.Add(new Setting("BM2RemainingBoards", main.xRemainingBoards, this)); + settings.Add(new Setting("BM2NextSeatings", main.xNextSeatings, this)); + settings.Add(new Setting("BM2ScoreRecap", main.xScoreRecap, this)); + settings.Add(new Setting("BM2AutoShowScoreRecap", main.xAutoShowScoreRecap, this)); + settings.Add(new Setting("BM2ScoreCorrection", main.xScoreCorrection, this)); + settings.Add(new Setting("BM2AutoBoardNumber", main.xAutoBoardNumber, this)); + settings.Add(new Setting("BM2ResetFunctionKey", main.xResetFunctionKey, this)); + settings.Add(new Setting("BM2ViewHandrecord", main.xViewHandrecord, this)); + } + + public string sectionsForHandRecords() + { + try + { + string s; + data d = sql.select("SELECT DISTINCT `Section` FROM HandRecord ORDER BY 1"); + d.Read(); + s = d[0].ToString(); + while (d.Read()) + { + s += "," + d[0].ToString(); + } + return s; + } + catch (Exception) + { + return null; + } + } + + public void runBCS() + { + string app = Common.ProgramFilesx86() + "\\Bridgemate Pro\\BMPro.exe"; + string param = ""; + param += " /f[" + filename + " ]"; + param += " /s"; + param += " /r"; + //param += " /m"; + param += " /t2"; + + string sections = sectionsForHandRecords(); + if (sections != null) + param += " /h:[" + sections + "]"; // upload rozkladow + 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; + + 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")); + settings.Add(new Setting("BM2ScoreRecap", "bit", "false")); + settings.Add(new Setting("BM2AutoShowScoreRecap", "bit", "false")); + 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("Name", "text(18)", "''", "PlayerNumbers")); + settings.Add(new Setting("Updated", "bit", "false", "PlayerNumbers")); + + foreach (Setting s in settings) + { + try + { + sql.query(s.getAddColumnSql()); + sql.query(s.getSetDefaultSql()); + } + catch (OleDbException) + { + } + } + + try + { + sql.query("CREATE TABLE PlayerNames (ID integer, Name text(18));"); + } + catch (OleDbException) + { + } + + try + { + sql.query("CREATE TABLE HandRecord (`Section` integer, `Board` integer, " + + "NorthSpades text(13),NorthHearts text(13),NorthDiamonds text(13),NorthClubs text(13)," + + "EastSpades text(13),EastHearts text(13),EastDiamonds text(13),EastClubs text(13)," + + "SouthSpades text(13),SouthHearts text(13),SouthDiamonds text(13),SouthClubs text(13)," + + "WestSpades text(13),WestHearts text(13),WestDiamonds text(13),WestClubs text(13)" + + ");"); + } + catch (OleDbException) + { + } + } + + public void updateSettings() + { + sql.query("UPDATE Tables SET UpdateFromRound=997;"); + } + + public void loadSettings() + { + StringBuilder errors = new StringBuilder(); + foreach (Setting s in settings) + { + try + { + s.load(); + } + catch (OleDbException) + { + if (errors.Length > 0) errors.Append(", "); + 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); + int resultsOverview = 0; + int.TryParse(Setting.load("BM2ResultsOverview", this, errors), out resultsOverview); + main.xResultsOverview.SelectedIndex = resultsOverview; + + 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); + } + } + + public void saveSettings() + { + StringBuilder errors = new StringBuilder(); + foreach (Setting s in settings) + { + try + { + s.save(); + } + catch (OleDbException) + { + if (errors.Length > 0) errors.Append(", "); + 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); + + this.loadSettings(); + } + + private int updateName(string section, string table, string direction, string name) + { + 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) + { + sql.query("UPDATE PlayerNumbers SET Name='" + name + "', Updated=TRUE WHERE `Section`=" + section + " AND `Table`=" + table + + " AND `Direction`='" + direction + "'"); + return 1; + } + else return 0; + } + + public void syncNames(Tournament tournament, bool interactive, string startRounds) + { + int count = 0, countNew = 0, SKOK_STOLOW = 100; + data d; + startRounds = startRounds.Trim(); + + if (tournament.type == 1) + { + if (startRounds.Length > 0) + { + d = sql.select("SELECT `Section`, `Table`, NSPair, EWPair FROM RoundData WHERE NSPair>0 AND `Round` in (" + startRounds + ")"); + } + 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); + } + } + else + { + d = sql.select("SELECT `Section`, `Table`, NSPair, EWPair FROM RoundData WHERE `Table`<=100"); + } + + while (d.Read()) + { + string section = d.GetInt32(0).ToString(); + string table = d.GetInt32(1).ToString(); + string ns = d.GetInt32(2).ToString(); + string ew = d.GetInt32(3).ToString(); + + 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 + { + 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()); + + 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) + { + if (ee.ErrorCode == -2147467259) + { + 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; + } + else + { + MessageBox.Show(ee.Message, "Błąd MySQL", MessageBoxButtons.AbortRetryIgnore, MessageBoxIcon.Warning); + } + } + } + try + { + n.Close(); + } + catch (Exception) { } + } + if (interactive) + { + 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); + } + } + + public int lowBoard() + { + string s = sql.selectOne("SELECT min(lowBoard) FROM RoundData WHERE lowBoard > 0"); + int i; + if (int.TryParse(s, out i)) return i; + else return 0; + } + + public int highBoard() + { + string s = sql.selectOne("SELECT max(highBoard) FROM RoundData WHERE highBoard > 0"); + int i; + if (int.TryParse(s, out i)) return i; + else return 0; + } + + public int highSection() + { + string s = sql.selectOne("SELECT max(`Section`) FROM `Tables`"); + int i; + if (int.TryParse(s, out i)) return i; + else return 0; + } + + public void loadHandRecords(PBN pbn) + { + sql.query("DELETE FROM HandRecord"); + for (int i = 0; i < pbn.handRecords.Length; i++) + if (pbn.handRecords[i] != null) + for (int section = 1; section <= highSection(); section++) + { + HandRecord b = pbn.handRecords[i]; + StringBuilder str = new StringBuilder(50); + str.Append("INSERT INTO HandRecord VALUES ("); + str.Append(section); str.Append(","); + str.Append(i); str.Append(",'"); + str.Append(b.north[0]); str.Append("','"); + str.Append(b.north[1]); str.Append("','"); + str.Append(b.north[2]); str.Append("','"); + str.Append(b.north[3]); str.Append("','"); + str.Append(b.east[0]); str.Append("','"); + str.Append(b.east[1]); str.Append("','"); + str.Append(b.east[2]); str.Append("','"); + str.Append(b.east[3]); str.Append("','"); + str.Append(b.south[0]); str.Append("','"); + str.Append(b.south[1]); str.Append("','"); + str.Append(b.south[2]); str.Append("','"); + str.Append(b.south[3]); str.Append("','"); + str.Append(b.west[0]); str.Append("','"); + str.Append(b.west[1]); str.Append("','"); + str.Append(b.west[2]); str.Append("','"); + str.Append(b.west[3]); str.Append("')"); + sql.query(str.ToString()); + } + } + } +} diff --git a/Aktywator/ChooseTournament.Designer.cs b/Aktywator/ChooseTournament.Designer.cs new file mode 100644 index 0000000..6e1dfbd --- /dev/null +++ b/Aktywator/ChooseTournament.Designer.cs @@ -0,0 +1,77 @@ +namespace Aktywator +{ + partial class ChooseTournament + { + /// <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() + { + System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(ChooseTournament)); + this.listBox = new System.Windows.Forms.ListBox(); + this.bChoose = new System.Windows.Forms.Button(); + this.SuspendLayout(); + // + // listBox + // + this.listBox.FormattingEnabled = true; + this.listBox.Location = new System.Drawing.Point(12, 12); + this.listBox.Name = "listBox"; + this.listBox.Size = new System.Drawing.Size(218, 173); + this.listBox.TabIndex = 0; + this.listBox.MouseDoubleClick += new System.Windows.Forms.MouseEventHandler(this.listBox_MouseDoubleClick); + // + // bChoose + // + this.bChoose.Location = new System.Drawing.Point(83, 191); + this.bChoose.Name = "bChoose"; + this.bChoose.Size = new System.Drawing.Size(75, 23); + this.bChoose.TabIndex = 1; + this.bChoose.Text = "OK"; + this.bChoose.UseVisualStyleBackColor = true; + this.bChoose.Click += new System.EventHandler(this.bChoose_Click); + // + // ChooseTournament + // + this.AcceptButton = this.bChoose; + this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.ClientSize = new System.Drawing.Size(242, 223); + this.Controls.Add(this.bChoose); + this.Controls.Add(this.listBox); + this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedToolWindow; + this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon"))); + this.Name = "ChooseTournament"; + this.Text = "Wybierz turniej"; + this.Load += new System.EventHandler(this.ChooseTournament_Load); + this.ResumeLayout(false); + + } + + #endregion + + private System.Windows.Forms.ListBox listBox; + private System.Windows.Forms.Button bChoose; + } +}
\ No newline at end of file diff --git a/Aktywator/ChooseTournament.cs b/Aktywator/ChooseTournament.cs new file mode 100644 index 0000000..2bc2ded --- /dev/null +++ b/Aktywator/ChooseTournament.cs @@ -0,0 +1,47 @@ +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 ChooseTournament : Form + { + private Tournament[] turns; + public Tournament chosenTournament; + + public ChooseTournament() + { + InitializeComponent(); + } + + private void ChooseTournament_Load(object sender, EventArgs e) + { + List<Tournament> list = Tournament.getTournaments(); + turns = new Tournament[list.Count]; + int c = 0; + foreach (Tournament t in list) + { + turns[c++] = t; + listBox.Items.Add(t.ToString()); + } + } + + private void bChoose_Click(object sender, EventArgs e) + { + if (listBox.SelectedIndex >= 0) + { + chosenTournament = turns[listBox.SelectedIndex]; + Close(); + } + } + + private void listBox_MouseDoubleClick(object sender, MouseEventArgs e) + { + bChoose_Click(sender, e); + } + } +} diff --git a/Aktywator/ChooseTournament.resx b/Aktywator/ChooseTournament.resx new file mode 100644 index 0000000..d8d4062 --- /dev/null +++ b/Aktywator/ChooseTournament.resx @@ -0,0 +1,287 @@ +<?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> + <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> + AAABAAEAMDAAAAEAIACoJQAAFgAA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AAAAAAAAAAAAAAAAAAAAAAAAAAAAD///////9vU///wAP//29T//4AAH// + b1P/+AAAH/9vU//gAAAH/29T/8AAAAP/b1P/AAAAAP9vU/4AAAAAf29T/AAAAAA/b1P4AAAAAB9vU/AA + AAAAD29T8AAAAAAPb1PgAAAAAAdvU+AAAAAAB29TwAAAAAADb1PAAAAAAANvU4AAAAAAAW9TgAAAAAAB + b1OAAAAAAAFvUwAAAAAAAG9TAAAAAAAAb1MAAAAAAABvUwAAAAAAAG9TAAAAAAAAb1MAAAAAAABvUwAA + AAAAAG9TAAAAAAAAb1MAAAAAAABvUwAAAAAAAG9TAAAAAAAAb1OAAAAAAAFvU4AAAAAAAW9TgAAAAAAB + b1PAAAAAAANvU8AAAAAAA29TwAAAAAADb1PgAAAAAAdvU/AAAAAAD29T8AAAAAAPb1P4AAAAAB9vU/wA + AAAAP29T/gAAAAB/b1P/AAAAAP9vU/+AAAAB/29T/+AAAAf/b1P/+AAAH/9vU//+AAB//29T///AA/// + b1M= +</value> + </data> +</root>
\ No newline at end of file diff --git a/Aktywator/Common.cs b/Aktywator/Common.cs new file mode 100644 index 0000000..d00649d --- /dev/null +++ b/Aktywator/Common.cs @@ -0,0 +1,43 @@ +using System; +using System.Collections.Generic; +using System.Text; + +namespace Aktywator +{ + static class Common + { + public static string ProgramFilesx86() + { + if (8 == IntPtr.Size + || (!String.IsNullOrEmpty(Environment.GetEnvironmentVariable("PROCESSOR_ARCHITEW6432")))) + { + return Environment.GetEnvironmentVariable("ProgramFiles(x86)"); + } + + return Environment.GetEnvironmentVariable("ProgramFiles"); + } + + public static string bezOgonkow(string str) + { + 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; + } + } +} diff --git a/Aktywator/HandRecord.cs b/Aktywator/HandRecord.cs new file mode 100644 index 0000000..bd0e9f9 --- /dev/null +++ b/Aktywator/HandRecord.cs @@ -0,0 +1,31 @@ +using System; +using System.Collections.Generic; +using System.Text; + +namespace Aktywator +{ + class HandRecord + { + public string[] north; + public string[] east; + public string[] south; + public string[] west; + + public HandRecord() + { + north = new string[4]; + east = new string[4]; + south = new string[4]; + west = new string[4]; + } + + public HandRecord(string pbnString) + { + string[] hand = pbnString.Split(' '); + north = hand[0].Split('.'); + east = hand[1].Split('.'); + south = hand[2].Split('.'); + west = hand[3].Split('.'); + } + } +} diff --git a/Aktywator/MainForm.Designer.cs b/Aktywator/MainForm.Designer.cs new file mode 100644 index 0000000..8a68b44 --- /dev/null +++ b/Aktywator/MainForm.Designer.cs @@ -0,0 +1,1013 @@ +namespace Aktywator +{ + partial class MainForm + { + /// <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.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(); + 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(); + this.status3 = new System.Windows.Forms.ToolStripStatusLabel(); + this.groupBox1 = new System.Windows.Forms.GroupBox(); + this.tabControl1 = new System.Windows.Forms.TabControl(); + this.tabPage1 = new System.Windows.Forms.TabPage(); + 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.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.xAutoShutDownBPC = new System.Windows.Forms.CheckBox(); + this.xIntermediateResults = 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.xLeadCard = new System.Windows.Forms.CheckBox(); + this.xShowContract = new System.Windows.Forms.CheckBox(); + this.xShowPairNumbers = new System.Windows.Forms.CheckBox(); + 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.tabPage2 = new System.Windows.Forms.TabPage(); + 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.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.tabPage3 = new System.Windows.Forms.TabPage(); + this.label14 = new System.Windows.Forms.Label(); + this.label13 = new System.Windows.Forms.Label(); + this.lWczytywane = new System.Windows.Forms.Label(); + this.label12 = 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.groupBoxTop.SuspendLayout(); + this.menu.SuspendLayout(); + this.statusStrip1.SuspendLayout(); + this.groupBox1.SuspendLayout(); + this.tabControl1.SuspendLayout(); + this.tabPage1.SuspendLayout(); + this.tabPage2.SuspendLayout(); + this.tabPage3.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, 480); + this.statusStrip1.Name = "statusStrip1"; + this.statusStrip1.Size = new System.Drawing.Size(577, 22); + this.statusStrip1.TabIndex = 2; + this.statusStrip1.Text = "statusBar"; + // + // status1 + // + this.status1.Name = "status1"; + this.status1.Size = new System.Drawing.Size(106, 17); + this.status1.Text = "Michał Zimniewicz"; + // + // status2 + // + this.status2.Margin = new System.Windows.Forms.Padding(50, 3, 0, 2); + this.status2.Name = "status2"; + this.status2.Size = new System.Drawing.Size(118, 17); + this.status2.Text = "toolStripStatusLabel1"; + // + // status3 + // + this.status3.Margin = new System.Windows.Forms.Padding(50, 3, 0, 2); + this.status3.Name = "status3"; + this.status3.Size = new System.Drawing.Size(118, 17); + this.status3.Text = "toolStripStatusLabel2"; + // + // groupBox1 + // + 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.Name = "groupBox1"; + this.groupBox1.Size = new System.Drawing.Size(577, 410); + this.groupBox1.TabIndex = 1; + this.groupBox1.TabStop = false; + // + // tabControl1 + // + 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.Name = "tabControl1"; + this.tabControl1.SelectedIndex = 0; + this.tabControl1.Size = new System.Drawing.Size(571, 391); + this.tabControl1.TabIndex = 0; + // + // tabPage1 + // + 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.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, 365); + this.tabPage1.TabIndex = 0; + this.tabPage1.Text = "Ustawienia"; + this.tabPage1.UseVisualStyleBackColor = true; + // + // xViewHandrecord + // + 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; + // + // 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(160, 19); + this.xResultsOverview.Name = "xResultsOverview"; + this.xResultsOverview.Size = new System.Drawing.Size(103, 21); + this.xResultsOverview.TabIndex = 28; + // + // bLoad + // + 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); + // + // bSave + // + 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(219, 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); + // + // xResetFunctionKey + // + this.xResetFunctionKey.AutoSize = true; + this.xResetFunctionKey.Location = new System.Drawing.Point(339, 299); + 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 + // + 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; + // + // xAutoBoardNumber + // + 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; + // + // xScoreCorrection + // + this.xScoreCorrection.AutoSize = true; + this.xScoreCorrection.Location = new System.Drawing.Point(339, 276); + 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 + // + 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; + // + // xScoreRecap + // + 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; + // + // xNextSeatings + // + 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; + // + // xRemainingBoards + // + this.xRemainingBoards.AutoSize = true; + this.xRemainingBoards.Location = new System.Drawing.Point(6, 299); + 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 + // + 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; + // + // xPINcode + // + 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"; + // + // label2 + // + 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"; + // + // xAutoShutDownBPC + // + 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; + // + // xIntermediateResults + // + 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; + // + // xBoardOrderVerification + // + this.xBoardOrderVerification.AutoSize = true; + this.xBoardOrderVerification.Location = new System.Drawing.Point(6, 276); + 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 + // + 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; + // + // xMemberNumbers + // + 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); + // + // xLeadCard + // + this.xLeadCard.AutoSize = true; + this.xLeadCard.Location = new System.Drawing.Point(339, 253); + 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, 230); + 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; + // + // xShowPairNumbers + // + 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; + // + // xGroupSections + // + this.xGroupSections.AutoSize = true; + this.xGroupSections.Enabled = false; + this.xGroupSections.Location = new System.Drawing.Point(27, 92); + this.xGroupSections.Name = "xGroupSections"; + this.xGroupSections.Size = new System.Drawing.Size(215, 17); + this.xGroupSections.TabIndex = 4; + this.xGroupSections.Text = "oddzielne maksowanie każdego sektora"; + this.xGroupSections.UseVisualStyleBackColor = true; + // + // xShowPercentage + // + 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; + // + // xRepeatResults + // + this.xRepeatResults.AutoSize = true; + this.xRepeatResults.Enabled = false; + this.xRepeatResults.Location = new System.Drawing.Point(27, 46); + 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 + // + 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); + // + // label1 + // + 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 :-" + + ")"; + // + // 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.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, 365); + 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!)"; + // + // eOomRounds + // + this.eOomRounds.Location = new System.Drawing.Point(12, 290); + this.eOomRounds.Name = "eOomRounds"; + this.eOomRounds.Size = new System.Drawing.Size(100, 20); + this.eOomRounds.TabIndex = 23; + // + // bForceSync + // + 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); + // + // lNazwyTeamow + // + 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; + // + // lSkok + // + 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; + // + // eInterval + // + 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"; + // + // label10 + // + 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."; + // + // label7 + // + 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"; + // + // bTruncate + // + 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); + // + // bMysqlSettings + // + 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); + // + // label8 + // + 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)"; + // + // bAutoSync + // + 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); + // + // bSync + // + 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); + // + // lTables + // + 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; + // + // lSections + // + this.lSections.AutoSize = true; + this.lSections.Location = new System.Drawing.Point(77, 102); + this.lSections.Name = "lSections"; + this.lSections.Size = new System.Drawing.Size(0, 13); + this.lSections.TabIndex = 7; + // + // lType + // + 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; + // + // label6 + // + this.label6.AutoSize = true; + this.label6.Location = new System.Drawing.Point(9, 127); + this.label6.Name = "label6"; + this.label6.Size = new System.Drawing.Size(44, 13); + this.label6.TabIndex = 5; + this.label6.Text = "Stołów:"; + // + // label5 + // + 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:"; + // + // label4 + // + 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:"; + // + // lTournament + // + 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; + // + // bTournament + // + 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); + // + // label3 + // + 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:"; + // + // tabPage3 + // + this.tabPage3.Controls.Add(this.label14); + this.tabPage3.Controls.Add(this.label13); + this.tabPage3.Controls.Add(this.lWczytywane); + this.tabPage3.Controls.Add(this.label12); + 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, 365); + this.tabPage3.TabIndex = 2; + this.tabPage3.Text = "Rozkłady"; + this.tabPage3.UseVisualStyleBackColor = true; + // + // label14 + // + this.label14.AutoSize = true; + this.label14.Location = new System.Drawing.Point(6, 197); + 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)."; + // + // label13 + // + this.label13.AutoSize = true; + this.label13.Location = new System.Drawing.Point(6, 175); + 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)"; + // + // lWczytywane + // + 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(192, 99); + this.lWczytywane.Name = "lWczytywane"; + this.lWczytywane.Size = new System.Drawing.Size(139, 13); + this.lWczytywane.TabIndex = 3; + this.lWczytywane.Text = "Wczytywane rozkłady: "; + // + // label12 + // + this.label12.AutoSize = true; + this.label12.Location = new System.Drawing.Point(6, 36); + 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..."; + // + // label11 + // + 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\"."; + // + // bLoadHands + // + this.bLoadHands.Location = new System.Drawing.Point(26, 84); + 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.Click += new System.EventHandler(this.bLoadHands_Click); + // + // timer + // + this.timer.Tick += new System.EventHandler(this.timer_Tick); + // + // openPBN + // + this.openPBN.Filter = "PBN|*.pbn"; + // + // MainForm + // + this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.ClientSize = new System.Drawing.Size(577, 502); + 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.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.tabPage2.ResumeLayout(false); + this.tabPage2.PerformLayout(); + this.tabPage3.ResumeLayout(false); + this.tabPage3.PerformLayout(); + this.ResumeLayout(false); + this.PerformLayout(); + + } + + #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; + private System.Windows.Forms.ToolStripStatusLabel status3; + private System.Windows.Forms.GroupBox groupBox1; + private System.Windows.Forms.TabControl tabControl1; + private System.Windows.Forms.TabPage tabPage1; + public System.Windows.Forms.TextBox xPINcode; + private System.Windows.Forms.Label label2; + public System.Windows.Forms.CheckBox xAutoShutDownBPC; + public System.Windows.Forms.CheckBox xIntermediateResults; + public System.Windows.Forms.CheckBox xBoardOrderVerification; + public System.Windows.Forms.CheckBox xMemberNumbersNoBlankEntry; + public System.Windows.Forms.CheckBox xMemberNumbers; + public System.Windows.Forms.CheckBox xLeadCard; + public System.Windows.Forms.CheckBox xShowContract; + public System.Windows.Forms.CheckBox xShowPairNumbers; + public System.Windows.Forms.CheckBox xGroupSections; + public System.Windows.Forms.CheckBox xShowPercentage; + public System.Windows.Forms.CheckBox xRepeatResults; + 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; + public System.Windows.Forms.CheckBox xAutoShowScoreRecap; + public System.Windows.Forms.CheckBox xScoreRecap; + 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; + private System.Windows.Forms.Label lSections; + 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; + } +} + diff --git a/Aktywator/MainForm.cs b/Aktywator/MainForm.cs new file mode 100644 index 0000000..c009750 --- /dev/null +++ b/Aktywator/MainForm.cs @@ -0,0 +1,290 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Data; +using System.Drawing; +using System.Text; +using System.Windows.Forms; +using System.Data.OleDb; + +namespace Aktywator +{ + public partial class MainForm : Form + { + public string version = "1.0.4"; + public string date = "12.04.2013"; + + private Bws bws; + private Tournament tournament; + + public MainForm() + { + InitializeComponent(); + } + + private void MainForm_Load(object sender, EventArgs e) + { + if (MySQL.getPass() == "") (new MysqlSettings()).ShowDialog(); + } + + private void MainForm_Shown(object sender, EventArgs e) + { + status2.Text = "Wersja " + this.version; + status3.Text = "Data: " + this.date; + + string filename; + string[] args = Environment.GetCommandLineArgs(); + if (args.Length > 1) + filename = args[1]; + else if (open.ShowDialog() == DialogResult.OK) + filename = open.FileName; + else + { + Close(); + return; + } + + 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(); + + labelFilename.Text = filename; + bws.initSettings(); + bws.loadSettings(); + this.WindowState = FormWindowState.Normal; + } + + private void bLaunch_Click(object sender, EventArgs e) + { + if (trySave()) + { + int max = 0; + int.TryParse(bws.sql.selectOne("SELECT max(ID) FROM Clients;"), out max); + try + { + bws.sql.query("INSERT INTO Clients (ID,Computer) VALUES (" + (max + 1) + ",'" + Environment.MachineName + "');"); + } + catch (OleDbException) + { + } + string id = bws.sql.selectOne("SELECT ID FROM Clients WHERE Computer='" + Environment.MachineName + "';"); + if (id.Length == 0) id = "0"; + bws.sql.query("UPDATE Tables SET ComputerID=" + id); + + try + { + bws.runBCS(); + } + catch (Exception) + { + MessageBox.Show("Nie znalazłem BCS (BMPro) :(", "Nie znaleziono BCS", MessageBoxButtons.OK, MessageBoxIcon.Error); + } + } + } + + private void MainForm_FormClosed(object sender, FormClosedEventArgs e) + { + if (bws != null) + bws.sql.close(); + } + + private void konwertujuzupelnijBrakiToolStripMenuItem_Click(object sender, EventArgs e) + { + bws.convert(); + MessageBox.Show("Zrobione! Ew. brakujące tabele i pola zostały dodane.", "Konwersja do BM2"); + } + + private void updateUstawieńWSerwerkuWTrakcieSesjiToolStripMenuItem_Click(object sender, EventArgs e) + { + if (trySave()) + { + bws.updateSettings(); + MessageBox.Show("Wykonano!", "Settings update", MessageBoxButtons.OK, MessageBoxIcon.Information); + } + } + + private bool trySave() + { + bool blad = false; + if (xPINcode.Text.Length != 4) blad = true; + else + for (int i = 0; i < xPINcode.Text.Length; i++) + if ((xPINcode.Text[i] < '0') || (xPINcode.Text[i] > '9')) blad = true; + if (blad) + { + MessageBox.Show("PIN musi składać się z 4 cyfr.", "Błędny PIN", MessageBoxButtons.OK, MessageBoxIcon.Stop); + xPINcode.Focus(); + return false; + } + else + { + bws.saveSettings(); + return true; + } + } + + private void bSave_Click(object sender, EventArgs e) + { + trySave(); + } + + private void bLoad_Click(object sender, EventArgs e) + { + bws.loadSettings(); + } + + private void xShowResults_CheckedChanged(object sender, EventArgs e) + { + if (xShowResults.Checked) + { + xRepeatResults.Enabled = true; + xShowPercentage.Enabled = true; + xResultsOverview.Enabled = true; + } + else + { + xRepeatResults.Enabled = false; + xShowPercentage.Enabled = false; + xResultsOverview.Enabled = false; + } + } + + private void xMemberNumbers_CheckedChanged(object sender, EventArgs e) + { + if (xMemberNumbers.Checked) + { + xMemberNumbersNoBlankEntry.Enabled = true; + } + else + { + xMemberNumbersNoBlankEntry.Enabled = false; + } + } + + private void bTournament_Click(object sender, EventArgs e) + { + 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) + { + lSkok.Visible = true; + lNazwyTeamow.Visible = true; + } + else + { + lSkok.Visible = false; + lNazwyTeamow.Visible = false; + } + } + } + catch (Exception ee) + { + MessageBox.Show(ee.Message, "Błąd", MessageBoxButtons.OK, MessageBoxIcon.Stop); + } + } + + private void bSync_Click(object sender, EventArgs e) + { + try + { + bws.syncNames(tournament, true, eOomRounds.Text); + } + catch (Exception ee) + { + MessageBox.Show(ee.Message, "Błąd", MessageBoxButtons.OK, MessageBoxIcon.Stop); + } + } + + private void bMysqlSettings_Click(object sender, EventArgs e) + { + (new MysqlSettings()).ShowDialog(); + } + + private void bTruncate_Click(object sender, EventArgs e) + { + try + { + bws.sql.query("UPDATE PlayerNumbers SET Name='XXX' AND Updated=True WHERE 1=1"); + MessageBox.Show("Wykonano!", "Usuń nazwiska", MessageBoxButtons.OK, MessageBoxIcon.Information); + } + catch (Exception ee) + { + MessageBox.Show(ee.Message, "Błąd", MessageBoxButtons.OK, MessageBoxIcon.Stop); + } + } + + private void bAutoSync_Click(object sender, EventArgs e) + { + if (!timer.Enabled) + { + int interval; + if ((!int.TryParse(eInterval.Text, out interval)) || (interval < 15)) + { + eInterval.Focus(); + return; + } + timer.Interval = interval * 1000; + eInterval.Enabled = false; + bAutoSync.Text = "pracuje się..."; + bTournament.Enabled = false; + bMysqlSettings.Enabled = false; + timer.Enabled = true; + } + else + { + timer.Enabled = false; + bAutoSync.Text = "Synchronizuj cyklicznie"; + eInterval.Enabled = true; + bTournament.Enabled = true; + bMysqlSettings.Enabled = true; + } + } + + private void timer_Tick(object sender, EventArgs e) + { + bws.syncNames(tournament, false, eOomRounds.Text); + } + + private void bForceSync_Click(object sender, EventArgs e) + { + bws.sql.query("UPDATE PlayerNumbers SET Updated=True"); + MessageBox.Show("Wykonano!", "Force sync", MessageBoxButtons.OK, MessageBoxIcon.Information); + } + + private void bLoadHands_Click(object sender, EventArgs e) + { + if (openPBN.ShowDialog() != System.Windows.Forms.DialogResult.Cancel) + { + try + { + PBN pbn = new PBN(openPBN.FileName, bws.lowBoard(), bws.highBoard()); + bws.loadHandRecords(pbn); + MessageBox.Show("Wczytanych rozkładów: " + pbn.count, "Rozkłady wczytane!", MessageBoxButtons.OK, MessageBoxIcon.Information); + } + catch (Exception ex) + { + MessageBox.Show(ex.Message, "Błąd wczytywania rozkładów", MessageBoxButtons.OK, MessageBoxIcon.Error); + } + } + } + } +} diff --git a/Aktywator/MainForm.resx b/Aktywator/MainForm.resx new file mode 100644 index 0000000..eb1dcd5 --- /dev/null +++ b/Aktywator/MainForm.resx @@ -0,0 +1,305 @@ +<?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> + <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="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="$this.TrayHeight" type="System.Int32, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> + <value>43</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 + AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA + AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA + AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA + AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA + AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAAAAgAAAAQAAAAGAAAACAAAAAkAAAAJAAAACAAA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/b1P/AAAAAP9vU/+AAAAB/29T/+AAAAf/b1P/+AAAH/9vU//+AAB//29T///AA/// + b1M= +</value> + </data> +</root>
\ No newline at end of file diff --git a/Aktywator/MySQL.cs b/Aktywator/MySQL.cs new file mode 100644 index 0000000..29b90b5 --- /dev/null +++ b/Aktywator/MySQL.cs @@ -0,0 +1,90 @@ +using System; +using System.Collections.Generic; +using System.Text; +using MySql.Data.MySqlClient; +using data = MySql.Data.MySqlClient.MySqlDataReader; + +namespace Aktywator +{ + public class MySQL + { + private MySqlConnection conn; + private string database; + + public MySQL(string database) + { + this.database = database; + connect(); + } + + public void connect() + { + conn = new MySqlConnection((database != "" ? ("Database=" + database + ";") : "") + + "Data Source=" + getHost() + ";User Id=" + getUser() + ";Password=" + getPass() + + ";Port=" + getPort() + ";charset=utf8;"); + + conn.Open(); + } + + public void close() + { + try + { + conn.Close(); + conn = null; + } + catch (Exception) + { + } + } + + public bool isOpen() + { + return conn != null; + } + + public void query(string query) + { + MySqlCommand comm = new MySqlCommand(query, conn); + comm.ExecuteNonQuery(); + } + + public string selectOne(string query) + { + MySqlCommand comm = new MySqlCommand(query, conn); + object ob = comm.ExecuteScalar(); + if (ob != null) return ob.ToString(); + else return ""; + } + + public data select(string query) + { + MySqlCommand comm = new MySqlCommand(query, conn); + return comm.ExecuteReader(); + } + + public static string test() + { + try + { + MySqlConnection conn = new MySqlConnection("Data Source=" + getHost() + ";User Id=" + getUser() + ";Password=" + getPass() + + ";Port=" + getPort() + ";charset=utf8;"); + conn.Open(); + } + catch (MySqlException e) + { + return e.Message; + } + catch (Exception e) + { + return "Prawdopodobnie brakuje Ci dll-ki od MySQL'a.\n\n" + e.Message; + } + return ""; + } + + public static string getHost() { return Properties.Settings.Default.HOST; } + 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; } + } +} diff --git a/Aktywator/MysqlSettings.Designer.cs b/Aktywator/MysqlSettings.Designer.cs new file mode 100644 index 0000000..70b308a --- /dev/null +++ b/Aktywator/MysqlSettings.Designer.cs @@ -0,0 +1,107 @@ +namespace Aktywator +{ + partial class MysqlSettings + { + /// <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() + { + System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(MysqlSettings)); + this.eHost = new System.Windows.Forms.TextBox(); + this.eUser = new System.Windows.Forms.TextBox(); + this.ePass = new System.Windows.Forms.TextBox(); + this.ePort = new System.Windows.Forms.TextBox(); + this.bOk = new System.Windows.Forms.Button(); + this.SuspendLayout(); + // + // eHost + // + this.eHost.Location = new System.Drawing.Point(12, 12); + this.eHost.Name = "eHost"; + this.eHost.Size = new System.Drawing.Size(100, 20); + this.eHost.TabIndex = 0; + // + // eUser + // + this.eUser.Location = new System.Drawing.Point(12, 38); + this.eUser.Name = "eUser"; + this.eUser.Size = new System.Drawing.Size(100, 20); + this.eUser.TabIndex = 1; + // + // ePass + // + this.ePass.Location = new System.Drawing.Point(12, 64); + this.ePass.Name = "ePass"; + this.ePass.PasswordChar = '*'; + this.ePass.Size = new System.Drawing.Size(100, 20); + this.ePass.TabIndex = 2; + // + // ePort + // + this.ePort.Location = new System.Drawing.Point(12, 90); + this.ePort.Name = "ePort"; + this.ePort.Size = new System.Drawing.Size(100, 20); + this.ePort.TabIndex = 3; + // + // bOk + // + this.bOk.Location = new System.Drawing.Point(12, 116); + this.bOk.Name = "bOk"; + this.bOk.Size = new System.Drawing.Size(100, 23); + this.bOk.TabIndex = 4; + this.bOk.Text = "OK"; + this.bOk.UseVisualStyleBackColor = true; + this.bOk.Click += new System.EventHandler(this.button1_Click); + // + // MysqlSettings + // + this.AcceptButton = this.bOk; + this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.ClientSize = new System.Drawing.Size(124, 147); + this.Controls.Add(this.bOk); + this.Controls.Add(this.ePort); + this.Controls.Add(this.ePass); + this.Controls.Add(this.eUser); + this.Controls.Add(this.eHost); + this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedToolWindow; + this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon"))); + this.Name = "MysqlSettings"; + this.Text = "Ustawienia MySQL"; + this.Load += new System.EventHandler(this.MysqlSettings_Load); + this.ResumeLayout(false); + this.PerformLayout(); + + } + + #endregion + + private System.Windows.Forms.TextBox eHost; + private System.Windows.Forms.TextBox eUser; + private System.Windows.Forms.TextBox ePass; + private System.Windows.Forms.TextBox ePort; + private System.Windows.Forms.Button bOk; + } +}
\ No newline at end of file diff --git a/Aktywator/MysqlSettings.cs b/Aktywator/MysqlSettings.cs new file mode 100644 index 0000000..df2fb15 --- /dev/null +++ b/Aktywator/MysqlSettings.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 MysqlSettings : Form + { + public MysqlSettings() + { + InitializeComponent(); + } + + private void MysqlSettings_Load(object sender, EventArgs e) + { + eHost.Text = Properties.Settings.Default.HOST; + eUser.Text = Properties.Settings.Default.USER; + ePass.Text = Properties.Settings.Default.PASS; + ePort.Text = Properties.Settings.Default.PORT; + } + + private void button1_Click(object sender, EventArgs e) + { + Properties.Settings.Default.HOST = eHost.Text; + 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); + } + } +} diff --git a/Aktywator/MysqlSettings.resx b/Aktywator/MysqlSettings.resx new file mode 100644 index 0000000..d8d4062 --- /dev/null +++ b/Aktywator/MysqlSettings.resx @@ -0,0 +1,287 @@ +<?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> + <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 + AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA + AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA + AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA + AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA + AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAAAAgAAAAQAAAAGAAAACAAAAAkAAAAJAAAACAAA + AAYAAAAEAAAAAgAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA + AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA + AAAAAAAAAAAAAAAAAAAAAAAA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ycnJ9n5+frsDAwNPa2trs3d3d+tzc3P7Z2dn4zs7O6bGx + sdCLi4usYGBgeykpKT8AAAASAAAABwAAAAIAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA + AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA + AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAAAAwAAAAYAAAAJAAAADAAA + AA0AAAANAAAADAAAAAkAAAAGAAAAAwAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA + AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD///////9vU///wAP//29T//4AAH// + b1P/+AAAH/9vU//gAAAH/29T/8AAAAP/b1P/AAAAAP9vU/4AAAAAf29T/AAAAAA/b1P4AAAAAB9vU/AA + AAAAD29T8AAAAAAPb1PgAAAAAAdvU+AAAAAAB29TwAAAAAADb1PAAAAAAANvU4AAAAAAAW9TgAAAAAAB + b1OAAAAAAAFvUwAAAAAAAG9TAAAAAAAAb1MAAAAAAABvUwAAAAAAAG9TAAAAAAAAb1MAAAAAAABvUwAA + AAAAAG9TAAAAAAAAb1MAAAAAAABvUwAAAAAAAG9TAAAAAAAAb1OAAAAAAAFvU4AAAAAAAW9TgAAAAAAB + b1PAAAAAAANvU8AAAAAAA29TwAAAAAADb1PgAAAAAAdvU/AAAAAAD29T8AAAAAAPb1P4AAAAAB9vU/wA + AAAAP29T/gAAAAB/b1P/AAAAAP9vU/+AAAAB/29T/+AAAAf/b1P/+AAAH/9vU//+AAB//29T///AA/// + b1M= +</value> + </data> +</root>
\ No newline at end of file diff --git a/Aktywator/PBN.cs b/Aktywator/PBN.cs new file mode 100644 index 0000000..ad7ac99 --- /dev/null +++ b/Aktywator/PBN.cs @@ -0,0 +1,52 @@ +using System; +using System.Collections.Generic; +using System.Text; +using System.IO; + +namespace Aktywator +{ + class PBN + { + public HandRecord[] handRecords; + protected int lowBoard; + protected int highBoard; + private int _count; + public int count + { + get { return _count; } + } + + public PBN(string filename, int lowBoard, int highBoard) + { + this.handRecords = new HandRecord[highBoard + 1]; + + StreamReader f = new StreamReader(new FileStream(filename, FileMode.Open, FileAccess.Read, FileShare.Read)); + try + { + int board = lowBoard; + bool canBeRead = false; + _count = 0; + while (!f.EndOfStream && (board <= highBoard)) + { + string line = f.ReadLine(); + if (line.Trim() == "[Board \"" + board + "\"]") + canBeRead = true; + else if (canBeRead && (line.Substring(0, 6) == "[Deal ")) + { + line = line.Substring(line.IndexOf(':') + 1); + line = line.Substring(0, line.IndexOf('"')); + handRecords[board] = new HandRecord(line); + canBeRead = false; + _count++; + board++; + } + } + } + finally + { + f.Close(); + } + } + + } +} diff --git a/Aktywator/Program.cs b/Aktywator/Program.cs new file mode 100644 index 0000000..19254ef --- /dev/null +++ b/Aktywator/Program.cs @@ -0,0 +1,20 @@ +using System; +using System.Collections.Generic; +using System.Windows.Forms; + +namespace Aktywator +{ + static class Program + { + /// <summary> + /// The main entry point for the application. + /// </summary> + [STAThread] + static void Main() + { + Application.EnableVisualStyles(); + Application.SetCompatibleTextRenderingDefault(false); + Application.Run(new MainForm()); + } + } +} diff --git a/Aktywator/Properties/AssemblyInfo.cs b/Aktywator/Properties/AssemblyInfo.cs new file mode 100644 index 0000000..6805b75 --- /dev/null +++ b/Aktywator/Properties/AssemblyInfo.cs @@ -0,0 +1,36 @@ +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +// General Information about an assembly is controlled through the following +// set of attributes. Change these attribute values to modify the information +// associated with an assembly. +[assembly: AssemblyTitle("Aktywator")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("Michał Zimniewicz")] +[assembly: AssemblyProduct("Aktywator")] +[assembly: AssemblyCopyright("Copyright © 2011 Michał Zimniewicz")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// Setting ComVisible to false makes the types in this assembly not visible +// to COM components. If you need to access a type in this assembly from +// COM, set the ComVisible attribute to true on that type. +[assembly: ComVisible(false)] + +// The following GUID is for the ID of the typelib if this project is exposed to COM +[assembly: Guid("d61cd1fc-8460-4068-bd50-338840f75a5e")] + +// Version information for an assembly consists of the following four values: +// +// Major Version +// Minor Version +// Build Number +// Revision +// +// 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.0.0")] +[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/Aktywator/Properties/Resources.Designer.cs b/Aktywator/Properties/Resources.Designer.cs new file mode 100644 index 0000000..927703d --- /dev/null +++ b/Aktywator/Properties/Resources.Designer.cs @@ -0,0 +1,71 @@ +//------------------------------------------------------------------------------ +// <auto-generated> +// This code was generated by a tool. +// Runtime Version:4.0.30319.1 +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// </auto-generated> +//------------------------------------------------------------------------------ + +namespace Aktywator.Properties +{ + + + /// <summary> + /// A strongly-typed resource class, for looking up localized strings, etc. + /// </summary> + // This class was auto-generated by the StronglyTypedResourceBuilder + // class via a tool like ResGen or Visual Studio. + // To add or remove a member, edit your .ResX file then rerun ResGen + // with the /str option, or rebuild your VS project. + [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 + { + + 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() + { + } + + /// <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)) + { + 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 + { + return resourceCulture; + } + set + { + resourceCulture = value; + } + } + } +} diff --git a/Aktywator/Properties/Resources.resx b/Aktywator/Properties/Resources.resx new file mode 100644 index 0000000..af7dbeb --- /dev/null +++ b/Aktywator/Properties/Resources.resx @@ -0,0 +1,117 @@ +<?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.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: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" type="xsd:string" /> + <xsd:attribute name="type" type="xsd:string" /> + <xsd:attribute name="mimetype" type="xsd:string" /> + </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" msdata:Ordinal="1" /> + <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" /> + <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" /> + </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/Properties/Settings.Designer.cs b/Aktywator/Properties/Settings.Designer.cs new file mode 100644 index 0000000..b099227 --- /dev/null +++ b/Aktywator/Properties/Settings.Designer.cs @@ -0,0 +1,74 @@ +//------------------------------------------------------------------------------ +// <auto-generated> +// This code was generated by a tool. +// Runtime Version:4.0.30319.225 +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// </auto-generated> +//------------------------------------------------------------------------------ + +namespace Aktywator.Properties { + + + [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "10.0.0.0")] + internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase { + + private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings()))); + + public static Settings Default { + get { + return defaultInstance; + } + } + + [global::System.Configuration.UserScopedSettingAttribute()] + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.Configuration.DefaultSettingValueAttribute("localhost")] + public string HOST { + get { + return ((string)(this["HOST"])); + } + set { + this["HOST"] = value; + } + } + + [global::System.Configuration.UserScopedSettingAttribute()] + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.Configuration.DefaultSettingValueAttribute("root")] + public string USER { + get { + return ((string)(this["USER"])); + } + set { + this["USER"] = value; + } + } + + [global::System.Configuration.UserScopedSettingAttribute()] + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.Configuration.DefaultSettingValueAttribute("")] + public string PASS { + get { + return ((string)(this["PASS"])); + } + set { + this["PASS"] = value; + } + } + + [global::System.Configuration.UserScopedSettingAttribute()] + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.Configuration.DefaultSettingValueAttribute("3306")] + public string PORT { + get { + return ((string)(this["PORT"])); + } + set { + this["PORT"] = value; + } + } + } +} diff --git a/Aktywator/Properties/Settings.settings b/Aktywator/Properties/Settings.settings new file mode 100644 index 0000000..76a000d --- /dev/null +++ b/Aktywator/Properties/Settings.settings @@ -0,0 +1,18 @@ +<?xml version='1.0' encoding='utf-8'?> +<SettingsFile xmlns="http://schemas.microsoft.com/VisualStudio/2004/01/settings" CurrentProfile="(Default)" GeneratedClassNamespace="Aktywator.Properties" GeneratedClassName="Settings"> + <Profiles /> + <Settings> + <Setting Name="HOST" Type="System.String" Scope="User"> + <Value Profile="(Default)">localhost</Value> + </Setting> + <Setting Name="USER" Type="System.String" Scope="User"> + <Value Profile="(Default)">root</Value> + </Setting> + <Setting Name="PASS" Type="System.String" Scope="User"> + <Value Profile="(Default)" /> + </Setting> + <Setting Name="PORT" Type="System.String" Scope="User"> + <Value Profile="(Default)">3306</Value> + </Setting> + </Settings> +</SettingsFile>
\ No newline at end of file diff --git a/Aktywator/Setting.cs b/Aktywator/Setting.cs new file mode 100644 index 0000000..45d6b58 --- /dev/null +++ b/Aktywator/Setting.cs @@ -0,0 +1,135 @@ +using System; +using System.Collections.Generic; +using System.Text; +using System.Windows.Forms; +using System.Data.OleDb; + +namespace Aktywator +{ + class Setting + { + public string name; + public string type; + public string defaultStr; + public string table; + public CheckBox field; + private Bws bws; + + public Setting(string name, CheckBox field, Bws bws) + { + this.name = name; + this.field = field; + this.bws = bws; + } + + public void load() + { + StringBuilder str = new StringBuilder(); + str.Append("SELECT "); + str.Append(this.name); + str.Append(" FROM Settings"); + 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) + { + StringBuilder str = new StringBuilder(); + str.Append("SELECT "); + str.Append(name); + str.Append(" FROM Settings"); + try + { + return bws.sql.selectOne(str.ToString()); + } + catch (OleDbException) + { + if (errors.Length > 0) errors.Append(", "); + errors.Append(name); + return ""; + } + } + + public void save() + { + StringBuilder str = new StringBuilder(); + str.Append("UPDATE Settings SET "); + str.Append(this.name); + if (field.Checked) str.Append("=true"); + else str.Append("=false"); + bws.sql.query(str.ToString()); + } + + public static void save(string name, string value, Bws bws, StringBuilder errors) + { + StringBuilder str = new StringBuilder(); + str.Append("UPDATE Settings SET "); + str.Append(name); + str.Append("="); + str.Append(value); + try + { + bws.sql.query(str.ToString()); + } + catch (OleDbException) + { + if (errors.Length > 0) errors.Append(", "); + errors.Append(name); + } + } + + public Setting(string name, string type) + { + this.name = name; + this.type = type; + this.defaultStr = ""; + this.table = "Settings"; + } + + public Setting(string name, string type, string defaultStr) + { + this.name = name; + this.type = type; + this.defaultStr = defaultStr; + this.table = "Settings"; + } + + public Setting(string name, string type, string defaultStr, string table) + { + this.name = name; + this.type = type; + this.defaultStr = defaultStr; + this.table = table; + } + + public string getAddColumnSql() + { + StringBuilder str = new StringBuilder(); + str.Append("ALTER TABLE "); + str.Append(this.table); + str.Append(" ADD COLUMN "); + str.Append(this.name); + str.Append(" "); + str.Append(this.type); + str.Append(";"); + return str.ToString(); + } + + public string getSetDefaultSql() + { + StringBuilder str = new StringBuilder(); + if (defaultStr.Length > 0) + { + str.Append("UPDATE "); + str.Append(this.table); + str.Append(" SET "); + str.Append(this.name); + str.Append("="); + str.Append(this.defaultStr); + str.Append(";"); + } + return str.ToString(); + } + } +} diff --git a/Aktywator/Settings.cs b/Aktywator/Settings.cs new file mode 100644 index 0000000..883385a --- /dev/null +++ b/Aktywator/Settings.cs @@ -0,0 +1,28 @@ +namespace Aktywator.Properties { + + + // This class allows you to handle specific events on the settings class: + // The SettingChanging event is raised before a setting's value is changed. + // The PropertyChanged event is raised after a setting's value is changed. + // The SettingsLoaded event is raised after the setting values are loaded. + // The SettingsSaving event is raised before the setting values are saved. + internal sealed partial class Settings { + + public Settings() { + // // To add event handlers for saving and changing settings, uncomment the lines below: + // + // this.SettingChanging += this.SettingChangingEventHandler; + // + // this.SettingsSaving += this.SettingsSavingEventHandler; + // + } + + private void SettingChangingEventHandler(object sender, System.Configuration.SettingChangingEventArgs e) { + // Add code to handle the SettingChangingEvent event here. + } + + private void SettingsSavingEventHandler(object sender, System.ComponentModel.CancelEventArgs e) { + // Add code to handle the SettingsSaving event here. + } + } +} diff --git a/Aktywator/Sql.cs b/Aktywator/Sql.cs new file mode 100644 index 0000000..c35b0dd --- /dev/null +++ b/Aktywator/Sql.cs @@ -0,0 +1,76 @@ +using System; +using System.Collections.Generic; +using System.Text; + +using System.Data.OleDb; +using data = System.Data.OleDb.OleDbDataReader; + +namespace Aktywator +{ + class Sql + { + private OleDbConnection connection; + + public Sql(string filename) + { + string connStr = "Provider=Microsoft.Jet.OLEDB.4.0;Persist Security Info=False;Data Source=" + filename + ";"; + connection = new OleDbConnection(connStr); + connection.Open(); + } + + public void close() + { + connection.Close(); + } + + public bool isOpen() + { + if (connection == null) return false; + else return connection.State == System.Data.ConnectionState.Open; + } + + public int query(string q) + { + OleDbCommand cmd = new OleDbCommand(q, connection); + return cmd.ExecuteNonQuery(); + } + public string selectOne(string q) + { + OleDbCommand cmd = new OleDbCommand(q, connection); + object o = cmd.ExecuteScalar(); + if (o == null) return ""; + else return o.ToString(); + } + public data select(string q) + { + OleDbCommand cmd = new OleDbCommand(q, connection); + return cmd.ExecuteReader(); + } + + public bool checkTableExists(string tableName) + { + try + { + selectOne("select count(*) from " + tableName); + } + catch (OleDbException) + { + return false; + } + return true; + } + + public bool checkFieldExists(string tableName, string fieldName) + { + try + { + selectOne("select " + fieldName + " from " + tableName); + } + catch (OleDbException) + { + return false; + } + return true; + } + } +} diff --git a/Aktywator/Tournament.cs b/Aktywator/Tournament.cs new file mode 100644 index 0000000..b46740b --- /dev/null +++ b/Aktywator/Tournament.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 Tournament + { + private string _name; + public string name + { + get { return _name; } + } + + private int _type; // 0-unknown, 1-Pary, 2-Teamy + public int type + { + get { return _type; } + } + + public MySQL mysql; + + public Tournament(string name) + { + this._name = name; + mysql = new MySQL(name); + recognizeType(); + } + + private void recognizeType() + { + 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; + } + + public override string ToString() + { + return this.name + " [" + (this.type == 1 ? 'P' : 'T') + "]"; + } + + public static List<Tournament> getTournaments() + { + List<Tournament> list = new List<Tournament>(); + MySQL c = new MySQL(""); + data dbs = c.select("SHOW DATABASES;"); + while (dbs.Read()) + { + Tournament t = new Tournament(dbs.GetString(0)); + if (t.type > 0) + list.Add(t); + t.mysql.close(); + } + return list; + } + + public string getSectionsNum() + { + if (type == 1) + return mysql.selectOne("SELECT COUNT(DISTINCT seknum) FROM sektory;"); + else + return "1"; + } + + public string getTablesNum() + { + if (type == 1) + return mysql.selectOne("SELECT COUNT(*) FROM sektory;"); + else + return mysql.selectOne("SELECT teamcnt FROM admin;"); + } + + } +} diff --git a/Aktywator/aktywator.ico b/Aktywator/aktywator.ico Binary files differnew file mode 100644 index 0000000..695e415 --- /dev/null +++ b/Aktywator/aktywator.ico diff --git a/Aktywator/app.config b/Aktywator/app.config new file mode 100644 index 0000000..7473011 --- /dev/null +++ b/Aktywator/app.config @@ -0,0 +1,24 @@ +<?xml version="1.0" encoding="utf-8" ?> +<configuration> + <configSections> + <sectionGroup name="userSettings" type="System.Configuration.UserSettingsGroup, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" > + <section name="Aktywator.Properties.Settings" type="System.Configuration.ClientSettingsSection, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" allowExeDefinition="MachineToLocalUser" requirePermission="false" /> + </sectionGroup> + </configSections> + <userSettings> + <Aktywator.Properties.Settings> + <setting name="HOST" serializeAs="String"> + <value>localhost</value> + </setting> + <setting name="USER" serializeAs="String"> + <value>root</value> + </setting> + <setting name="PASS" serializeAs="String"> + <value /> + </setting> + <setting name="PORT" serializeAs="String"> + <value>3306</value> + </setting> + </Aktywator.Properties.Settings> + </userSettings> +</configuration>
\ No newline at end of file |