private void button1_Click(object sender, EventArgs e) { if (textBox1.Text != "" && AccountList.SelectedItem != null) { if (type == 2 && textBox3.Text != "") { opt.Follow.AddRange(textBox2.Lines); opt.Track.AddRange(textBox3.Lines); Column c; if (b != null) { c = new Column(new TwitterStream(o[AccountList.SelectedItem.ToString()].OAuthTokens, "Alicium2", opt), Column.StartType.FilterStream, textBox1.Text, b); } else { c = new Column(new TwitterStream(o[AccountList.SelectedItem.ToString()].OAuthTokens, "Alicium2", opt), Column.StartType.FilterStream, textBox1.Text); } ResultColumn = c; } else if (type == 0) { Column c; if (b != null) { c = new Column(new TwitterStream(o[AccountList.SelectedItem.ToString()].OAuthTokens, "Alicium2", opt), Column.StartType.UserStream, textBox1.Text, b); } else { c = new Column(new TwitterStream(o[AccountList.SelectedItem.ToString()].OAuthTokens, "Alicium2", opt), Column.StartType.UserStream, textBox1.Text); } ResultColumn = c; } else if (type == 1) { Column c; if (b != null) { c = new Column(new TwitterStream(o[AccountList.SelectedItem.ToString()].OAuthTokens, "Alicium2", opt), Column.StartType.Mentions, textBox1.Text, b); } else { c = new Column(new TwitterStream(o[AccountList.SelectedItem.ToString()].OAuthTokens, "Alicium2", opt), Column.StartType.Mentions, textBox1.Text); } ResultColumn = c; } this.Close(); } else { MessageBox.Show("Empty."); } }
public ColumnData Set(string _AccountName, string _Title, string _Track, string _Follow, Column.StartType Start,string b) { return new ColumnData() { AccountName = _AccountName, Tille = _Title, Track = _Track, Follow = _Follow, ColumnType = Start,Image = b}; }
public static void ActivateColumn(int index) { ActiveColumn = Columns[index]; Columns[index].Active = true; }
public static bool Save(Column[] f) { //try { int load = 0; while (File.Exists(Application.StartupPath + "/Settings/Columns_" + load + ".dat")) { File.Delete(Application.StartupPath + "/Settings/Columns_" + load + ".dat"); load++; } for (int i = 0; i < f.Length; i++) { Rc.SaveToXML<ColumnData>(f[i].ToColumnData(), Application.StartupPath + "/Settings/Columns_" + i + ".dat"); } MessageBox.Show("Success to save."); return true; }/* catch { MessageBox.Show("Failed to save."); return false; }*/ }