public ReporterViewModel() { this.mRefreshTimer = new Timer(System.Windows.Forms.SystemInformation.DoubleClickTime * 2); this.mRefreshTimer.Elapsed += this.RefreshTimer_Elapsed; this.mRefreshTimer.AutoReset = false; this.mPreviousWeekCommand = new CommandViewModel("Previous Week", new RelayCommand(() => this.OffsetWeek(-1))); this.mNextWeekCommand = new CommandViewModel("Next Week", new RelayCommand(() => this.OffsetWeek(1))); this.mClipboardCommand = new CommandViewModel("Copy to Clipboard", new RelayCommand(this.ClipboardImplementation)); var lDateTimeTodayLocal = DateTime.Today; var lWeekStartLocal = lDateTimeTodayLocal.AddDays(-((int)lDateTimeTodayLocal.DayOfWeek)); this.StartDateInclusive = lWeekStartLocal; this.EndDateInclusive = lWeekStartLocal.AddDays(6); Application.Current.Exit += CurrentApplication_Exit; if (this.IsInDesignMode) { this.BaseDirectoryPath = "Hello, world!"; } else { this.LoadBaseDirectoryPath(); } }
public ReporterViewModel() { this.mRefreshTimer = new Timer(System.Windows.Forms.SystemInformation.DoubleClickTime * 2); this.mRefreshTimer.Elapsed += this.RefreshTimer_Elapsed; this.mRefreshTimer.AutoReset = false; this.mPreviousWeekCommand = new CommandViewModel("Previous Week", new RelayCommand(() => this.OffsetWeek(-1))); this.mNextWeekCommand = new CommandViewModel("Next Week", new RelayCommand(() => this.OffsetWeek(1))); this.mClipboardCommand = new CommandViewModel("Copy to Clipboard", new RelayCommand(this.ClipboardImplementation)); var lDateTimeTodayLocal = DateTime.Today; var lWeekStartLocal = lDateTimeTodayLocal.AddDays(-((int) lDateTimeTodayLocal.DayOfWeek)); this.StartDateInclusive = lWeekStartLocal; this.EndDateInclusive = lWeekStartLocal.AddDays(6); Application.Current.Exit += CurrentApplication_Exit; if (this.IsInDesignMode) { this.BaseDirectoryPath = "Hello, world!"; } else { this.LoadBaseDirectoryPath(); } }