Exemple #1
0
        public bool GetSubscriptionTimeout(string prompt, string eventAction, ref int timeout)
        {
            bool bOK          = false;
            int  localTimeout = timeout;

            _ownerWindow.Invoke(new Action(() =>
            {
                SubscriptionTimeoutForm form = new SubscriptionTimeoutForm();
                form.Prompt        = prompt;
                form.Timeout       = localTimeout.ToString();
                form.EventAction   = eventAction;
                form.StartPosition = FormStartPosition.CenterParent;
                bOK          = (form.ShowDialog(_ownerWindow) == DialogResult.OK);
                localTimeout = int.Parse(form.Timeout);
            }));

            timeout = localTimeout;
            return(bOK);
        }
Exemple #2
0
        public bool GetDelayTime(string prompt, ref int timeout)
        {
            bool bOK          = false;
            int  localTimeout = timeout;

            _ownerWindow.Invoke(new Action(() =>
            {
                SubscriptionTimeoutForm form = new SubscriptionTimeoutForm();
                form.Text          = "Define Delay Time";
                form.Prompt        = "Enter Delay Time for test (in seconds):";
                form.EventAction   = "WARNING: You must check relay output state during this time.";
                form.Timeout       = localTimeout.ToString();
                form.StartPosition = FormStartPosition.CenterParent;
                bOK          = (form.ShowDialog(_ownerWindow) == DialogResult.OK);
                localTimeout = int.Parse(form.Timeout);
            }));

            timeout = localTimeout;
            return(bOK);
        }