Exemple #1
0
 private void Item_DeleteUserEvent(object sender, UserData e)
 {
     if (e != null)
     {
         UIUser uiU = this.list_Box_Item.SelectedItem as UIUser;
         this.list_Box_Item.SelectedIndex = -1;
         uiU.Animation_Opacity_View_Frame(false, () =>
         {
             this.list_Box_Item.Items.Remove(uiU);
             this.Datas.Remove(uiU.User);
             if (this.to < this.totalUser)
             {
                 this.Datas = App.curUser.getListUser(from, to, out totalUser);
                 LoadGUI();
             }
         });
     }
 }
Exemple #2
0
 private void LoadGUI()
 {
     this.list_Box_Item.Items.Clear();
     if (this.Datas != null)
     {
         foreach (UserData data in this.Datas)
         {
             UIUser item = new UIUser();
             item.User                = data;
             item.Height              = 270;
             item.Width               = 200;
             item.ViewInfoUserEvent  += Item_ViewInfouserEvent;
             item.DeleteUserEvent    += Item_DeleteUserEvent;
             item.ViewPermison       += Item_ViewPermison;
             item.BrowserMediaEvent  += item_BroswerMediaEvent;
             item.BrowserCameraEvent += item_BrowserCameraEvent;
             this.list_Box_Item.Items.Add(item);
         }
     }
     if (to < totalUser)
     {
         this.UIRightBtn.Foreground = Brushes.DarkOrange;
     }
     else
     {
         this.UIRightBtn.Foreground = Brushes.Gray;
     }
     if (this.from > 0)
     {
         this.UILeftBtn.Foreground = Brushes.DarkOrange;
     }
     else
     {
         this.UILeftBtn.Foreground = Brushes.Gray;
     }
 }
 private void LoadGUI()
 {
     this.list_Box_Item.Items.Clear();
     if (this.Datas != null)
     {
         foreach (UserData data in this.Datas)
         {
             UIUser item = new UIUser();
             item.User = data;
             item.Height = 270;
             item.Width = 200;
             item.ViewInfoUserEvent += Item_ViewInfouserEvent;
             item.DeleteUserEvent += Item_DeleteUserEvent;
             item.ViewPermison += Item_ViewPermison;
             item.BrowserMediaEvent += item_BroswerMediaEvent;
             item.BrowserCameraEvent += item_BrowserCameraEvent;
             this.list_Box_Item.Items.Add(item);
         }
     }
     if (to < totalUser)
     {
         this.UIRightBtn.Foreground = Brushes.DarkOrange;
     }
     else
     {
         this.UIRightBtn.Foreground = Brushes.Gray;
     }
     if (this.from > 0)
     {
         this.UILeftBtn.Foreground = Brushes.DarkOrange;
     }
     else
     {
         this.UILeftBtn.Foreground = Brushes.Gray;
     }
 }