示例#1
0
 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)
     };
 }
示例#2
0
 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;
 }