예제 #1
0
        /// <summary>
        /// Performs a Print Preview of the current view.
        /// </summary>
        //  Revision History
        //  MM/DD/YY Who Version Issue# Description
        //  -------- --- ------- ------ -------------------------------------------
        //  08/28/09 RCG 2.30.00        Created

        public void PrintPreview()
        {
            ResultsFlexGrid.PrintGrid(Path.GetFileName(m_strOpenFilePath),
                                      PrintGridFlags.ShowPreviewDialog | PrintGridFlags.FitToPageWidth | PrintGridFlags.ExtendLastCol,
                                      m_MeterID + Resources.ValidationResults,
                                      Resources.Tested + m_TestDate.ToString("G", CultureInfo.CurrentCulture));
        }
예제 #2
0
        /// <summary>
        /// Sets the style of the results cell based on the value that it contains.
        /// </summary>
        /// <param name="NewRow">The row to set.</param>
        //  Revision History
        //  MM/DD/YY Who Version ID Number Description
        //  -------- --- ------- -- ------ -------------------------------------------
        //  08/28/09 RCG 2.30.00           Created
        //  09/19/14 jrf 4.00.63 WR 534160 Setting cell style appropriately for new results.
        //  10/03/14 jrf 4.00.66 WR 534160 Using a separate style for displaying a check mark.
        private void SetResultStyle(Row NewRow)
        {
            int    iResultColIndex = ResultsFlexGrid.Cols["Result"].Index;
            string strResult       = NewRow["Result"] as string;

            if (strResult != null)
            {
                if (strResult.Equals(Resources.NoErrorsFound))
                {
                    ResultsFlexGrid.SetCellStyle(NewRow.Index, iResultColIndex, m_ResultPassedStyle);
                }
                else if (strResult.Equals(Resources.OK))
                {
                    ResultsFlexGrid.SetCellStyle(NewRow.Index, iResultColIndex, m_ResultCheckedStyle);
                }
                else if (strResult.Equals(Resources.Passed))
                {
                    ResultsFlexGrid.SetCellStyle(NewRow.Index, iResultColIndex, m_ResultPassedStyle);
                }
                else if (strResult.Equals(Resources.Failed))
                {
                    ResultsFlexGrid.SetCellStyle(NewRow.Index, iResultColIndex, m_ResultFailedStyle);
                }
                else if (strResult.Equals(Resources.Error) ||
                         (strResult.Equals(Resources.ErrorsFound)))
                {
                    ResultsFlexGrid.SetCellStyle(NewRow.Index, iResultColIndex, m_ResultFailedStyle);
                }
                else if (strResult.Equals(Resources.Skipped))
                {
                    ResultsFlexGrid.SetCellStyle(NewRow.Index, iResultColIndex, m_ResultSkippedStyle);
                }
            }
        }
예제 #3
0
        /// <summary>
        /// Exports the current view
        /// </summary>
        //  Revision History
        //  MM/DD/YY Who Version Issue# Description
        //  -------- --- ------- ------ -------------------------------------------
        //  08/28/09 RCG 2.30.00        Created

        public void Export(string strExportFile)
        {
            ResultsFlexGrid.SaveExcel(strExportFile, m_MeterID,
                                      FileFlags.IncludeFixedCells | FileFlags.AsDisplayed | FileFlags.SaveMergedRanges);
        }