/**
         *
         *  Called when the openButton's <code>rollOver</code> event is dispatched. This function opens
         *  the drop down, or opens the drop down after the length of time specified by the
         *  <code>rollOverOpenDelay</code> property.
         */
        internal void OpenButtonRollOverHandler(Event e)
        {
            if (null == RolloverOpenDelay)
            {
                return;
            }

            if (RolloverOpenDelay == 0)
            {
                OpenDropDownHelper();
            }
            else
            {
                OpenButton.AddEventListener(MouseEvent.ROLL_OUT, OpenButtonRollOutHandler);
                _rollOverOpenDelayTimer = new Timer((float)RolloverOpenDelay, 1);
                _rollOverOpenDelayTimer.AddEventListener(Timer.COMPLETE, rollOverDelay_timerCompleteHandler);
                _rollOverOpenDelayTimer.Start();
            }
        }
Beispiel #2
0
        private void DoLogin()
        {
            if (null != _mask) // already logging in
            {
                return;
            }

            _controlToFocus = null;

            if (string.IsNullOrEmpty(_txtUsername.Text))
            {
                Alert.Show("Error", @"Username must not be empty", AlertButtonFlag.Ok, FocusBack);
                _controlToFocus = _txtUsername;
                return;
            }
            if (string.IsNullOrEmpty(_txtPassword.Text))
            {
                Alert.Show("Error", @"Password must not be empty", AlertButtonFlag.Ok, FocusBack);
                _controlToFocus = _txtPassword;
                return;
            }

            _username = _txtUsername.Text;
            _password = _txtPassword.Text;

            if (SendMode == SendMode.SimulateSending) // just simulate sending
            {
                _mask = new LoadingMask(this, "Logging in...");
                _timer.AddEventListener(Timer.COMPLETE, LogInHandler); // simulating sent result after 3 seconds
                _timer.Start();
            }
            else // notify the world
            {
                DispatchLoginEvent();
            }
        }
        /**
         *  
         *  Called when the openButton's <code>rollOver</code> event is dispatched. This function opens 
         *  the drop down, or opens the drop down after the length of time specified by the 
         *  <code>rollOverOpenDelay</code> property.
         */ 
        internal void OpenButtonRollOverHandler(Event e)
        {
            if (null == RolloverOpenDelay)
                return;

            if (RolloverOpenDelay == 0)
                OpenDropDownHelper();
            else
            {
                OpenButton.AddEventListener(MouseEvent.ROLL_OUT, OpenButtonRollOutHandler);
                _rollOverOpenDelayTimer = new Timer((float) RolloverOpenDelay, 1);
                _rollOverOpenDelayTimer.AddEventListener(Timer.COMPLETE, rollOverDelay_timerCompleteHandler);
                _rollOverOpenDelayTimer.Start();
            }
        }