public override Object Clone() { TickRecord rec = new TickRecord(); rec.field_1_majorTickType = field_1_majorTickType; rec.field_2_minorTickType = field_2_minorTickType; rec.field_3_labelPosition = field_3_labelPosition; rec.field_4_background = field_4_background; rec.field_5_labelColorRgb = field_5_labelColorRgb; rec.field_6_zero1 = field_6_zero1; rec.field_7_zero2 = field_7_zero2; rec.field_8_zero3 = field_8_zero3; rec.field_9_zero4 = field_9_zero4; rec.field_10_options = field_10_options; rec.field_11_tickColor = field_11_tickColor; rec.field_12_zero5 = field_12_zero5; return(rec); }
public void TestLoad() { TickRecord record = new TickRecord(TestcaseRecordInputStream.Create(0x101e, data)); Assert.AreEqual((byte)2, record.MajorTickType); Assert.AreEqual((byte)0, record.MinorTickType); Assert.AreEqual((byte)3, record.LabelPosition); Assert.AreEqual((short)1, record.Background); Assert.AreEqual(0, record.LabelColorRgb); Assert.AreEqual((short)0, record.Zero1); Assert.AreEqual((short)0, record.Zero2); Assert.AreEqual((short)35, record.Options); Assert.AreEqual(true, record.IsAutoTextColor); Assert.AreEqual(true, record.IsAutoTextBackground); Assert.AreEqual((short)0x0, record.Rotation); Assert.AreEqual(true, record.IsAutorotate); Assert.AreEqual((short)77, record.TickColor); Assert.AreEqual((short)0x0, record.Zero3); Assert.AreEqual(34, record.RecordSize); }
public void TestStore() { TickRecord record = new TickRecord(); record.MajorTickType=((byte)2); record.MinorTickType=((byte)0); record.LabelPosition=((byte)3); record.Background=((byte)1); record.LabelColorRgb=(0); record.Zero1=((short)0); record.Zero2=((short)0); record.Options=((short)35); record.IsAutoTextColor=(true); record.IsAutoTextBackground=(true); record.Rotation=((short)0); record.IsAutorotate=(true); record.TickColor=((short)77); record.Zero3=((short)0); byte[] recordBytes = record.Serialize(); Assert.AreEqual(recordBytes.Length - 4, data.Length); for (int i = 0; i < data.Length; i++) Assert.AreEqual(data[i], recordBytes[i + 4], "At offset " + i); }
private TickRecord CreateTickRecord1() { TickRecord r = new TickRecord(); r.MajorTickType = ((byte)2); r.MinorTickType = ((byte)0); r.LabelPosition = ((byte)3); r.Background = ((byte)1); r.LabelColorRgb = (0); r.Zero1 = ((short)0); r.Zero2 = ((short)0); r.Zero3 = ((short)45); r.IsAutorotate = (true); r.IsAutoTextBackground = (true); r.Rotation = ((short)0); r.IsAutorotate = (true); r.TickColor = ((short)77); return r; }
public override Object Clone() { TickRecord rec = new TickRecord(); rec.field_1_majorTickType = field_1_majorTickType; rec.field_2_minorTickType = field_2_minorTickType; rec.field_3_labelPosition = field_3_labelPosition; rec.field_4_background = field_4_background; rec.field_5_labelColorRgb = field_5_labelColorRgb; rec.field_6_zero1 = field_6_zero1; rec.field_7_zero2 = field_7_zero2; rec.field_8_zero3 = field_8_zero3; rec.field_9_zero4 = field_9_zero4; rec.field_10_options = field_10_options; rec.field_11_tickColor = field_11_tickColor; rec.field_12_zero5 = field_12_zero5; return rec; }
private TickRecord CreateTickRecord1() { TickRecord r = new TickRecord(); r.SetMajorTickType( (byte) 2 ); r.SetMinorTickType( (byte) 0 ); r.SetLabelPosition( (byte) 3 ); r.SetBackground( (byte) 1 ); r.SetLabelColorRgb( 0 ); r.SetZero1( (short) 0 ); r.SetZero2( (short) 0 ); r.SetZero3( (short) 45 ); r.SetAutorotate( true ); r.SetAutoTextBackground( true ); r.SetRotation( (short) 0 ); r.SetAutorotate( true ); r.SetTickColor( (short) 77 ); return r; }