private void button1_Click(object sender, EventArgs e) { //validate if (IsValidData()) { WurmTimerDescriptors.CustomTimerOptions options = new WurmTimerDescriptors.CustomTimerOptions(); options.AddTrigger(textBoxCond.Text, (GameLogTypes)comboBoxLogType.SelectedItem, checkBoxAsRegex.Checked); options.Duration = timeInputUControl2.Value; options.ResetOnUptime = checkBoxUptimeReset.Checked; if (EditingNameID != null) { WurmTimerDescriptors.RemoveCustomTimer(EditingNameID); } WurmTimerDescriptors.AddCustomTimer(textBoxNameID.Text, options); this.Close(); } }
//happens before Initialize public void ApplyCustomTimerOptions(WurmTimerDescriptors.CustomTimerOptions options) { Options = options; }