Exemplo n.º 1
0
 public static UserDataService GetInstance()
 {
     if (instance == null)
     {
         instance = new UserDataService();
     }
     return(instance);
 }
Exemplo n.º 2
0
 //用户登录状态
 public void UserLogOn()
 {
     //用户登录
     isUser     = true;
     isSupplier = false;
     isLogOn    = false;
     //清空购物车菜品
     UserDataService.GetInstance()._current.SampleItems.Clear();
     SampleOrderVisible  = Visibility.Visible;
     ShoppingCartVisible = Visibility.Visible;
     LogOnVisible        = Visibility.Collapsed;
     OrderViewVisible    = Visibility.Collapsed;
     ManagementVisible   = Visibility.Collapsed;
 }