Пример #1
0
 public static int GetEvtSignif(events evt)
 {
     var db = new SandBoxDataContext();
     var dofe = db.DirectoryOfEvents.FirstOrDefault<DirectoryOfEvents>(x => ((x.dest == evt.dest) && (x.module == evt.module)
                                                     && (x.@event == evt.@event)&&(x.who==evt.who)));
     return dofe == null ? -1 : dofe.significance;
 }
Пример #2
0
        private void AddEventToChart(int virtualTime, events evt, int evtSignif, int yOfset)
        {
            bool isSessioForThisEvent = false;
            int i = 0;
            string moduleDescr = ResearchManager.GetEvtModuleDescription(evt.module);
            int startValue = yOfset+GetOfsetForEvent(evtSignif);
            if (evtSignif == 0 || evtSignif == 1)
            {
                if (yOfset == 0)
                {
                    if (DEventsCount.Keys.Contains(moduleDescr))
                    {
                        DEventsCount[moduleDescr]++;
                    }
                    else
                    {
                        DEventsCount.Add(moduleDescr, 1);
                    }
                }
                else
                {
                    if (DEventsCountCompare.Keys.Contains(moduleDescr))
                    {
                        DEventsCountCompare[moduleDescr]++;
                    }
                    else
                    {
                        DEventsCountCompare.Add(moduleDescr, 1);
                    }

                }
            }
            for (i = 0; i < WebChartControl1.Series.Count; i++ )
            {
                if (WebChartControl1.Series[i].Name == moduleDescr)
                {
                    WebChartControl1.Series[i].Points.Add(new DevExpress.XtraCharts.SeriesPoint(virtualTime,new double[]{startValue, startValue+1}));
                    isSessioForThisEvent = true;
                    //заполнение словаря
                    break;
                }
            }
            if (!isSessioForThisEvent)
            {
                var s = new DevExpress.XtraCharts.Series(moduleDescr, DevExpress.XtraCharts.ViewType.SideBySideRangeBar);
                s.Points.Add(new DevExpress.XtraCharts.SeriesPoint(virtualTime, new double[] { startValue, startValue + 1 }));
                WebChartControl1.Series.Add(s);//SideBySideRangeBarSeriesView
            }
        }
Пример #3
0
 public static int GetEvtSignif(events evt, List<DirectoryOfEvents> data)
 {
     foreach(var d in data)
     {
         if((evt.dest==d.dest) && (evt.module == d.module) && (evt.@event == d.@event) && (evt.who == d.who))
             return d.significance;
     }
     return -1;
 }
Пример #4
0
 partial void Deleteevents(events instance);
Пример #5
0
 partial void Updateevents(events instance);
Пример #6
0
 partial void Insertevents(events instance);