Ejemplo n.º 1
0
        /// <summary>
        /// Show the user a dialog requesting a snapshot name.
        /// If the name is iinvalid, ask him again until he sets a right name.
        /// If the user cancels, returns null.
        /// </summary>
        /// <returns></returns>
        private static string ReadSnapshotName(string currentSnapshotName)
        {
            string snapshotName = currentSnapshotName;

            do
            {
                snapshotName = StringInput.GetString(Trans.T("L_POSTPONED_JOB_NAME"), Trans.T("L_NAME_POSTPONED_JOB"), snapshotName, true);
                if (snapshotName == null)
                {
                    // User cancelled.
                    return(null);
                }
            } while (PendingPrintJob.IsInvalidSnapshotName(snapshotName));

            return(snapshotName);
        }