示例#1
0
        static Color GetResultColor(ProcessingState state)
        {
            switch (state)
            {
            case ProcessingState.FinishedSuccesfully:
                return(Color.LightGreen);

            case ProcessingState.FinishedWithErrors:
                return(Color.LightCoral);

            case ProcessingState.InProgress:
                return(Color.Yellow);

            case ProcessingState.NotStarted:
                throw new InvalidOperationException(state.ToString());

            default:
                throw new NotImplementedException(state.ToString());
            }
        }