Exemplo n.º 1
0
 protected void Button_Submit_Click(object sender, EventArgs e)
 {
     string userID = (string)Session["userID"];
     SentencesData sentences = new SentencesData(MapPath("."));
     string sentenceID = sentences.AddSentence(TextBox_Sentence.Text, DropDownList_Fonts.SelectedItem.Value, userID);
     ActivitiesData activities = new ActivitiesData(MapPath("."));
     activities.AddActivity("makeSentence", sentenceID, userID);
     Response.Redirect("sentence.aspx?id=" + sentenceID);
 }
Exemplo n.º 2
0
 protected void Button_Unfollow_Click(object sender, EventArgs e)
 {
     string userID = (string)Session["userID"];
     string targetUserID = (string)Request.QueryString["id"];
     FollowsData follows = new FollowsData(MapPath("."));
     follows.RemoveFollow(userID, "user", targetUserID);
     ActivitiesData activities = new ActivitiesData(MapPath("."));
     activities.AddActivity("followUser", targetUserID, userID);
     ShowFollowingStatus();
 }
Exemplo n.º 3
0
 protected void Button_Follow_Click(object sender, EventArgs e)
 {
     string userID = (string)Session["userID"];
     string fontID = (string)Request.QueryString["id"];
     FollowsData follows = new FollowsData(MapPath("."));
     follows.AddFollow(userID, "font", fontID);
     ActivitiesData activities = new ActivitiesData(MapPath("."));
     activities.AddActivity("followFont", fontID, userID);
     ShowFollowing();
 }
Exemplo n.º 4
0
 protected void Button_Submit_Click(object sender, EventArgs e)
 {
     var charactors = new System.Collections.Generic.Dictionary<string, string>();
     string[] correspondences = TextBox_Correspondences.Text.Split(new char[]{'\r', '\n'});
     foreach (string correspondence in correspondences)
     {
         string[] charactor = correspondence.Split(',');
         if (charactor.Length == 2)
         {
             charactors[charactor[0]] = charactor[1];
         }
     }
     FontsData fonts = new FontsData(MapPath("."));
     string fontID = fonts.AddFont(TextBox_FontName.Text, TextBox_FontProfile.Text, charactors);
     ActivitiesData activities = new ActivitiesData(MapPath("."));
     activities.AddActivity("makeFont", fontID, (string)Session["userID"]);
 }