Example #1
0
        private void btnQuery_Click(object sender, EventArgs e)
        {
            //检查输入
            if (string.IsNullOrWhiteSpace(txtKey.Text))
            {
                MessageBox.Show("请先输入查询的键和类型");
                return;
            }

            var input = txtKey.Text.Trim();

            ProcessingBox.Show(new Func <object[], object>(_readKeyTTL),
                               new object[] { _cluster, input, dvKeys },
                               (args) => {
                var dt              = args[0] as DataTable;
                dvKeys.DataSource   = dt;
                dvKeys.DoubleClick += DvKeys_DoubleClick;
                splitContainer.Invoke(() => { splitContainer.Visible = true; });
                foreach (Control ctrl in splitContainer.Panel2.Controls)
                {
                    splitContainer.Invoke(() => {
                        splitContainer.Panel2.Controls.Remove(ctrl);
                    });
                }
            });
        }
Example #2
0
        private void toolStripManagerBtn_Click(object sender, EventArgs e)
        {
            var frm = new FrmBookmark();

            if (frm.ShowDialog() == DialogResult.OK)
            {
                var strName = frm.SelectedConnectionName;
                var strConn = frm.SelectedConnectionStr;
                ProcessingBox.Show(new Func <object[], object>(_connect),
                                   new object[] { strName, strConn }, _connectCallback);
            }
        }
Example #3
0
        private void tvConnection_NodeMouseDoubleClick(object sender, TreeNodeMouseClickEventArgs e)
        {
            var tv = sender as TreeView;

            if (e.Node != tv.Nodes[0])
            {
                string key     = e.Node.Text;
                var    cluster = ConnectionManager.Connections[key];
                if (cluster != null)
                {
                    ProcessingBox.Show(new Func <object[], object>(_readCluster),
                                       new object[] { cluster },
                                       (arg) => {
                    });
                }
            }
        }