Exemplo n.º 1
0
        /// <summary>
        /// Given a date, allow the user to advance it by number of days or to the next DOW.
        /// Inputs and outputs in YYYYMMDD format.
        /// </summary>
        /// <returns>null if canceled</returns>
        public static string ShowDialog(string date)
        {
            var dlg = new RescheduleDialog
            {
                Owner = App.Current.MainWindow
            };

            dlg.Loaded += (s, e) => dlg.eCommand.Focus();
            if (dlg.ShowDialog() != true)
            {
                return(null);
            }
            return(DateUtil.AdvanceByShortcutKey(date, dlg.AdvanceChar));
        }