Esempio n. 1
0
        void FinishProcessing(DesignError error)
        {
            if (error != null)
            {
                var errorLabel = new Label {
                    Text = error.Message, ToolTip = error.Details.ToString()
                };
                if (errorPanel.Visible)
                {
                    errorPanel.Content = errorLabel;
                }
                else
                {
                    errorContent = errorLabel;
                    errorTimer.Start();
                }
            }
            else
            {
                errorPanel.Visible = false;
                errorContent       = null;
            }

            if (processingCount > 1)
            {
                // process was requested while we were processing the last one, so redo
                processingCount = 1;
                timer.Start();
            }
            else
            {
                processingCount = 0;
            }
        }
Esempio n. 2
0
        void FinishProcessing(DesignError error)
        {
            if (error != null)
            {
                var errorLabel = new Label {
                    Text = error.Message, ToolTip = error.Details.ToString()
                };
                if (errorPanel.Visible)
                {
                    errorPanel.Content = errorLabel;
                }
                else
                {
                    errorContent = errorLabel;
                    errorTimer.Start();
                }
            }
            else
            {
                errorPanel.Visible = false;
                errorContent       = null;
            }

            //sw.Stop();
            //System.Diagnostics.Debug.WriteLine($"Elapsed: {sw.Elapsed}");

            //if (processingCount > 1)
            //{
            //	// process was requested while we were processing the last one, so redo
            //	processingCount = 1;
            //	timer.Start();
            //}
            //else
            //	processingCount = 0;
        }
Esempio n. 3
0
 public void Error(DesignError ex) => Host.Error?.Invoke(ex);