示例#1
0
文件: LoginApp.cs 项目: weeble/ohos
 public IAppTab CreateTab(IBrowserTabProxy aTabProxy, User aUser)
 {
     int id = iCounter++;
     var tab = new LoginAppTab(this, aTabProxy, id);
     lock (iLock)
     {
         iTabs.Add(tab);
         foreach (var user in iUsers.Values)
         {
             tab.NewMessage(
                 new JsonObject
                 {
                     { "type", "user"},
                     { "userid", user.User.Id },
                     { "oldValue", JsonNull.Instance },
                     { "newValue", UserToJson(user.User) } });
         }
     }
     return tab;
 }
示例#2
0
文件: LoginApp.cs 项目: weeble/ohos
 internal void RemoveTab(LoginAppTab aTab)
 {
     lock (iLock)
     {
         iTabs.Remove(aTab);
     }
 }