Пример #1
0
 private void btnPhraseAdd_Click(object sender, EventArgs e)
 {
     using (var form = new PhraseEdit(mode.Add, ddlPhraseCategory.SelectedItem.ToString()))
     {
         panelPhrase.Visible = false;
         panelMask.Visible   = true;
         var result = form.ShowDialog();
         panelPhrase.Visible = true;
         panelMask.Visible   = false;
     }
     phraseLoadData();
 }
Пример #2
0
 private void btnPhraseModify_Click(object sender, EventArgs e)
 {
     if (this.dgvPhrase.SelectedRows.Count > 0)
     {
         DataGridViewRow row = this.dgvPhrase.SelectedRows[0];
         using (var form = new PhraseEdit(mode.Edit, ddlPhraseCategory.SelectedItem.ToString(), row.Cells["dgvPhrase_Serno"].Value.ToString()))
         {
             panelPhrase.Visible = false;
             panelMask.Visible   = true;
             var result = form.ShowDialog();
             panelPhrase.Visible = true;
             panelMask.Visible   = false;
         }
         phraseLoadData();
     }
 }
Пример #3
0
        private void dgvPhrase_CellDoubleClick(object sender, DataGridViewCellEventArgs e)
        {
            if (e.RowIndex == -1)
            {
                return;
            }
            DataGridViewRow row = this.dgvPhrase.SelectedRows[0];

            using (var form = new PhraseEdit(mode.View, ddlPhraseCategory.SelectedItem.ToString(), row.Cells["dgvPhrase_Serno"].Value.ToString()))
            {
                panelPhrase.Visible = false;
                panelMask.Visible   = true;
                var result = form.ShowDialog();
                panelPhrase.Visible = true;
                panelMask.Visible   = false;
            }
        }