コード例 #1
0
ファイル: FormMain.cs プロジェクト: Tatranskymedved/OtomanSW
        /// <summary>
        /// Zobrazí dialogové okno pro přidání týmu
        /// </summary>
        private void mBtnAddNewTeam_Click(object sender, EventArgs e)
        {
            var          lNewTeamForm  = new FormNewEditTeam();
            DialogResult lDialogResult = lNewTeamForm.ShowDialog();

            if (lDialogResult.Equals(DialogResult.OK))
            {
                this.TableModelView.Add(lNewTeamForm.Team);
            }
        }
コード例 #2
0
        private void mTableMain_CellContentDoubleClick(object sender, DataGridViewCellEventArgs e)
        {
            var lSelectedTeam = this.mParentForm.TableModelView.Teams[e.RowIndex];

            var lEditTeamForm = new FormNewEditTeam(lSelectedTeam.Clone() as Team);

            DialogResult lDialogResult = lEditTeamForm.ShowDialog();

            if (lDialogResult.Equals(DialogResult.OK))
            {
                this.mParentForm.TableModelView.Edit(lEditTeamForm.Team, e.RowIndex);
            }
        }