public void Post(Message message)
        {
            logger.Info("Posting message: " + message.MessageType.ToString());

            foreach (var handler in handlers)
            {
                handler(message);
            }
        }
        private void HandleMessage(Msg.Message msg)
        {
            switch (msg.MessageType)
            {
            case MessageType.SUBTYPES_LOADED:
                ProductSubTypeSelectable = true;
                break;

            case MessageType.SUBTYPES_UNLOADED:
                ProductSubTypeSelectable = false;
                break;

            case MessageType.SUBTYPES_UPDATED:
                LoadSubTypes(ProductType.Id);
                break;

            default:
                break;
            }
        }
        private void MessageHandler(Message message)
        {
            switch (message.MessageType)
            {
                case MessageType.STATUS_CHANGED:
                    Status = message.Data as string;
                    break;
                case MessageType.PROGRESS_UPDATED:
                    ProgressValue = (int)message.Data;
                    break;
                case MessageType.PROGRESS_STARTED:
                    ShowProgress = true;
                    break;
                case MessageType.PROGRESS_FINISHED:
                    ShowProgress = false;
                    break;
                case MessageType.UPDATES_AVAILABLE:
                    UpdateColorNotify = true;
                    break;

                default:
                    break;
            }
        }