Esempio n. 1
0
        private bool LoadBuildLog()
        {
            var projectShell = FindParent <ProjectShellViewModel>(true);

            if (projectShell.IsNew)
            {
                return(false);
            }

            string filePath = Path.ChangeExtension(projectShell.FilePath, BuildLog.FileExtension);

            if (File.Exists(filePath))
            {
                _buildLog = BuildLog.LoadFile(filePath);
            }

            if (_buildLog == null)
            {
                AppService.UI.ShowMessageDialog(
                    string.Format(AssemblyDefender.SR.LogFileNotValid, filePath),
                    MessageDialogType.Error);
                return(false);
            }

            return(true);
        }
        public bool ShowBuildErrorFromLog()
        {
            string projectFilePath = _projectShellViewModel.FilePath;

            if (string.IsNullOrEmpty(projectFilePath))
            {
                return(false);
            }

            string logFilePath = Path.ChangeExtension(projectFilePath, BuildLog.FileExtension);

            if (!File.Exists(logFilePath))
            {
                return(false);
            }

            var log = BuildLog.LoadFile(logFilePath);

            if (log == null)
            {
                return(false);
            }

            if (log.Error == null)
            {
                return(false);
            }

            ShowError(log.Error);
            return(true);
        }
        private BuildLog OpenLog()
        {
            if (string.IsNullOrEmpty(_logFilePath))
            {
                return(null);
            }

            if (!File.Exists(_logFilePath))
            {
                return(null);
            }

            var log = BuildLog.LoadFile(_logFilePath);

            if (log == null)
            {
                return(null);
            }

            return(log);
        }
Esempio n. 4
0
        private void LoadBuildLog()
        {
            if (string.IsNullOrEmpty(_filePath))
            {
                return;
            }

            string logFilePath = Path.ChangeExtension(_filePath, BuildLog.FileExtension);

            if (!File.Exists(logFilePath))
            {
                return;
            }

            var log = BuildLog.LoadFile(logFilePath);

            if (log == null)
            {
                return;
            }

            _hasBuildLog   = true;
            _lastBuildDate = log.BuildDate;
        }