示例#1
0
        /* Метод тестирует запрос к объединению двух таблиц */
        static void TestTraceMarkerJoin(RecordingInfo rec)
        {
            MarkupProvider markup = new MarkupProviderADO();

            markup.Init(rec);
            Trace trace = new Trace();

            trace.TagID      = 0;
            trace.ViewID     = 0;
            trace.FrameStart = 0;
            trace.FrameEnd   = 0;
            trace.ID         = markup.TraceCreate(trace);

            Marker marker = new Marker();

            marker.TraceID = trace.ID;
            marker.FrameID = trace.FrameStart;
            marker.PosX    = 10;
            marker.PosY    = 30;
            markup.MarkerCreate(marker);
            marker.PosX = 20;
            markup.MarkerUpdate(marker);

            List <Marker> markers = markup.MarkerGetByView(0, 0);

            foreach (Marker item in markers)
            {
                Console.WriteLine("TraceID = {0}, FrameID = {1}, PosX = {2}",
                                  item.TraceID, item.FrameID, item.PosX);
            }
        }
示例#2
0
        /* Метод тестирует запрос к объединению двух таблиц */
        static void TestTraceBoxJoin(RecordingInfo rec)
        {
            MarkupProvider markup = new MarkupProviderADO();

            markup.Init(rec);
            Trace trace = new Trace();

            trace.TagID      = 0;
            trace.ViewID     = 0;
            trace.FrameStart = 0;
            trace.FrameEnd   = 0;
            trace.ID         = markup.TraceCreate(trace);

            Box box = new Box();

            box.TraceID = trace.ID;
            box.FrameID = trace.FrameStart;
            box.PosX    = 10;
            box.PosY    = 30;
            box.Width   = 15;
            box.Height  = 25;
            markup.BoxCreate(box);

            List <Box> boxes = markup.BoxGetByView(0, 0);

            foreach (Box item in boxes)
            {
                Console.WriteLine("TraceID = {0}, FrameID = {1}, PosX = {2}",
                                  item.TraceID, item.FrameID, item.PosX);
            }
        }