/// <summary> /// Add the tag to the list of hashtags /// </summary> /// <param name="newTag"></param> public void AddHashTag(string newTag) { if (Hashtags == null) { Hashtags = new HashSet <string>(); } Hashtags.Add(newTag); }
public void Hashtagss() { hashtags = new ObservableCollection <string>(); foreach (InstaSearchData hash in this.lista) { Hashtags.Add(hash.Hastag); } }
/// <summary> /// adds a hashtag to the hashtag list /// </summary> /// <param name="url"></param> public void addHashtags(string tag) { Hashtags.Add(tag); }
private void MainWindow_Loaded(object sender, RoutedEventArgs e) { var sb = new SQLiteConnectionStringBuilder { DataSource = "cache.db3" }; using (var connection = new SQLiteConnection(sb.ToString())) { connection.Open(); using (var cmd = connection.CreateCommand()) { cmd.CommandText = "SELECT Id, Tag, Expires FROM Hashtags;"; using (var reader = cmd.ExecuteReader()) { while (reader.Read()) { var tag = new HashtagEntry(); //var tmp = reader.GetValue( 0 ); //tag.Id = (ulong)reader.GetInt32( 0 ); tag.Hashtag = reader.GetString(1); tag.Expires = Date(reader.GetInt64(2)); Hashtags.Add(tag); } } } using (var cmd = connection.CreateCommand()) { cmd.CommandText = "SELECT Id, UserName, UserData, Expires FROM Users;"; using (var reader = cmd.ExecuteReader()) { while (reader.Read()) { var usr = new UserEntry(); usr.Id = (ulong)reader.GetInt64(0); usr.Name = reader.GetString(1); usr.Json = !reader.IsDBNull(2) ? reader.GetString(2) : ""; usr.Expires = Date(reader.GetInt64(3)); Users.Add(usr); } } } using (var cmd = connection.CreateCommand()) { cmd.CommandText = "SELECT Id, UserId, StatusData, Expires FROM Statuses;"; using (var reader = cmd.ExecuteReader()) { while (reader.Read()) { var status = new StatusEntry(); status.Id = (ulong)reader.GetInt64(0); status.User = (ulong)reader.GetInt64(1); status.Json = reader.GetString(2); status.Expires = Date(reader.GetInt64(3)); Statuses.Add(status); } } } } }