コード例 #1
0
        private void NpmController_CommandCompleted(object sender, NpmCommandCompletedEventArgs e)
        {
            lock (_commandCountLock) {
                --_npmCommandsExecuting;
                if (_npmCommandsExecuting < 0)
                {
                    _npmCommandsExecuting = 0;
                }
            }

            string message;

            if (e.WithErrors)
            {
                message = SR.GetString(
                    e.Cancelled ? SR.NpmCancelledWithErrors : SR.NpmCompletedWithErrors,
                    e.CommandText
                    );
            }
            else if (e.Cancelled)
            {
                message = SR.GetString(SR.NpmCancelled, e.CommandText);
            }
            else
            {
                message = SR.GetString(SR.NpmSuccessfullyCompleted, e.CommandText);
            }

            ForceUpdateStatusBarWithNpmActivitySafe(message);

            StopNpmIdleTimer();
            _npmIdleTimer = new Timer(
                _ => ProjectMgr.Site.GetUIThread().Invoke(() => _projectNode.CheckForLongPaths(e.Arguments).HandleAllExceptions(SR.ProductName).DoNotWait()),
                null, 1000, Timeout.Infinite);
        }
コード例 #2
0
 private static string GetStatusBarMessage(NpmCommandCompletedEventArgs e)
 {
     if (e.WithErrors)
     {
         return(string.Format(CultureInfo.CurrentCulture,
                              e.Cancelled ? Resources.NpmCancelledWithErrors : Resources.NpmCompletedWithErrors,
                              e.CommandText));
     }
     else if (e.Cancelled)
     {
         return(string.Format(CultureInfo.CurrentCulture, Resources.NpmCancelled, e.CommandText));
     }
     return(string.Format(CultureInfo.CurrentCulture, Resources.NpmSuccessfullyCompleted, e.CommandText));
 }
コード例 #3
0
 private static string GetStatusBarMessage(NpmCommandCompletedEventArgs e)
 {
     if (e.WithErrors)
     {
         return(SR.GetString(
                    e.Cancelled ? SR.NpmCancelledWithErrors : SR.NpmCompletedWithErrors,
                    e.CommandText));
     }
     else if (e.Cancelled)
     {
         return(SR.GetString(SR.NpmCancelled, e.CommandText));
     }
     return(SR.GetString(SR.NpmSuccessfullyCompleted, e.CommandText));
 }
コード例 #4
0
        private void NpmController_CommandCompleted(object sender, NpmCommandCompletedEventArgs e)
        {
            lock (this._commandCountLock)
            {
                --this._npmCommandsExecuting;
                if (this._npmCommandsExecuting < 0)
                {
                    this._npmCommandsExecuting = 0;
                }
            }

            var message = GetStatusBarMessage(e);

            ForceUpdateStatusBarWithNpmActivitySafe(message);
        }
コード例 #5
0
        private void NpmController_CommandCompleted(object sender, NpmCommandCompletedEventArgs e)
        {
            lock (_commandCountLock) {
                --_npmCommandsExecuting;
                if (_npmCommandsExecuting < 0)
                {
                    _npmCommandsExecuting = 0;
                }
            }

            var message = GetStatusBarMessage(e);

            ForceUpdateStatusBarWithNpmActivitySafe(message);

            StopNpmIdleTimer();
            _npmIdleTimer = new Timer(
                _ => ProjectMgr.Site.GetUIThread().Invoke(() => _projectNode.CheckForLongPaths(e.Arguments).HandleAllExceptions(SR.ProductName).DoNotWait()),
                null, 1000, Timeout.Infinite);
        }
コード例 #6
0
 public void LogCommandCompleted(object sender, NpmCommandCompletedEventArgs e)
 {
     OnCommandCompleted(e.Arguments, e.WithErrors, e.Cancelled);
 }
コード例 #7
0
ファイル: NpmCommander.cs プロジェクト: paladique/nodejstools
 private void command_CommandCompleted(object sender, NpmCommandCompletedEventArgs e) {
     OnCommandCompleted(e.Arguments, e.WithErrors, e.Cancelled);
 }
コード例 #8
0
 private void commander_CommandCompleted(object sender, NpmCommandCompletedEventArgs e)
 {
     IsExecutingCommand = false;
     Application.Current.Dispatcher.BeginInvoke(
         new Action(HandleCompletionSafe));
 }
コード例 #9
0
 public void LogCommandCompleted(object sender, NpmCommandCompletedEventArgs e) {
     OnCommandCompleted(e.Arguments, e.WithErrors, e.Cancelled);
 }
コード例 #10
0
 private void NpmWorker_CommandCompleted(object sender, NpmCommandCompletedEventArgs e)
 {
     this.IsExecutingCommand = false;
 }
コード例 #11
0
 private void command_CommandCompleted(object sender, NpmCommandCompletedEventArgs e)
 {
     OnCommandCompleted(e.Arguments, e.WithErrors, e.Cancelled);
 }
コード例 #12
0
 private void NpmController_CommandCompleted(object sender, NpmCommandCompletedEventArgs e)
 {
     this._operationProgressService.CompleteAndCleanupStage(this._npmCommandStageId);
 }