private void AlarmForm_Load(object sender, EventArgs e) { var width = richTextBoxAlarmContent.Width; var formmWidth = this.Width; richTextBoxAlarmContent.Left = (formmWidth - width) / 2; AlarmHelper.StartAlarm(); }
private void AlarmForm_FormClosing(object sender, FormClosingEventArgs e) { AlarmHelper.StopAlarm(); }