private void ShowSavedResults()
        {
            LoginData login = LoginHelper.LoadSaved();

            CxViewerAction.CxVSWebService.CxWSQueryVulnerabilityData[] scanData = null;
            long scanId = 0;

            scanId = CommonData.SelectedScanId;
            if (scanId == 0)
            {
                TopMostMessageBox.Show("No Stored Results Found", "Information");
                return;
            }
            scanData = SavedResultsManager.Instance.LoadStoredScanData(scanId);

            if (scanData.Length > 0)
            {
                PerspectiveHelper.ShowStored(scanData, login, scanId);
                CommonActionsInstance.getInstance().ShowReportView();
            }
            else
            {
                TopMostMessageBox.Show("No Stored Results Found", "Information");
            }
        }
        private void DoScan(Entities.Project project)
        {
            try
            {
                if (!LoginHelper.IsScanner)
                {
                    TopMostMessageBox.Show("User is not allowed to scan", "Error");
                    return;
                }

                // verify that was selected correct project
                if (!string.IsNullOrEmpty(project.RootPath))
                {
                    System.Threading.ThreadPool.QueueUserWorkItem(delegate(object state)
                    {
                        try
                        {
                            CxViewerAction.CxVSWebService.CxWSQueryVulnerabilityData[] scanData = null;
                            long scanId = 0;

                            ProjectScanStatuses status = _scanHelper.DoScan(project, IsIncremental, ref scanData, ref scanId);

                            if (status == ProjectScanStatuses.Success)
                            {
                                LoginData login = LoginHelper.LoadSaved();
                                PerspectiveHelper.ShowStored(scanData, login, scanId);
                                CommonActionsInstance.getInstance().ShowReportView();
                            }

                            CommonActionsInstance.getInstance().ClearScanProgressView();
                            CommonActionsInstance.getInstance().CloseScanProgressView();
                        }
                        catch (Exception err)
                        {
                            Logger.Create().Error(err);
                            LoginHelper.DoLogout();
                        }
                    });
                }
            }
            catch (Exception ex)
            {
                TopMostMessageBox.Show(ex.Message, "Error");
                Logger.Create().Error(ex.ToString());
            }
        }