Exemplo n.º 1
0
 private void addRowToolStripMenuItem_Click(object sender, EventArgs e)
 {
     if (lngFile == null) {
         MessageBox.Show("There must already be an opened language file!", "Error", MessageBoxButtons.OK, MessageBoxIcon.Stop);
         return;
     }
     DataTable DT = (DataTable)lngDataGridView.DataSource;
     AddRow AR = new AddRow(lngFile);
     if (AR.ShowDialog() == DialogResult.OK) {
         if (AR.Key == string.Empty) {
             return;
         }
         DataRow DR = DT.NewRow();
         DR[0] = AR.Key;
         DR[1] = AR.Value;
         DT.Rows.Add(DR);
         lngFile.Add(AR.Key, AR.Value);
     }
 }
Exemplo n.º 2
0
        private void addRowToolStripMenuItem_Click(object sender, EventArgs e)
        {
            if (lngFile == null)
            {
                MessageBox.Show("There must already be an opened language file!", "Error", MessageBoxButtons.OK, MessageBoxIcon.Stop);
                return;
            }
            DataTable DT = (DataTable)lngDataGridView.DataSource;
            AddRow    AR = new AddRow(lngFile);

            if (AR.ShowDialog() == DialogResult.OK)
            {
                if (AR.Key == string.Empty)
                {
                    return;
                }
                DataRow DR = DT.NewRow();
                DR[0] = AR.Key;
                DR[1] = AR.Value;
                DT.Rows.Add(DR);
                lngFile.Add(AR.Key, AR.Value);
            }
        }