private void Settingfrm_ChgConfirmEvent(OneListSetting obj) { CardSettingManager.ChangeValue(selectname, obj); int idx = CardSettingDataGridView.CurrentRow.Index; _InputOneSignal(idx, obj); }
/// <summary> /// 增加按钮 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void AddButton_Click(object sender, EventArgs e) { var newsetting = CardSettingManager.GetNewCardSetting(); settingfrm = new OneSignalSettingFrm(newsetting); settingfrm.ConfirmEvent += Settingfrm_AddConfirmEvent; settingfrm.ShowDialog(); }
private void Settingfrm_AddConfirmEvent(OneListSetting obj) { OneListSetting a = obj; CardSettingManager.AddSetting(a); int idx = CardSettingDataGridView.Rows.Add(); _InputOneSignal(idx, a); }
/// <summary> /// 删除按钮 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void DeleteButton_Click(object sender, EventArgs e) { int r = CardSettingDataGridView.CurrentRow.Index; string Selectmonitorname = (string)CardSettingDataGridView[0, r].Value; if (MessageBox.Show(string.Format("确实要删除{0}信号吗?", Selectmonitorname), "询问", MessageBoxButtons.YesNo) == DialogResult.Yes) { CardSettingDataGridView.Rows.RemoveAt(r); } CardSettingManager.DelSetting(Selectmonitorname); }
private void ChangeButton_Click(object sender, EventArgs e) { int r = CardSettingDataGridView.CurrentRow.Index; string Selectmonitorname = (string)CardSettingDataGridView[0, r].Value; selectname = Selectmonitorname; var onesetting = CardSettingManager.GetOneCardSetting(Selectmonitorname); settingfrm = new OneSignalSettingFrm(onesetting); settingfrm.ConfirmEvent += Settingfrm_ChgConfirmEvent; settingfrm.ShowDialog(); }
/// <summary> /// 保存按钮 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void SaveButton_Click(object sender, EventArgs e) { CardSettingManager.SaveSettings(); }
private void _channel_channeltypechane(ChannelType obj) { _channel.channel.AllowList.Clear(); _channel.channel.AllowList.AddRange(CardSettingManager.GetChannelAllowList(cardname.Value, obj)); }
private void _cardname_ValueChange(string obj) { CardSettingManager.GetCardAllowSetting(this); }