Exemplo n.º 1
0
    void Awake()
    {
        user_jsonString = File.ReadAllText(Application.dataPath + "/Resources/User.json");
        Debug.Log(user_jsonString);
        IList userInfo = (IList)Json.Deserialize(user_jsonString);

        foreach (IDictionary person in userInfo)
        {
            username = (string)person ["username"];
            Debug.Log("username:"******"avatar"];
            Debug.Log("avatar:" + avatar);
            IList deck = (IList)person ["deck"];
            int   i    = 0;
            foreach (long card in deck)
            {
                Debug.Log("card:" + card);
                array [i++] = unchecked ((int)card);
            }
        }



        _instance = this;
        this.GetComponent <UISprite> ().spriteName = avatar;
        //print (this.GetComponent<UISprite> ().spriteName);
    }
Exemplo n.º 2
0
        protected void Button1_Click(object sender, EventArgs e)
        {
            SqlConnection con = new SqlConnection(connStr);

            con.Open();
            string role = "seeker";

            if (Company.Visible == true)
            {
                role = "recruiter";
            }
            else
            {
                role = "seeker";
            }
            string     sql1 = "insert into account (username,password,role) values('" + TextBox1.Text + "','" + TextBox2.Text + "','" + role + "')";
            SqlCommand cmd2 = new SqlCommand(sql1, con);

            cmd2.ExecuteNonQuery();
            con.Close();
            if (Company.Visible == true && Profile1.Visible == false)
            {
                Company.executeData(TextBox1.Text);
            }
            else if (Profile1.Visible == true && Company.Visible == false)
            {
                Profile1.executeData(TextBox1.Text);
            }
            Response.Redirect("~/Login.aspx");
        }
Exemplo n.º 3
0
        public void Profile_All_Mappings_Are_Valid()
        {
            // arrange
            var profile = new Profile1();

            // act
            var result = profile.ValidateExpression();

            // assert
            result.Success.Should().BeTrue();
            result.ExpressionResults.Count.Should().Be(0);
        }
Exemplo n.º 4
0
        public void Add_Profile_By_Instance_Is_Stored()
        {
            // arrange
            var p1 = new Profile1();

            _subject.Profiles.Should().BeEmpty();

            // act
            _subject.AddProfile(p1);

            // assert
            _subject.Profiles.Should().Contain(x => x.GetType() == p1.GetType());
        }
Exemplo n.º 5
0
        public void Adding_Same_Profile_By_Instance_Twice_Will_Not_Double_Up()
        {
            // arrange
            var p1 = new Profile1();

            _subject.Profiles.Should().BeEmpty();

            // act
            _subject.AddProfile(p1);
            _subject.AddProfile(p1);

            // assert
            _subject.Profiles.ToList().Count.Should().Be(1);
        }
Exemplo n.º 6
0
    public void Handle(Profile1 request)
    {
        ProfileModel profile = _mapper.Map <Profile1, ProfileModel>(request);

        _db.Profiles.Add(profile);
        try
        {
            db.SaveChanges();
        }
        catch (Exception ex)
        {
            throw;
        }
        return(profile);
    }
        public void setupBasicProfile()
        {
            var profile = new Profile1();

            _validator = new ClassValidator <Model1>(profile.MappingExpressions.OfType <IMappingExpression <Model1> >().Single(), _settings);
        }