welcome to storybrooke.com pioneers : kai miao yulu liu linlin zhu guangshuo zang
TRANSCRIPT
Register and Login
Function:
• register using the
username password
and email.
• If forget password
will go to register
page.
Function:
• Login using the
username and
password.
• If forget password
will go to register
page.
Register and Login
Codes Behind• public class User• {• public string name;• public string sessionID;• public User(string id, string name)• {• this.name = name;• this.sessionID = id;• }• }
• public class Users : IEnumerable• {• private ArrayList users;• public Users()• {• users = new ArrayList();• }• public void Add(string id, string name)• {• User u = new User(id, name);• users.Add(u);• }• public IEnumerator GetEnumerator()• {• for (int index = 0; index < users.Count; ++index)• {• • yield return users[index];
• • }• }
• public User GetUserByID(string id)• {• foreach (User u in users)• if (u.sessionID == id)• return u;• return null;• }
• public User GetUserByName(string name)• {• foreach (User u in users)• if (u.name == name)• return u;• return null;• }• • public void DeleteBySessionID(string id)• {• for (int i = 0; i < users.Count; ++i)• {• if (((User)users[i]).sessionID == id)• users.RemoveAt(i);• }• }
Walk in Virtual City---Map View
After login Registration, come to the City Map.
User----Click on the map and enter into a street.
Walk in Virtual City------Street View
House:
Street Facilities:
Vacant House
User’s house
Gallery
Go Chat
Street View Facilities
• Street Facilities:Street Facilities:
Vacant House:
• User can choose his own room if he hasn’t got one.
• Just click on the vacant house, he will own a house with his name on
the house.
Other Users’ house:
You can also enter other users’ house by just clicking on their house.
Street View Facilities
• Street Facilities:Street Facilities:
Gallery:
• Gallery is controlled by administrator. He will post on the pictures for
users’ to enjoy.
Go Chat
• Go chat is a convenient place for the online user in Virtual City
communicating with each other. About their own hobby, the recent
news etc.
House View
House Function:Blog View:• Display only the blogs of the house owner.New blog: • We can add new article to the blog only you
are the house owner.Comment:???
Group Chat
• Expected Goals: • 1. Only users who has loggin can enter the group chat• 2.Users can choose to shown in the online box or not but
they can still see anyone's chatting information• 3.When sending a message, the speaker's name will be
shown to let others know who is the message from.• 4.Many users can online at the same time.• 5.The max number of people online is shown in a label.
Group Chat Code
• This is the session start and session end function, which helps to show how many people online later.
Group Chat Code• This is the function used to get all the current user names in
the buffer, which is called when a user want to refresh online users box.
Gallery
House Function:Blog View:• Display only the blogs of the house owner.
New blog: • We can add new article to the blog only if you
are the house owner.
Private
Menu Private:• Private function is for the convenience of blog
user to review and add new blogs.• Click the user owner’s house will show the
blogs only of the current user.
Accomplished Challenge
Certain Registered user can choose a vacant house to live in and then he/she owns the house with a name shown on the house.
We use only one blog.aspx of the whole project. This page is used as the home page of a certain user. And the page can be dynamically linked to the specific user’s database.
Summary
Our Goal:1. Walk in the city(done)2. House:(done)• Blogs• Comment3 . Gallery:(done)• Theme pictures• Comment4. Group Chat (done)
Our Achievement: (All done)1. Walk in the city• 9 blocks, 28 houses
including one chat room and one gallery.
2. House:• View owner’s blog• Comment the blog3. Private• View only current user’s
blog• Add new blog4. Profile• Modify user’s own profile• View user’s own profile5. Group Chat( new feature)• New feature of online /
invisible.