public void OnTimerMessageChanged(TimerMessageSettings settings) { var handler = this.TimerMessageChanged; if (handler != null) { handler.Invoke(this, new SettingsChangedEventArgs(settings)); } }
public TimerMessageSettings Clone() { TimerMessageSettings settings = new TimerMessageSettings(); settings.TimerMessage = this.TimerMessage; settings.MessageDuration = this.MessageDuration; settings.MessageFontSize = this.MessageFontSize; settings.IsIndefiniteMessage = this.IsIndefiniteMessage; return(settings); }
public override bool Equals(object obj) { if (obj == null || GetType() != obj.GetType()) { return(false); } TimerMessageSettings that = obj as TimerMessageSettings; if (that == null) { return(false); } return(this.TimerMessage.Equals(that.TimerMessage) && this.MessageDuration.Equals(that.MessageDuration) && this.MessageFontSize.Equals(that.MessageFontSize) && this.IsIndefiniteMessage.Equals(that.IsIndefiniteMessage)); }
public SettingsChangedEventArgs(TimerMessageSettings settings) { this.MessageSettings = settings; }
public SimpleTimerSettings(int id, string name, string finalmessage, bool blinkOnExpired, TimerDurationSettings durationSettings, TimerVisualSettings visualSettings, TimerMessageSettings messageSettings) : base(id) { this.name = name ?? TimerSettings.DefaultName; this.FinalMessage = finalmessage ?? string.Empty; this.BlinkOnExpired = blinkOnExpired; this.TimerDuration = new TimerDurationSettings(durationSettings.DurationId, durationSettings); this.VisualSettings = new TimerVisualSettings(visualSettings.VisualId, visualSettings); this.MessageSettings = messageSettings ?? TimerMessageSettings.Default; }