Ejemplo n.º 1
0
        public void TestStore()
        {
            AxcExtRecord record = new AxcExtRecord();
            record.MinimumDate = ((short)0);
            record.MaximumDate = ((short)0);
            record.MajorInterval = ((short)1);
            record.MajorUnit = ((short)0);
            record.MinorInterval = ((short)1);
            record.MinorUnit = ((short)0);
            record.BaseUnit = ((short)0);
            record.CrossDate = ((short)0);
            record.Options = ((short)239);
            record.IsAutoMin = (true);
            record.IsAutoMax = (true);
            record.IsAutoMajor = (true);
            record.IsAutoMinor = (true);
            record.IsDateAxis = (false);
            record.IsAutoBase = (true);
            record.IsAutoCross = (true);
            record.IsAutoDate = (true);


            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);
        }
Ejemplo n.º 2
0
        public override Object Clone()
        {
            AxcExtRecord rec = new AxcExtRecord();

            rec.field_1_catMin       = field_1_catMin;
            rec.field_2_catMax       = field_2_catMax;
            rec.field_3_catMajor     = field_3_catMajor;
            rec.field_4_duMajor      = field_4_duMajor;
            rec.field_5_catMinor     = field_5_catMinor;
            rec.field_6_duMinor      = field_6_duMinor;
            rec.field_7_duBase       = field_7_duBase;
            rec.field_8_catCrossDate = field_8_catCrossDate;
            rec.field_9_options      = field_9_options;
            return(rec);
        }
Ejemplo n.º 3
0
        public IVAxisAggregate(RecordStream rs, ChartRecordAggregate container, AxisRecord axis)
            : base(RuleName_IVAXIS, container)
        {
            this.axis = axis;

            if (rs.PeekNextChartSid() == CatSerRangeRecord.sid)
                catSerRange = (CatSerRangeRecord)rs.GetNext();

            Debug.Assert(rs.PeekNextChartSid() == AxcExtRecord.sid);
            axcExt = (AxcExtRecord)rs.GetNext();

            if (rs.PeekNextChartSid() == CatLabRecord.sid)
                catLab = (CatLabRecord)rs.GetNext();

            axs = new AXSAggregate(rs, this);
            while (rs.PeekNextChartSid() == CrtMlFrtRecord.sid)
                crtmlfrtList.Add(new CrtMlFrtAggregate(rs, this));

            Record r = rs.GetNext();//EndRecord
            Debug.Assert(r.GetType() == typeof(EndRecord));
        }
Ejemplo n.º 4
0
        public void TestLoad()
        {
            AxcExtRecord record = new AxcExtRecord(TestcaseRecordInputStream.Create((short)0x1062, data));
            Assert.AreEqual(0, record.MinimumDate);
            Assert.AreEqual(0, record.MaximumDate);
            Assert.AreEqual(1, record.MajorInterval);
            Assert.AreEqual(0, (short)record.MajorUnit);
            Assert.AreEqual(1, record.MinorInterval);
            Assert.AreEqual(0, (short)record.MinorUnit);
            Assert.AreEqual(0, (short)record.BaseUnit);
            Assert.AreEqual(0, record.CrossDate);
            Assert.AreEqual(239, record.Options);
            Assert.AreEqual(true, record.IsAutoMin);
            Assert.AreEqual(true, record.IsAutoMax);
            Assert.AreEqual(true, record.IsAutoMajor);
            Assert.AreEqual(true, record.IsAutoMinor);
            Assert.AreEqual(false, record.IsDateAxis);
            Assert.AreEqual(true, record.IsAutoBase);
            Assert.AreEqual(true, record.IsAutoCross);
            Assert.AreEqual(true, record.IsAutoDate);


            Assert.AreEqual(22, record.RecordSize);
        }
Ejemplo n.º 5
0
 private AxcExtRecord CreateAxisOptionsRecord()
 {
     AxcExtRecord r = new AxcExtRecord();
     r.MinimumDate = ((short)-28644);
     r.MaximumDate = ((short)-28715);
     r.MajorInterval = ((short)2);
     r.MajorUnit = (DateUnit)0;
     r.MinorInterval = ((short)1);
     r.MinorUnit = (DateUnit)0;
     r.BaseUnit = (DateUnit)0;
     r.CrossDate = ((short)-28644);
     r.IsAutoMin = (true);
     r.IsAutoMax = (true);
     r.IsAutoMajor = (true);
     r.IsAutoMinor = (true);
     r.IsDateAxis = (true);
     r.IsAutoBase = (true);
     r.IsAutoCross = (true);
     r.IsAutoDate = (true);
     return r;
 }
Ejemplo n.º 6
0
 private static AxcExtRecord CreateAxcExtRecord()
 {
     AxcExtRecord r = new AxcExtRecord();
     r.MinimumDate = 0;
     r.MaximumDate = 0;
     r.MajorInterval = 1;
     r.MajorUnit = DateUnit.DUDAYS;
     r.MinorInterval = 1;
     r.MinorUnit = DateUnit.DUDAYS;
     r.BaseUnit = DateUnit.DUDAYS;
     r.CrossDate = 0;
     r.IsAutoMin = (true);
     r.IsAutoMax = (true);
     r.IsAutoMajor = (true);
     r.IsAutoMinor = (true);
     r.IsDateAxis = (false);
     r.IsAutoBase = (true);
     r.IsAutoCross = (true);
     r.IsAutoDate = (true);
     return r;
 }
Ejemplo n.º 7
0
        public override Object Clone()
        {
            AxcExtRecord rec = new AxcExtRecord();

            rec.field_1_catMin = field_1_catMin;
            rec.field_2_catMax = field_2_catMax;
            rec.field_3_catMajor = field_3_catMajor;
            rec.field_4_duMajor = field_4_duMajor;
            rec.field_5_catMinor = field_5_catMinor;
            rec.field_6_duMinor = field_6_duMinor;
            rec.field_7_duBase = field_7_duBase;
            rec.field_8_catCrossDate = field_8_catCrossDate;
            rec.field_9_options = field_9_options;
            return rec;
        }