Ejemplo n.º 1
0
 protected override void Initialize()
 {
     User = storageService.GetTempUser();
     if (CheckIsFollowingProtectedUser())
     {
         ProfileInitialize();
     }
 }
Ejemplo n.º 2
0
 private void Hyperlink_Click(object sender, RoutedEventArgs e)
 {
     var hyperlink = sender as Hyperlink;
     var entity = hyperlink.CommandParameter as EntityBase;
     switch (entity.EntityType)
     {
         case EntityType.UserMention:
             var mention = entity as UserMention;
             User user = new User
             {
                 Id = mention.Id,
                 ScreenName = mention.ScreenName,
             };
             //NavigationServiceManager.NavigateTo(Const.ProfilePage, user);
             break;
         case EntityType.HashTag:
             //var query = IsolatedStorageService.GetObject<string>(Const.SearchPage);
             //if (entity.Text != query)
             //    NavigationServiceManager.NavigateTo(Const.SearchPage, entity.Text);
             break;
     }
 }
Ejemplo n.º 3
0
 public static void UpdateCurrentUser(User user)
 {
     CurrentUser = user;
 }
 private void SaveCurrentUser(User user)
 {
     storageService.UpdateCurrentUser(user);
 }
Ejemplo n.º 5
0
 public void UpdateTempUser(User user)
 {
     var temp = context.Temps.FirstOrDefault(t => t.Type == TempType.User);
     if (temp == null)
     {
         temp = new Temp { Type = TempType.User };
         context.Temps.InsertOnSubmit(temp);
     }
     temp.Data = JsonConvert.SerializeObject(user);
     context.SubmitChanges();
 }
Ejemplo n.º 6
0
 public void UpdateCurrentUser(User user)
 {
     var account = context.Settings.FirstOrDefault(s => s.Type == SettingType.CurrentUser && s.IsEnabled && s.IsInUsed);
     if (account == null)
     {
         account = new Setting
        {
            Type = SettingType.CurrentUser,
            IsEnabled = true,
            IsInUsed = true,
        };
         context.Settings.InsertOnSubmit(account);
     }
     account.Name = user.Name;
     account.Data = JsonConvert.SerializeObject(user);
     context.SubmitChanges();
 }