Ejemplo n.º 1
0
        private void toolStripButton4_Click(object sender, EventArgs e)
        {
            if (openPairMultySession.ShowDialog() == DialogResult.OK)
            {
                string[] str = openPairMultySession.FileNames;

                if (str.Length > 0)
                {
                    KopsMultysession t = new KopsMultysession(str[0]);

                    /* add new tab for tournament */
                    TabPage tp = new TabPage(Path.GetFileNameWithoutExtension(str[0]));
                    tabControl1.TabPages.Add(tp);
                    SessionPrintouts control = new SessionPrintouts(t);
                    control.Parent = tp;
                    control.Dock   = DockStyle.Fill;
                }
            }
        }
Ejemplo n.º 2
0
        private void openPairTournamentToolStripMenuItem_Click(object sender, EventArgs e)
        {
            if (openPairTournament.ShowDialog() == DialogResult.OK)
            {
                string[] str = openPairTournament.FileNames;

                if (str.Length > 0)
                {
             /*       bwsfile = String.Format(@"{0}\{1}.bws", Path.GetDirectoryName(str[0]), Path.GetFileNameWithoutExtension(str[0]));
                    BwsHelper bws = new BwsHelper(bwsfile);

                    fBMSettings form = new fBMSettings(false);
                    if (form.ShowDialog() == DialogResult.OK)
                    {
                        bws.SetSettings(form.options);
                    }

                    if (str.Length > 1)
                    {
                        Dictionary<string,object> split = new Dictionary<string,object>();
                        split.Add("GroupSections", false);
                        bws.SetSettings(split);
                    }
            */
                    tournaments = new List<KopsTournament>();

                    foreach (string s in str)
                    {
                        KopsTournament t = new KopsTournament(s, new KopsReader());
                        tournaments.Add(t);
                        /* add new tab for tournament */
                        TabPage tp = new TabPage(Path.GetFileNameWithoutExtension(s));
                        tabControl1.TabPages.Add(tp);
                        SessionPrintouts control = new SessionPrintouts(t);
                        control.Parent = tp;
                        control.Dock = DockStyle.Fill;
                    }
                }
                if (tournaments.Count > 0)
                {
                    //filling grid width tournament data
             /*           BindingSource bSource = new BindingSource();
                    bSource.DataSource = tournaments[0].results.Tables["Fill"];
                    dataGridTourn1.DataSource = bSource;
                    dataGridTourn1.Width = (dataGridTourn1.ColumnCount) * 23 + 1;
                    dataGridTourn1.Height = (dataGridTourn1.RowCount) * 20 + 2;

                    for(int i = 0 ; i < dataGridTourn1.RowCount; i++) {
                        dataGridTourn1.Rows[i].Cells[0].Style.BackColor = Color.Blue;
                        dataGridTourn1.Rows[i].Cells[0].Style.ForeColor = Color.White;
                    }
                    for (int i = 0; i < dataGridTourn1.ColumnCount; i++)
                    {
                        dataGridTourn1.Rows[0].Cells[i].Style.BackColor = Color.Blue;
                        dataGridTourn1.Rows[0].Cells[i].Style.ForeColor = Color.White;
                    }
            */

                }
            }
        }
Ejemplo n.º 3
0
        private void toolStripButton4_Click(object sender, EventArgs e)
        {
            if (openPairMultySession.ShowDialog() == DialogResult.OK)
            {
                string[] str = openPairMultySession.FileNames;

                if (str.Length > 0)
                {
                    KopsMultysession t = new KopsMultysession(str[0]);

                    /* add new tab for tournament */
                    TabPage tp = new TabPage(Path.GetFileNameWithoutExtension(str[0]));
                    tabControl1.TabPages.Add(tp);
                    SessionPrintouts control = new SessionPrintouts(t);
                    control.Parent = tp;
                    control.Dock = DockStyle.Fill;
                }
            }
        }
Ejemplo n.º 4
0
        private void openPairTournamentToolStripMenuItem_Click(object sender, EventArgs e)
        {
            if (openPairTournament.ShowDialog() == DialogResult.OK)
            {
                string[] str = openPairTournament.FileNames;

                if (str.Length > 0)
                {
                    /*       bwsfile = String.Format(@"{0}\{1}.bws", Path.GetDirectoryName(str[0]), Path.GetFileNameWithoutExtension(str[0]));
                     *     BwsHelper bws = new BwsHelper(bwsfile);
                     *
                     *     fBMSettings form = new fBMSettings(false);
                     *     if (form.ShowDialog() == DialogResult.OK)
                     *     {
                     *         bws.SetSettings(form.options);
                     *     }
                     *
                     *     if (str.Length > 1)
                     *     {
                     *         Dictionary<string,object> split = new Dictionary<string,object>();
                     *         split.Add("GroupSections", false);
                     *         bws.SetSettings(split);
                     *     }
                     */
                    tournaments = new List <KopsTournament>();

                    foreach (string s in str)
                    {
                        KopsTournament t = new KopsTournament(s, new KopsReader());
                        tournaments.Add(t);
                        /* add new tab for tournament */
                        TabPage tp = new TabPage(Path.GetFileNameWithoutExtension(s));
                        tabControl1.TabPages.Add(tp);
                        SessionPrintouts control = new SessionPrintouts(t);
                        control.Parent = tp;
                        control.Dock   = DockStyle.Fill;
                    }
                }
                if (tournaments.Count > 0)
                {
                    //filling grid width tournament data

                    /*           BindingSource bSource = new BindingSource();
                     *         bSource.DataSource = tournaments[0].results.Tables["Fill"];
                     *         dataGridTourn1.DataSource = bSource;
                     *         dataGridTourn1.Width = (dataGridTourn1.ColumnCount) * 23 + 1;
                     *         dataGridTourn1.Height = (dataGridTourn1.RowCount) * 20 + 2;
                     *
                     *         for(int i = 0 ; i < dataGridTourn1.RowCount; i++) {
                     *             dataGridTourn1.Rows[i].Cells[0].Style.BackColor = Color.Blue;
                     *             dataGridTourn1.Rows[i].Cells[0].Style.ForeColor = Color.White;
                     *         }
                     *         for (int i = 0; i < dataGridTourn1.ColumnCount; i++)
                     *         {
                     *             dataGridTourn1.Rows[0].Cells[i].Style.BackColor = Color.Blue;
                     *             dataGridTourn1.Rows[0].Cells[i].Style.ForeColor = Color.White;
                     *         }
                     */
                }
            }
        }