예제 #1
0
        private void LoginPage_Loaded(object sender, RoutedEventArgs e)
        {
            // Automatically insert the user name last entered as the login, retrieved
            // from isolated storage
            UserNameTextbox.Text = ConfigurationSettings.LastUserName;

            if (string.IsNullOrEmpty(UserNameTextbox.Text))
            {
                UserNameTextbox.Focus();
            }
            else
            {
                PasswordTextbox.Focus();
            }
        }
예제 #2
0
        //------------------------------ Private --------------------------------------
        void loginPageLoaded(object sender, RoutedEventArgs e)
        {
            System.Windows.Browser.HtmlPage.Plugin.Focus();
            UserNameTextbox.Focus();
            //var _tbap = new TextBoxAutomationPeer(UserNameTextbox);
            //( (IValueProvider) _tbap ).SetValue("?");
            // Automatically insert the user name last entered as the login, retrieved from isolated storage
            //UserNameTextbox.Text = ConfigurationSettings.LastUserName;

            if (UserNameTextbox.Text.Length == 0)
            {
                UserNameTextbox.Focus();
            }
            else
            {
                PasswordTextbox.Focus();
            }
        }
예제 #3
0
 protected void Page_Load(object sender, EventArgs e)
 {
     UserNameTextbox.Focus();
 }
예제 #4
0
 private void SetUserName(string UserName)
 {
     Logger.InfoFormat("Is username box displayed? {0}", UserNameTextbox.Displayed);
     UserNameTextbox.Clear();
     UserNameTextbox.SendKeys(UserName);
 }