public override void SetValue(KeyListenerConfig config) { //下拉框数据初始 this.comboBox1.SelectedIndexChanged -= this.comboBox1_SelectedIndexChanged; this.comboBox1.DataSource = Screen.AllScreens; this.comboBox1.SelectedItem = config.WatchScreen; this.comboBox1.SelectedIndexChanged += this.comboBox1_SelectedIndexChanged; //选定区域初始 this.SetArea(config); base.SetValue(config); }
private void SetArea(KeyListenerConfig config) { if (string.IsNullOrEmpty(config.AreaDesc)) { this.label3.Text = string.Empty; this.button2.Enabled = false; } else { this.label3.Text = string.Format("已设定区域:{0}", config.AreaDesc); this.button2.Enabled = true; } }
public override void SetValue(KeyListenerConfig config) { this.textBox1.Text = config.SavePath; base.SetValue(config); }
public virtual void SetValue(KeyListenerConfig config) { this.Config = config; }