Пример #1
0
        void timer_Tick(object sender, EventArgs e)
        {
            NugetLogEventArgs log;
            while (tempLogEvents.TryDequeue(out log))
            {
                lastLog = log;
            }

            if (lastLog == null)
            {
                return;
            }

            var logMessage = lastLog.Message;
            if (lastLog.Level != MessageLevel.Debug && lastLog.Level != MessageLevel.Info)
            {
                logMessage = lastLog.Level + ": " + logMessage;
            }

            var label = logMessage;
            if (logMessage.IsEmpty()) label = "Ready";
            if (launcher.IsProcessing)
            {
                label = logMessage + string.Concat(Enumerable.Repeat(".", (loadingStep & 3) + 1));
            }
            logLabel.InvokeSafe(() =>
            {
                logLabel.Text = label;
            });
            loadingStep++;
        }
Пример #2
0
 private void OnLogAvailable(NugetLogEventArgs e)
 {
     var handler = LogAvailable;
     if (handler != null) handler(this, e);
 }
Пример #3
0
 void launcher_LogAvailable(object sender, NugetLogEventArgs e)
 {
     tempLogEvents.Enqueue(e);
 }
Пример #4
0
 static void launcherApp_LogAvailable(object sender, NugetLogEventArgs e)
 {
     Console.WriteLine(e);
 }