Ejemplo n.º 1
0
 static public DialogResult Show(string text, string caption = "Warning", MessageBoxButtons buttons = MessageBoxButtons.OK, MessageBoxIcon icon = MessageBoxIcon.None, Icon windowicon = null)
 {
     using (MessageBoxTheme msg = new MessageBoxTheme(text, caption, buttons, icon, windowicon))
     {
         return(msg.ShowDialog(Application.OpenForms[0]));
     }
 }
Ejemplo n.º 2
0
        // null in caption prints "Warning"

        static public DialogResult Show(IWin32Window window, string text, string caption = null, MessageBoxButtons buttons = MessageBoxButtons.OK, MessageBoxIcon icon = MessageBoxIcon.None, Icon windowicon = null)
        {
            using (MessageBoxTheme msg = new MessageBoxTheme(text, caption, buttons, icon, windowicon))
            {
                return(msg.ShowDialog(window));
            }
        }
Ejemplo n.º 3
0
        static public MessageBoxTheme ShowModeless(IWin32Window window, string text, string caption = "Warning", MessageBoxIcon icon = MessageBoxIcon.None, Icon windowicon = null)
        {
            MessageBoxTheme msg = new MessageBoxTheme(text, caption, null, icon, windowicon);

            msg.Show(window);
            return(msg);
        }
Ejemplo n.º 4
0
        static public DialogResult Show(IWin32Window window, string text, string caption = "EDDiscovery Message", MessageBoxButtons buttons = MessageBoxButtons.OK, MessageBoxIcon icon = MessageBoxIcon.None)
        {
            MessageBoxTheme msg = new MessageBoxTheme();

            msg.StartPosition = FormStartPosition.CenterParent;
            msg.Init(text, caption, buttons, icon, ThemeableFormsInstance.Instance?.MessageBoxWindowIcon);
            return(msg.ShowDialog(window));
        }
Ejemplo n.º 5
0
        static public DialogResult Show(IWin32Window window, string text, string caption = "Warning", MessageBoxButtons buttons = MessageBoxButtons.OK, MessageBoxIcon icon = MessageBoxIcon.None, Icon windowicon = null)
        {
            MessageBoxTheme msg = new MessageBoxTheme();

            msg.StartPosition = FormStartPosition.CenterParent;
            msg.Init(text, caption, buttons, icon, windowicon);
            return(msg.ShowDialog(window));
        }
Ejemplo n.º 6
0
        static public DialogResult Show(string text, string caption = "EDDiscovery Message", MessageBoxButtons buttons = MessageBoxButtons.OK, MessageBoxIcon icon = MessageBoxIcon.None)
        {
            MessageBoxTheme msg = new MessageBoxTheme();

            msg.StartPosition = FormStartPosition.CenterScreen;
            msg.Init(text, caption, buttons, icon);
            return(msg.ShowDialog());
        }
Ejemplo n.º 7
0
        static public DialogResult Show(string text, string caption = "EDDiscovery Message", MessageBoxButtons buttons = MessageBoxButtons.OK, MessageBoxIcon icon = MessageBoxIcon.None)
        {
            MessageBoxTheme msg = new MessageBoxTheme();

            msg.StartPosition = FormStartPosition.CenterScreen;
            msg.Init(text, caption, buttons, icon, ThemeableFormsInstance.Instance?.MessageBoxWindowIcon);
            Form f = Application.OpenForms[0];

            return(msg.ShowDialog(f));
        }
Ejemplo n.º 8
0
        static public DialogResult Show(string text, string caption = "Warning", MessageBoxButtons buttons = MessageBoxButtons.OK, MessageBoxIcon icon = MessageBoxIcon.None, Icon windowicon = null)
        {
            MessageBoxTheme msg = new MessageBoxTheme();

            msg.StartPosition = FormStartPosition.CenterScreen;
            msg.Init(text, caption, buttons, icon, windowicon);
            Form f = Application.OpenForms[0];

            return(msg.ShowDialog(f));
        }
Ejemplo n.º 9
0
        private void buttonTest_Click(object sender, EventArgs e)
        {
            string target = textBoxSendTo.Text;

            if (target.HasChars())
            {
                if (target == BaseUtils.EnhancedSendKeys.CurrentWindow || target.Equals(DefaultProcessID))
                {
                    MessageBoxTheme.Show(this, "Name a process to test sending keys".TxID(ECIDs.KeyForm_NOPN));
                }
                else
                {
                    string err = BaseUtils.EnhancedSendKeys.SendToProcess(textBoxKeys.Text, DefaultDelay <= DefaultDelayID ? 10 : DefaultDelay, 2, 2, textBoxSendTo.Text, additionalkeyparser);
                    if (err.Length > 0)
                    {
                        MessageBoxTheme.Show(this, string.Format("Error {0} - check entry".TxID(ECIDs.KeyForm_KERR), err));
                    }
                }
            }
            else
            {
                MessageBoxTheme.Show(this, "No process names to send keys to".TxID(ECIDs.KeyForm_NOP));
            }
        }
Ejemplo n.º 10
0
        private void buttonTest_Click(object sender, EventArgs e)
        {
            string target = textBoxSendTo.Text;

            if (target.HasChars())
            {
                if (target == BaseUtils.EnhancedSendKeys.CurrentWindow)
                {
                    MessageBoxTheme.Show("Name a process to test sending keys");
                }
                else
                {
                    string err = BaseUtils.EnhancedSendKeys.Send(textBoxKeys.Text, DefaultDelay, 2, 2, textBoxSendTo.Text);
                    if (err.Length > 0)
                    {
                        MessageBoxTheme.Show("Error " + err + " - check entry");
                    }
                }
            }
            else
            {
                MessageBoxTheme.Show("No process names to send keys to");
            }
        }