コード例 #1
0
        public void RawKind_ReturnsExpected(int rawKind, PaperSourceKind expectedKind)
        {
            PaperSource ps = new PaperSource();

            ps.RawKind = rawKind;
            Assert.Equal(expectedKind, ps.Kind);
            Assert.Equal(rawKind, ps.RawKind);
        }
コード例 #2
0
 // Constructor.
 internal PaperSource(PaperSourceKind kind, String name)
 {
     this.kind = kind;
     if (name == null)
     {
         this.name = kind.ToString();
     }
     else
     {
         this.name = name;
     }
 }
コード例 #3
0
        // Internal state.

        // Constructor.
        internal PaperSource(PaperSourceKind kind, string name)
        {
            Kind = kind;
            if(name == null)
            {
                SourceName = kind.ToString();
            }
            else
            {
                SourceName = name;
            }
        }
コード例 #4
0
	// Constructor.
	internal PaperSource(PaperSourceKind kind, String name)
			{
				this.kind = kind;
				if(name == null)
				{
					this.name = kind.ToString();
				}
				else
				{
					this.name = name;
				}
			}
コード例 #5
0
        public void RawKind_Set_GetReturnsExpected(int value, PaperSourceKind expectedKind)
        {
            var source = new PaperSource
            {
                RawKind = value
            };

            Assert.Equal(value, source.RawKind);
            Assert.Equal(expectedKind, source.Kind);

            // Set same.
            source.RawKind = value;
            Assert.Equal(value, source.RawKind);
            Assert.Equal(expectedKind, source.Kind);
        }
コード例 #6
0
ファイル: PaperSource.cs プロジェクト: Profit0004/mono
		internal PaperSource(string sourceName, PaperSourceKind kind, bool isDefault)
		{
			this.source_name = sourceName;
			this.kind = kind;
			this.is_default = IsDefault;
		}
コード例 #7
0
ファイル: PaperSource.cs プロジェクト: Profit0004/mono
		internal PaperSource(string sourceName, PaperSourceKind kind)
		{
			this.source_name = sourceName;
			this.kind = kind;
		}
コード例 #8
0
        private bool SetPaperSource(PrinterSettings pPrinterSettings, string pPaperSourceName, PaperSourceKind pKind, int pRawKind)
        {
            bool vPaperSourceFound = false;

            foreach (PaperSource vStockPaperSource in pPrinterSettings.PaperSources)
            {
                if ((vStockPaperSource.SourceName == pPaperSourceName) ||
                    (vStockPaperSource.Kind == pKind && vStockPaperSource.RawKind == pRawKind))
                {
                    vPaperSourceFound = true;
                    pPrinterSettings.DefaultPageSettings.PaperSource = vStockPaperSource;
                    break;
                }
            }
            return(vPaperSourceFound);
        }
コード例 #9
0
	// Get a standard paper source object.
	public static PaperSource GetStandardPaperSource(PaperSourceKind kind)
			{
				return new PaperSource(kind, null);
			}
コード例 #10
0
 internal PaperSource(PaperSourceKind kind, string name)
 {
     this.kind = kind;
     this.name = name;
 }
コード例 #11
0
 internal PaperSource(string sourceName, PaperSourceKind kind)
 {
     this.source_name = sourceName;
     this.kind        = kind;
 }
コード例 #12
0
 internal PaperSource(PaperSourceKind kind, string name) {
     this.kind = kind;
     this.name = name;
 }
コード例 #13
0
 /// <include file='doc\PaperSource.uex' path='docs/doc[@for="PaperSource.PaperSource"]/*' />
 /// <devdoc>
 ///    <para>
 ///       Initializes a new instance of the <see cref='System.Drawing.Printing.PaperSource'/> class with default properties.
 ///       This constructor is required for the serialization of the <see cref='System.Drawing.Printing.PaperSource'/> class.
 ///    </para>
 /// </devdoc>
 public PaperSource()
 {
     this.kind = PaperSourceKind.Custom;
     this.name = String.Empty;
 }
コード例 #14
0
ファイル: ToolkitManager.cs プロジェクト: i-e-b/Form8sn
 // Get a standard paper source object.
 public static PaperSource GetStandardPaperSource(PaperSourceKind kind)
 {
     return(new PaperSource(kind, null));
 }
コード例 #15
0
ファイル: PaperSource.cs プロジェクト: dox0/DotNet471RS3
 /// <include file='doc\PaperSource.uex' path='docs/doc[@for="PaperSource.PaperSource"]/*' />
 /// <devdoc>
 ///    <para>
 ///       Initializes a new instance of the <see cref='System.Drawing.Printing.PaperSource'/> class with default properties.
 ///       This constructor is required for the serialization of the <see cref='System.Drawing.Printing.PaperSource'/> class.
 ///    </para>
 /// </devdoc>
 public PaperSource()
 {
     this.kind = PaperSourceKind.Custom;
     this.name = String.Empty;
 }
コード例 #16
0
 /// <summary>
 /// Initializes a new instance of the <see cref='PaperSource'/> class with default properties.
 /// </summary>
 public PaperSource()
 {
     _kind = PaperSourceKind.Custom;
     _name = string.Empty;
 }
コード例 #17
0
 internal PaperSource(PaperSourceKind kind, string name)
 {
     _kind = kind;
     _name = name;
 }
コード例 #18
0
 internal PaperSource(string sourceName, PaperSourceKind kind, bool isDefault)
 {
     this.source_name = sourceName;
     this.kind        = kind;
     this.is_default  = IsDefault;
 }