Esempio n. 1
0
        public static API_CatNet_TeamMentor_VS2010 add_Buttons_to_ToolStrip(this API_CatNet_TeamMentor_VS2010 tmCatNet)
        {
            "[API_CatNet_TeamMentor_VS2012] add_Buttons_to_ToolStrip".debug();
            tmCatNet.add_Button_TeamMentorGui();

            return(tmCatNet);
        }
Esempio n. 2
0
 public static API_CatNet_TeamMentor_VS2010 set_OnReportItem_Callback(this API_CatNet_TeamMentor_VS2010 tmCatNet)
 {
     "[API_CatNet_TeamMentor_VS2012] set_OnReportItem_Callback".debug();
     //tmCatNet.onReportItem = (reportItem)=> reportItem.str().info();
     tmCatNet.Summary.afterSelected <ReportItem>(
         (reportItem) => {
         //"in HERE".error();
         tmCatNet.onReportItem(reportItem);
     });
     return(tmCatNet);
 }
Esempio n. 3
0
        public static API_CatNet_TeamMentor_VS2010 open_In_TeamMentorArticle(this API_CatNet_TeamMentor_VS2010 tmCatNet, string url)
        {
            tmCatNet.open_Window_TeamMentorArticle();
            var chrome = (WebView)"TeamMentor_Article".o2Cache();

            if (chrome.isNull())
            {
                "[API_CatNet_TeamMentor_VS2012] open_In_TeamMentorArticle: could not get chrome object".error();
            }
            else
            {
                "[API_CatNet_TeamMentor_VS2012] open_In_TeamMentorArticle: {0}".info(url);
                chrome.open(url);
            }
            return(tmCatNet);
        }
Esempio n. 4
0
        public static API_CatNet_TeamMentor_VS2010 open_Window_TeamMentorArticle(this API_CatNet_TeamMentor_VS2010 tmCatNet)
        {
            var windowName = "TeamMentor Article";
            var window     = tmCatNet.window(windowName);

            if (window.notNull())
            {
                window.Visible = true;
            }
            else
            {
                var chrome = tmCatNet.VsAddIn.add_WinForm_Panel(windowName, 700, 300)
                             .add_Chrome();
                "TeamMentor_Article".o2Cache(chrome);
            }
            tmCatNet.window(windowName).IsFloating = false;
            return(tmCatNet);
        }
Esempio n. 5
0
        public static API_CatNet_TeamMentor_VS2010 add_Button_TeamMentorGui(this API_CatNet_TeamMentor_VS2010 tmCatNet)
        {
            var summaryView = tmCatNet.SummaryView;
            //tsActions.Items.Clear();
            var button = new ToolStripButton();

            button.Text   = "Open TeamMentor GUI";
            button.Click += (sender, e) =>
            {
                var topPanel = tmCatNet.VsAddIn.add_WinForm_Panel("TeamMentor Gui", 1000, 600);
                "Opening TeamMentor GUI".info();
                var chrome = topPanel.add_Chrome();

                chrome.open(tmCatNet.TeamMentorUrl);
            };
            tmCatNet.Actions.Items.Add(button);


            return(tmCatNet);
        }
Esempio n. 6
0
        public static API_CatNet_TeamMentor_VS2010 set_OnReportItem_Rules(this API_CatNet_TeamMentor_VS2010 tmCatNet)
        {
            //"[set_OnReportItem_Rules]".info();
            tmCatNet.onReportItem = (reportItem) =>
            {
                "in set_OnReportItem_Rules V3:".info();
                var article = "";
                switch (reportItem.HelpCaption)
                {
                case "Exception Information":
                    article = "Validate Input from All Sources";
                    break;

                case "SQL Injection":
                    article = "How to Test For SQL%20Injection%20Bugs";
                    break;

                case "Cross-Site Scripting":
                    article = "Cross Site Scripting Attack";
                    break;

                case "File Canonicalization":
                    article = "File Name And Path Manipulation Attack";
                    break;

                default:
                    "No mapping for: {0}".info(reportItem.HelpCaption);
                    break;
                }
                if (article.valid())
                {
                    tmCatNet.open_In_TeamMentorArticle(tmCatNet.TeamMentorUrl + "article/" + article);
                }
                else
                {
                    tmCatNet.open_In_TeamMentorArticle("https://www.google.co.uk/#q=" + reportItem.HelpCaption);
                }
            };
            return(tmCatNet);
        }
Esempio n. 7
0
 public static bool haveExtraFeaturesBeenAdded(this API_CatNet_TeamMentor_VS2010 tmCatNet)
 {
     return(tmCatNet.Actions.item("Open TeamMentor GUI").notNull());
 }