Example #1
0
        private void SaveButton_Click(object sender, RoutedEventArgs e)
        {
            if (FolderTextBox.Text.Length > 100)
            {
                Reporter.ToUser(eUserMsgKeys.FolderNamesAreTooLong);
                return;
            }

            try
            {
                if (Convert.ToInt16(SizeTextBox.Text.ToString()) < 50)
                {
                    Reporter.ToUser(eUserMsgKeys.FolderSizeTooSmall);
                    return;
                }
            }
            catch
            {
                return;
            }

            App.UserProfile.Solution.SaveSolution(true, SolutionGeneral.Solution.eSolutionItemToSave.ReportsSettings);

            // validate the pathes of inserted folders
            Ginger.Run.ExecutionLogger.GetLoggerDirectory(App.UserProfile.Solution.ExecutionLoggerConfigurationSetList.Where(x => (x.IsSelected == true)).FirstOrDefault().ExecutionLoggerConfigurationExecResultsFolder);
            Ginger.Reports.GingerExecutionReport.ExtensionMethods.GetReportDirectory(App.UserProfile.Solution.ExecutionLoggerConfigurationSetList.Where(x => (x.IsSelected == true)).FirstOrDefault().ExecutionLoggerConfigurationHTMLReportsFolder);

            App.AutomateTabGingerRunner.ExecutionLogger.Configuration = App.UserProfile.Solution.ExecutionLoggerConfigurationSetList.Where(x => (x.IsSelected == true)).FirstOrDefault();
            _pageGenericWin.Hide();
        }
        private void SaveButton_Click(object sender, RoutedEventArgs e)
        {
            _HTMLReportConfiguration.Name        = NewTemplateNameTextBox.Text.ToString();
            _HTMLReportConfiguration.Description = TemplateDescriptionTextBox.Text.ToString();
            _newHTMLReportConfiguration          = _HTMLReportConfiguration;
            _pageGenericWin.Hide();
            WorkSpace.Instance.Solution.SaveSolution(true, SolutionGeneral.Solution.eSolutionItemToSave.ReportConfiguration);

            if (_existingTemplatePage)
            {
                Reporter.ToStatus(eStatusMsgKey.SaveItem, null, _HTMLReportConfiguration.GetNameForFileName(), "item");
                WorkSpace.Instance.SolutionRepository.SaveRepositoryItem(_HTMLReportConfiguration);
                Reporter.HideStatusMessage();
            }
        }
        private void SaveButton_Click(object sender, RoutedEventArgs e)
        {
            _HTMLReportConfiguration.Name        = NewTemplateNameTextBox.Text.ToString();
            _HTMLReportConfiguration.Description = TemplateDescriptionTextBox.Text.ToString();
            _newHTMLReportConfiguration          = _HTMLReportConfiguration;
            _pageGenericWin.Hide();

            App.UserProfile.Solution.HTMLReportsConfigurationSetList.Where(x => (x.IsSelected == true)).FirstOrDefault().HTMLReportTemplatesSeq = App.UserProfile.Solution.HTMLReportsConfigurationSetList.Where(x => (x.IsSelected == true)).FirstOrDefault().HTMLReportTemplatesSeq + 1;
            App.UserProfile.Solution.SaveSolution(true, SolutionGeneral.Solution.eSolutionItemToSave.ReportConfiguration);

            if (_existingTemplatePage)
            {
                Reporter.ToGingerHelper(eGingerHelperMsgKey.SaveItem, null, _HTMLReportConfiguration.GetNameForFileName(), "item");
                WorkSpace.Instance.SolutionRepository.SaveRepositoryItem(_HTMLReportConfiguration);
                Reporter.CloseGingerHelper();
            }
        }