Example #1
0
        private void OnBuildDone(vsBuildScope Scope, vsBuildAction Action)
        {
            FartOptions options = (FartOptions)GetDialogPage(typeof(FartOptions));

            if (!options.Enabled)
            {
                return;
            }

            bool isSuccess = _dte.Solution.SolutionBuild.LastBuildInfo == 0;

            if (isSuccess)
            {
                _successfulBuilds++;

                if (_hasBuildFailed)
                {
                    SetBuildMessage();
                }
            }
            else
            {
                FartPlayer.PlayFart(options.SelectedErrorFart);
                _hasBuildFailed   = true;
                _successfulBuilds = 0;
            }
        }
Example #2
0
        private void OnBuildDone(vsBuildScope Scope, vsBuildAction Action)
        {
            Dispatcher.CurrentDispatcher.BeginInvoke(new Action(() => // Execute after VS finishes its tasks
            {
                FartOptions options = (FartOptions)GetDialogPage(typeof(FartOptions));

                if (options.Enabled)
                {
                    bool isSuccess = _dte.Solution.SolutionBuild.LastBuildInfo == 0;
                    Fart(isSuccess, options);

                    if (isSuccess)
                    {
                        _successfulBuilds++;

                        if (_hasBuildFailed)
                        {
                            SetBuildMessage();
                        }
                    }
                    else
                    {
                        _hasBuildFailed   = true;
                        _successfulBuilds = 0;
                    }
                }
            }), DispatcherPriority.ApplicationIdle, null);
        }
Example #3
0
        private void Fart(bool isSuccess, FartOptions options)
        {
            bool hasWarnings = _dte.ToolWindows.ErrorList.ErrorItems.Count > 0;

            if (!isSuccess)
                FartPlayer.PlayFart(options.SelectedErrorFart);

            else if (isSuccess && hasWarnings)
                FartPlayer.PlayFart(options.SelectedWarningFart);
        }
Example #4
0
        private void Fart(bool isSuccess, FartOptions options)
        {
            bool hasWarnings = _dte.ToolWindows.ErrorList.ErrorItems.Count > 0;

            if (!isSuccess)
            {
                FartPlayer.PlayFart(options.SelectedErrorFart);
            }

            else if (isSuccess && hasWarnings)
            {
                FartPlayer.PlayFart(options.SelectedWarningFart);
            }
        }