コード例 #1
0
ファイル: ReportControl.cs プロジェクト: swatt6400/NetOffice
        /// <summary>
        /// Creates an instance of the class
        /// </summary>
        /// <param name="report">detailed report</param>
        /// <param name="currentLanguageID">current user language id</param>
        public ReportControl(AnalyzerResult report, int currentLanguageID)
        {
            InitializeComponent();
            if (null == report.Report)
                return;
            _report = report;
            _currentLanguageID = currentLanguageID;
            comboBoxFilter.SelectedIndex = 0;

            Translation.Translator.AutoTranslateControls(this, "OfficeCompatibility - Report", "ToolboxControls.OfficeCompatibility.Report.txt", currentLanguageID);

            pictureBoxField.Image = imageList1.Images[3];
            pictureBoxProperty.Image = imageList1.Images[7];
            pictureBoxMethod.Image = imageList1.Images[5];
            if (treeViewReport.Nodes.Count > 0)
                treeViewReport.SelectedNode = treeViewReport.Nodes[0];
        }
コード例 #2
0
        /// <summary>
        /// Creates an instance of the class
        /// </summary>
        /// <param name="report">detailed report</param>
        public ReportControl(AnalyzerResult report)
        {
            InitializeComponent();
            if (null == report.Report)
            {
                return;
            }
            _report = report;
            comboBoxFilter.SelectedIndex = 0;

            pictureBoxField.Image    = imageList1.Images[3];
            pictureBoxProperty.Image = imageList1.Images[7];
            pictureBoxMethod.Image   = imageList1.Images[5];
            if (treeViewReport.Nodes.Count > 0)
            {
                treeViewReport.SelectedNode = treeViewReport.Nodes[0];
            }
        }
コード例 #3
0
        private void buttonRefresh_Click(object sender, EventArgs e)
        {
            try
            {
                HideError();

                AssemblyDefinition assemblyDefinition = AssemblyDefinition.ReadAssembly(_assemblyFullFileName);
                textBoxAssembly.Text = assemblyDefinition.Name.ToString();

                _result = AssemblyAnalyzer.AnalyzeAssembly(assemblyDefinition);
                if (_result.ContainsNetOfficeReferences)
                {
                    buttonRefresh.Enabled = true;
                    buttonReport.Enabled  = true;
                    SetupVersionInfo(_result.Office, "Office");
                    SetupVersionInfo(_result.Excel, "Excel");
                    SetupVersionInfo(_result.Word, "Word");
                    SetupVersionInfo(_result.Outlook, "Outlook");
                    SetupVersionInfo(_result.PowerPoint, "PowerPoint");
                    SetupVersionInfo(_result.Access, "Access");
                    SetupVersionInfo(_result.Project, "Project");
                    SetupVersionInfo(_result.Visio, "Visio");
                }
                else
                {
                    buttonRefresh.Enabled = false;
                    buttonReport.Enabled  = false;
                    ShowNoNetOfficeError();
                }
            }
            catch (BadImageFormatException)
            {
                buttonRefresh.Enabled = false;
                buttonReport.Enabled  = false;
                ShowBadImageFormatError();
            }
            catch (Exception exception)
            {
                ShowUnexpectedError(exception);
            }
        }
コード例 #4
0
        /// <summary>
        /// Creates an instance of the class
        /// </summary>
        /// <param name="report">detailed report</param>
        /// <param name="currentLanguageID">current user language id</param>
        public ReportControl(AnalyzerResult report, int currentLanguageID)
        {
            InitializeComponent();
            if (null == report.Report)
            {
                return;
            }
            _report                      = report;
            _currentLanguageID           = currentLanguageID;
            comboBoxFilter.SelectedIndex = 0;

            Translation.Translator.AutoTranslateControls(this, "OfficeCompatibility - Report", "ToolboxControls.OfficeCompatibility.Report.txt", currentLanguageID);

            pictureBoxField.Image    = imageList1.Images[3];
            pictureBoxProperty.Image = imageList1.Images[7];
            pictureBoxMethod.Image   = imageList1.Images[5];
            if (treeViewReport.Nodes.Count > 0)
            {
                treeViewReport.SelectedNode = treeViewReport.Nodes[0];
            }
        }
コード例 #5
0
        private void buttonRefresh_Click(object sender, EventArgs e)
        {
            try
            {
                HideError();

                AssemblyDefinition assemblyDefinition = AssemblyDefinition.ReadAssembly(_assemblyFullFileName);
                textBoxAssembly.Text = assemblyDefinition.Name.ToString();

                _result = AssemblyAnalyzer.AnalyzeAssembly(assemblyDefinition);
                if (_result.ContainsNetOfficeReferences)
                {
                    buttonRefresh.Enabled = true;
                    buttonReport.Enabled = true;
                    SetupVersionInfo(_result.Office, "Office");
                    SetupVersionInfo(_result.Excel, "Excel");
                    SetupVersionInfo(_result.Word, "Word");
                    SetupVersionInfo(_result.Outlook, "Outlook");
                    SetupVersionInfo(_result.PowerPoint, "PowerPoint");
                    SetupVersionInfo(_result.Access, "Access");
                    SetupVersionInfo(_result.Project, "Project");
                    SetupVersionInfo(_result.Visio, "Visio");
                }
                else
                {
                    buttonRefresh.Enabled = false;
                    buttonReport.Enabled = false;
                    ShowNoNetOfficeError();
                }
            }
            catch (BadImageFormatException)
            {
                    buttonRefresh.Enabled = false;
                    buttonReport.Enabled = false;
                    ShowBadImageFormatError();
            }
            catch (Exception exception)
            {
                ShowUnexpectedError(exception);
            }
        }