Esempio n. 1
0
 private void EditSelectedButton_Click(object sender, EventArgs e)
 {
     if (dataGridView1.CurrentCell != null)
     {
         using (CreateKeyForm CK = new CreateKeyForm(Create_Name_List(), dataGridView1[0, dataGridView1.CurrentCell.RowIndex].Value.ToString(), dataGridView1[1, dataGridView1.CurrentCell.RowIndex].Value.ToString(), dataGridView1[2, dataGridView1.CurrentCell.RowIndex].Value.ToString(), dataGridView1[3, dataGridView1.CurrentCell.RowIndex].Value.ToString(), GeneratorDictionary, FormTranslationDictionary?["CreateKeyForm"]))
         {
             if (CK.ShowDialog() == DialogResult.OK)
             {
                 dataGridView1[0, dataGridView1.CurrentCell.RowIndex].Value = CK.res.Name;
                 dataGridView1[1, dataGridView1.CurrentCell.RowIndex].Value = CK.res.Login;
                 dataGridView1[2, dataGridView1.CurrentCell.RowIndex].Value = CK.res.URL;
                 dataGridView1[3, dataGridView1.CurrentCell.RowIndex].Value = CK.res.Password;
                 DataChanged();
             }
         }
     }
 }
Esempio n. 2
0
        private void AddToTableButton_Click(object sender, EventArgs e)
        {
            using (CreateKeyForm CK = new CreateKeyForm(Create_Name_List(), GeneratorDictionary, FormTranslationDictionary?["CreateKeyForm"]))
            {
                if (CK.ShowDialog() == DialogResult.OK)
                {
                    dataGridView1.Rows.Add();



                    dataGridView1[0, dataGridView1.Rows.Count - 1].Value = CK.res.Name;
                    dataGridView1[1, dataGridView1.Rows.Count - 1].Value = CK.res.Login;
                    dataGridView1[2, dataGridView1.Rows.Count - 1].Value = CK.res.URL;
                    dataGridView1[3, dataGridView1.Rows.Count - 1].Value = CK.res.Password;
                    DataChanged();
                }
            }
        }