PageCopyCount.cs source code in C# .NET

Source code for the .NET framework in C#

                        

Code:

/ DotNET / DotNET / 8.0 / untmp / WIN_WINDOWS / lh_tools_devdiv_wpf / Windows / wcp / Print / Reach / PrintConfig / PageCopyCount.cs / 1 / PageCopyCount.cs

                            /*++ 

Copyright (C) 2003 Microsoft Corporation
All rights reserved.
 
Module Name:
 
    PageCopyCount.cs 

Abstract: 

    Definition and implementation of this public feature/parameter related types.

Author: 

    [....] ([....]) 7/18/2003 
 
--*/
 
using System;
using System.IO;
using System.Collections;
using System.Diagnostics; 
using System.Globalization;
 
using System.Printing; 
using MS.Internal.Printing.Configuration;
 
namespace MS.Internal.Printing.Configuration
{
    /// 
    /// Represents job copy count capability. 
    /// 
    internal sealed class JobCopyCountCapability : NonNegativeIntParameterDefinition 
    { 
        #region Constructors
 
        internal JobCopyCountCapability() : base()
        {
        }
 
        #endregion Constructors
 
        #region Internal Methods 

        internal static ParameterDefinition NewParamDefCallback(InternalPrintCapabilities printCap) 
        {
            JobCopyCountCapability cap = new JobCopyCountCapability();

            return cap; 
        }
 
        #endregion Internal Methods 
    }
 
    /// 
    /// Represents job copy count setting.
    /// 
    internal class JobCopyCountSetting : PrintTicketParameter 
    {
        #region Constructors 
 
        /// 
        /// Constructs a new job copy count setting object. 
        /// 
        internal JobCopyCountSetting(InternalPrintTicket ownerPrintTicket)
            : base(ownerPrintTicket,
                   PrintSchemaTags.Keywords.ParameterDefs.JobCopyCount, 
                   PrintTicketParamTypes.Parameter,
                   PrintTicketParamValueTypes.IntValue) 
        { 
        }
 
        #endregion Constructors

        #region Public Properties
 
        /// 
        /// Gets or sets the value of job copy count. 
        ///  
        /// 
        /// If this setting is not specified yet, getter will return . 
        /// 
        /// 
        /// The value to set is not a positive integer.
        ///  
        public int Value
        { 
            get 
            {
                return this.IntValue; 
            }
            set
            {
                if (value <= 0) 
                {
                    throw new ArgumentOutOfRangeException("value", 
                                  PTUtility.GetTextFromResource("ArgumentException.PositiveValue")); 
                }
 
                this.IntValue = value;
            }
        }
 
        #endregion Public Properties
 
        #region Public Methods 

        ///  
        /// Converts the job copy count setting to human-readable string.
        /// 
        /// A string that represents this job copy count setting.
        public override string ToString() 
        {
            return Value.ToString(CultureInfo.CurrentCulture); 
        } 

        #endregion Public Methods 

        #region Internal Methods

        internal override sealed void SettingClearCallback() 
        {
        } 
 
        #endregion Internal Methods
    } 
}

// File provided for Reference Use Only by Microsoft Corporation (c) 2007.
// Copyright (c) Microsoft Corporation. All rights reserved.
                        

Link Menu

Network programming in C#, Network Programming in VB.NET, Network Programming in .NET
This book is available now!
Buy at Amazon US or
Buy at Amazon UK