コード例 #1
0
ファイル: sentence.aspx.cs プロジェクト: ne-sachirou/yUsin-1
 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);
 }
コード例 #2
0
ファイル: user.aspx.cs プロジェクト: ne-sachirou/yUsin-1
 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();
 }
コード例 #3
0
ファイル: font.aspx.cs プロジェクト: ne-sachirou/yUsin-1
 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();
 }
コード例 #4
0
ファイル: font.aspx.cs プロジェクト: ne-sachirou/yUsin-1
 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"]);
 }