private void saveButton_Click(object sender, EventArgs e) { // 传递时间点和对应颜色百分比 PassOnTimer?.Invoke(HelperTool.ConverDateTime2Minutes(onDateTimePicker.Value), (int)numericUpDown1.Value, (int)numericUpDown2.Value, (int)numericUpDown3.Value, (int)numericUpDown4.Value, (int)numericUpDown5.Value, (int)numericUpDown6.Value); this.Close(); }
/// <summary> /// 修改时间点 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void TimPointDateTimePicker_ValueChanged(object sender, EventArgs e) { DateTimePicker dateTimePicker = (DateTimePicker)sender; int minutes = HelperTool.ConverDateTime2Minutes(dateTimePicker.Value); if (isEditTurnOnTimer) { currentControllerItem.OnTimersMinutes[currentTimerIndex] = minutes; // 更新列表中label显示 turnOnTimerLabels[currentTimerIndex].Text = HelperTool.ConverMinutes2DateTime(minutes); } else { currentControllerItem.OffTimersMinutes[currentTimerIndex] = minutes; // 更新列表中label显示 turnOffTimerLabels[currentTimerIndex].Text = HelperTool.ConverMinutes2DateTime(minutes); } // 重绘曲线图 DrawChart(currentControllerItem); }
private void saveButton_Click(object sender, EventArgs e) { PassMinutes?.Invoke(HelperTool.ConverDateTime2Minutes(offTimerDateTimePicker.Value)); this.Close(); }