private SCLRecord CreateSCLRecord(short numerator, short denominator) { SCLRecord r = new SCLRecord(); r.Denominator = (denominator); r.Numerator = (numerator); return r; }
public override Object Clone() { SCLRecord rec = new SCLRecord(); rec.field_1_numerator = field_1_numerator; rec.field_2_denominator = field_2_denominator; return rec; }
/// <summary> /// Sets the SCL record or Creates it in the correct place if it does not /// already exist. /// </summary> /// <param name="sclRecord">The record to set.</param> public void SetSCLRecord(SCLRecord sclRecord) { int oldRecordLoc = FindFirstRecordLocBySid(SCLRecord.sid); if (oldRecordLoc == -1) { // Insert it after the window record int windowRecordLoc = FindFirstRecordLocBySid(WindowTwoRecord.sid); records.Insert(windowRecordLoc + 1, sclRecord); } else { records[oldRecordLoc] = sclRecord; } }
/// <summary> /// Sets the zoom magnication for the _sheet. The zoom is expressed as a /// fraction. For example to express a zoom of 75% use 3 for the numerator /// and 4 for the denominator. /// </summary> /// <param name="numerator">The numerator for the zoom magnification.</param> /// <param name="denominator">The denominator for the zoom magnification.</param> public void SetZoom(int numerator, int denominator) { if (numerator < 1 || numerator > 65535) throw new ArgumentException("Numerator must be greater than 1 and less than 65536"); if (denominator < 1 || denominator > 65535) throw new ArgumentException("Denominator must be greater than 1 and less than 65536"); SCLRecord sclRecord = new SCLRecord(); sclRecord.Numerator = ((short)numerator); sclRecord.Denominator = ((short)denominator); Sheet.SetSCLRecord(sclRecord); }