Example #1
0
 private void btnEdit_Click(object sender, EventArgs e)
 {
     if (dgvFontList.SelectedRows.Count > 0)
     {
         AddNewFontToList anftl = new AddNewFontToList();
         anftl.FontName  = dgvFontList.SelectedRows[0].Cells[0].Value.ToString();
         anftl.GlyphName = dgvFontList.SelectedRows[0].Cells[1].Value.ToString();
         anftl.ShowDialog();
         dgvFontList.SelectedRows[0].Cells[0].Value = anftl.FontName;
         dgvFontList.SelectedRows[0].Cells[1].Value = anftl.GlyphName;
     }
 }
Example #2
0
        private void btnAdd_Click(object sender, EventArgs e)
        {
            AddNewFontToList anftl = new AddNewFontToList();

            anftl.ShowDialog();
            if (anftl.FontName != "")
            {
                string[] rowStr = { anftl.FontName,
                                    anftl.GlyphName };
                dgvFontList.Rows.Add(rowStr);
            }
        }