Example #1
0
        public static void ShowDialog(Form sender, UserControl userControl, bool allowEnterToClose = true,
            bool allowEscToClose = true)
        {
            using (frmFadeIn _fFade = new frmFadeIn(sender, allowEnterToClose, allowEscToClose))
            {
                _fFade.UserMadeControl = userControl;
                _fFade.Show();

                while (Prompt.OnQueue)
                    Prompt.PauseForMilliSeconds(100);
            }
        }
Example #2
0
        public static void ShowDialog(Form sender, string message, string title, 
            PromptType promptType, bool allowEnterToClose = true)
        {
            switch (promptType)
            {
                case PromptType.InputBox:
                    using (frmFadeIn _fFade = new frmFadeIn(sender, allowEnterToClose))
                    {
                        _fFade.UserMadeControl = new InputBoxCtrl(message, title);
                        _fFade.Show();

                        while (OnQueue)
                            PauseForMilliSeconds(100);
                    }
                break;

                case PromptType.Error:
                using (frmFadeIn _fFade = new frmFadeIn(sender, allowEnterToClose))
                    {
                        _fFade.UserMadeControl = new ErrorCtrl(message, title);
                        _fFade.Show();

                        while (OnQueue)
                            PauseForMilliSeconds(100);
                    }
                break;
                case PromptType.Information:
                    using (frmFadeIn _fFade = new frmFadeIn(sender, allowEnterToClose))
                    {
                        _fFade.UserMadeControl = new InputBoxCtrl("Enter Name", "Information");
                        _fFade.Show();

                        while (OnQueue)
                            PauseForMilliSeconds(100);
                    }
                break;
            }            
        }