示例#1
0
 private void Login_OnClick(object sender, RoutedEventArgs e)
 {
     if (new UserFunction().Login(Username.Text, Password.Password))
     {
         var menuPrincipal = new MenuPrincipal();
         int userId        = new UserFunction().GetUserId(Username.Text, Password.Password);
         menuPrincipal.UserId.Text   = userId.ToString();
         menuPrincipal.Username.Text = Username.Text;
         menuPrincipal.Show();
         Close();
     }
 }
示例#2
0
        public void UserFunctionToStringCountTest()
        {
            var exp = new UserFunction("f", 3);

            Assert.Equal("f(x1, x2, x3)", exp.ToString(commoonFormatter));
        }
示例#3
0
        public void UserFunctionToStringArgTest()
        {
            var exp = new UserFunction("f", new[] { new Number(5), new Number(2) }, 1);

            Assert.Equal("f(5, 2)", exp.ToString(commoonFormatter));
        }