public TimerSheetViewModel(int Hours, int Minutes, int Seconds, string Description) { start = DateTime.Now; time = new TimeSpan(Hours, Minutes, Seconds); CloseCommand = new DelegateCommandResolver(SaveChanged); TimerSheet = new TimerSheetModel { Text = Description, Time = CreateTime(time) }; }
public CountdownViewModel(SaveList saveList) { OutputFilename = ConfigurationManager.AppSettings["Filename"]; Countdown = new CountdownModel(); timer = new AppTimer(200); timer.AfterTick += AfterTick; TimerSheets = new ObservableCollection <TimerSheetViewModel>(); CreateCommand = new DelegateCommandResolver(SaveChanged, () => CanUpdate); System.IO.File.Create(OutputFilename); DoSaveList += saveList; }