Beispiel #1
0
        private void EditMenuItem_Click(object sender, EventArgs e)
        {
            var datagrid     = this.contextMenuStrip1.SourceControl;
            var selectedRows = ((DataGridView)datagrid).SelectedRows;

            if (selectedRows != null && selectedRows.Count > 0)
            {
                using (var form = new MatchForm())
                {
                    var light = (TemplateInfoLight)selectedRows[0].DataBoundItem;
                    DataAccess.SelectTemplate((DataAccess.TemplateInfoDb)light);
                    form.MatchTemplate = new TemplateInfo(light);
                    form.ShowDialog(this);
                }
            }
        }
Beispiel #2
0
 private void MatchMenuItem_Click(object sender, EventArgs e)
 {
     using (var form = new MatchForm())
         form.ShowDialog(this);
 }