protectrecord.cs

来自「Excel的操作,其中可以读取及写入Excel 文件」· CS 代码 · 共 38 行

CS
38
字号
using System;

using Microsoft.Fawvw.Components.NExcel.Biff;

namespace Microsoft.Fawvw.Components.NExcel.Read.Biff
{
	
	/// <summary> A record detailing whether the sheet is protected</summary>
	class ProtectRecord:RecordData
	{
		/// <summary> Returns the protected flag
		/// 
		/// </summary>
		/// <returns> TRUE if this is protected, FALSE otherwise
		/// </returns>
		virtual internal bool IsProtected()
		{
				return prot;
		}
		/// <summary> Protected flag</summary>
		private bool prot;
		
		/// <summary> Constructs this object from the raw data
		/// 
		/// </summary>
		/// <param name="t">the raw data
		/// </param>
		internal ProtectRecord(Record t):base(t)
		{
			sbyte[] data = getRecord().Data;
			
			int protflag = IntegerHelper.getInt(data[0], data[1]);
			
			prot = (protflag == 1);
		}
	}
}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?