private SimpleTimerSettings Parse(SQLiteDataReader reader) { if (reader[TimerSettingsModel.IdCol.Name] is DBNull) { return(null); } int id = Convert.ToInt32(reader[TimerSettingsModel.IdCol.Name]); string name = Convert.ToString(reader[TimerSettingsModel.NameCol.Name]); string finalMessage = Convert.ToString(reader[TimerSettingsModel.MessageCol.Name]); bool blinkOnExpired = Convert.ToInt32(reader[TimerSettingsModel.BlinkCol.Name]) > 0; TimerDurationSettings durationSettings = DurationSettingsModel.Parse(reader); TimerVisualSettings visualSettings = VisualSettingsModel.Parse(reader); return(new SimpleTimerSettings(id, name, finalMessage, blinkOnExpired, durationSettings, visualSettings, null)); }
static VisualSettingsModel() { instance = new VisualSettingsModel(); }