Beispiel #1
0
 protected void btnAdd_Click(object sender, EventArgs e)
 {
     HtmlInputControl feed = Edit.FindControl("feed") as HtmlInputControl;
     HtmlInputControl url = Edit.FindControl("url") as HtmlInputControl;
     TwitterDataSet t = new TwitterDataSet();
     t.Name = feed.Value;
     t.URL = url.Value;
     if (t.URL != "")
     {
         tds.Add(t);
         feed.Value = "";
         url.Value = "";
     }
     FormTwitterString(tds);
     UpdateFriends();
     _host.SaveWidgetDataMembers();
     ViewSet.SetActiveView(Edit);
 }
Beispiel #2
0
    protected void FormTwitterList(string str)
    {
        tds.Clear();
        TwitterDataSet td;
        if (str != null)
        {
            List<string> tList = new List<string>(str.Split(new char[] { '#' }));

            foreach (string var in tList)
            {
                List<string> temp = new List<string>(var.Split(','));
                if (temp.Count == 2)
                {
                    td = new TwitterDataSet();
                    td.Name = temp[0];
                    td.URL = temp[1];
                    tds.Add(td);
                }

            }
        }
    }