private void button1_Click(object sender, EventArgs e) { // 插入域 using (HashValueEditForm form = new HashValueEditForm(redisClient, this.stringKeyName, string.Empty, string.Empty)) { form.ShowDialog( ); } }
private RedisSettings redisClient = null; // 当前的连接 private void button2_Click(object sender, EventArgs e) { // 编辑域 if (dataGridView1.SelectedRows.Count > 0) { using (HashValueEditForm form = new HashValueEditForm(redisClient, this.stringKeyName, this.selectField, valueControl1.KeySourceValue( ))) { form.ShowDialog( ); } } else { MessageBox.Show("请先选择对应的域数据,然后再点击编辑"); } }