public CustomMessageBox(CustomMesageBoxTypes type, string text)
        {
            InitializeComponent();
            windowType = type;

            switch (type)
            {
            case CustomMesageBoxTypes.Alert:
                InitAsAlert(text);
                break;

            case CustomMesageBoxTypes.Edit:
                InitAsEdit(text);
                break;

            case CustomMesageBoxTypes.Error:
                InitAsError(text);
                break;

            case CustomMesageBoxTypes.Message:
                InitAsMessage(text);
                break;

            default:
                throw new Exception("No CustomMessageBox type selected!!!");
            }
        }
        public static bool Show(CustomMesageBoxTypes type, ref string text)
        {
            CustomMessageBox mb = new CustomMessageBox(type, text);

            mb.ShowDialog();
            text = mb.GetEditedText();
            return(mb.GetExitState());
        }
        public static bool Show(CustomMesageBoxTypes type, string text)
        {
            if (type == CustomMesageBoxTypes.Edit)
            {
                throw new Exception("CustomMessageBoxType Edit must have reference value!!!");
            }
            CustomMessageBox mb = new CustomMessageBox(type, text);

            mb.ShowDialog();
            return(mb.GetExitState());
        }
        public void SetFrame(CustomMesageBoxTypes type)
        {
            switch (type)
            {
            case CustomMesageBoxTypes.Alert:
                windowBorder.BorderThickness = new Thickness(1);
                windowBorder.BorderBrush     = Brushes.Yellow;
                break;

            case CustomMesageBoxTypes.Edit:
                break;

            case CustomMesageBoxTypes.Error:
                windowBorder.BorderThickness = new Thickness(1);
                windowBorder.BorderBrush     = Brushes.Red;
                break;

            case CustomMesageBoxTypes.Message:
                break;

            default:
                throw new Exception("No CustomMessageBox type selected!!!");
            }
        }