예제 #1
0
        public void OnTimerMessageChanged(TimerMessageSettings settings)
        {
            var handler = this.TimerMessageChanged;

            if (handler != null)
            {
                handler.Invoke(this, new SettingsChangedEventArgs(settings));
            }
        }
예제 #2
0
        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);
        }
예제 #3
0
        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));
        }
예제 #4
0
 public SettingsChangedEventArgs(TimerMessageSettings settings)
 {
     this.MessageSettings = settings;
 }
예제 #5
0
 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;
 }