Ejemplo n.º 1
0
        public override IList <BaseBookmark> GetBookmarks(Frec frec)
        {
            List <BaseBookmark> list = new List <BaseBookmark>();

            BaseBookmark    bookmark;
            string          tableNameFromRequest = GetMainTableName(frec);
            string          regex   = GetResponceRegexMatcher(frec);
            MatchCollection matches = Regex.Matches(frec.Response, regex);

            foreach (Match match in matches)
            {
                bookmark = new BaseBookmark();

                int countOfCharsForFind = Math.Min(frec.Response.Length - match.Index, TABLE_NAME_STRING.Length + 20);
                if (frec.Response.IndexOf(TABLE_NAME_STRING, match.Index, countOfCharsForFind) > 0)
                {
                    bookmark.Title      = GetExternalTableFromResponce(frec, match.Index);
                    bookmark.IsInjected = true;
                }
                else
                {
                    bookmark.Title = tableNameFromRequest;
                }

                bookmark.Bookmark = match.Value;
                list.Add(bookmark);
            }

            return(list);
        }
Ejemplo n.º 2
0
        private void OnGridResponceIdCellClick(object sender, DataGridViewCellEventArgs e)
        {
            BaseBookmark bookmark = (BaseBookmark)m_idsGrid.Rows[e.RowIndex].DataBoundItem;

            m_mvcManager.SetActiveTabByCaption(m_requestAndResponseControl.Caption);
            m_requestAndResponseControl.FindInResponce(bookmark);
        }
Ejemplo n.º 3
0
 public override IList <BaseBookmark> GetBookmarks(Frec frec)
 {
     try
     {
         List <BaseBookmark> list     = new List <BaseBookmark>();
         BaseBookmark        bookmark = new BaseBookmark();
         bookmark.Title    = "ERROR_CODE";
         bookmark.Bookmark = frec.ErrorCode.ToString();
         list.Add(bookmark);
         return(list);
     }
     catch
     {
         return(null);
     }
 }
Ejemplo n.º 4
0
        public override IList <BaseBookmark> GetBookmarks(Frec frec)
        {
            List <BaseBookmark> list = new List <BaseBookmark>();

            try
            {
                BaseBookmark bookmark = new BaseBookmark();
                bookmark.Title = frec.TableName;

                int graphNumber = Helpers.FrecUtilities.GetValueAsInt(frec.Request, "ChartGroup");
                bookmark.Bookmark = "GRAPH_TYPE: " + m_mapNumber2GraphName[graphNumber];
                list.Add(bookmark);
            }
            catch
            {
            }

            return(list);
        }