/// <summary> /// Initializes a new instance of the <see cref="WorkbookProtection"/> struct. /// </summary> /// <param name="value">The value.</param> /// <param name="protectionKind">Kind of the protection.</param> public WorkbookProtection(string value, WorkbookProtectionKind protectionKind) { When = When.Normal; Value = value; ProtectionKind = protectionKind; }
void IExcelCommand.Read(BinaryReader r) { Value = r.ReadBoolean() ? r.ReadString() : null; ProtectionKind = (WorkbookProtectionKind)r.ReadInt32(); }
/// <summary> /// Initializes a new instance of the <see cref="WorkbookProtection"/> struct. /// </summary> /// <param name="row">The row.</param> /// <param name="col">The col.</param> /// <param name="protectionKind">Kind of the protection.</param> public WorkbookProtection(int row, int col, WorkbookProtectionKind protectionKind) : this(ExcelService.GetAddress(row, col), protectionKind) { }