Ejemplo n.º 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++;
        }
Ejemplo n.º 2
0
 private void OnLogAvailable(NugetLogEventArgs e)
 {
     var handler = LogAvailable;
     if (handler != null) handler(this, e);
 }
Ejemplo n.º 3
0
 void launcher_LogAvailable(object sender, NugetLogEventArgs e)
 {
     tempLogEvents.Enqueue(e);
 }
Ejemplo n.º 4
0
 static void launcherApp_LogAvailable(object sender, NugetLogEventArgs e)
 {
     Console.WriteLine(e);
 }