/// <summary>
        ///     ShardKey数据集变换时
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void cmbShardKeyCol_SelectedIndexChanged(object sender, EventArgs e)
        {
            var Col        = _prmSvr.GetDatabase(cmbShardKeyDB.Text).GetCollection(cmbShardKeyCol.Text);
            var columnList = MongoHelper.GetCollectionSchame(Col);

            UIAssistant.FillComberWithArray(cmbField, columnList.ToArray(), true);
        }
Esempio n. 2
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void frmServerMonitor_Load(object sender, EventArgs e)
        {
            //填充分组
            GuiConfig.Translateform(this);
            UIAssistant.FillComberWithArray(cmbCatalog, SystemStatus.GetCatalog().ToArray());
            //自定义分组
            cmbCatalog.Items.Add("Custom");

            cmbCatalog.SelectedIndex = 0;
            if (!GuiConfig.IsMono)
            {
                Icon = GetSystemIcon.ConvertImgToIcon(Resources.KeyInfo);
            }
            _mTime = new Timer {
                Interval = RefreshInterval * 1000
            };
            NumTimeInterval.Value = RefreshInterval;
            _mTime.Tick          += SetValue;
            SetValue(null, null);
            FormClosing += (x, y) => _mTime.Stop();
            _mTime.Start();
        }