Ejemplo n.º 1
0
 public ViewModel()
 {
     this.currentCustomer = 0;
     this.IsAtStart = true;
     this.IsAtEnd = false;
     this.NextCustomer = new Command(this.Next, () => { return this.CanBrowse && this.customers.Count > 0 && !this.IsAtEnd; });
     this.PreviousCustomer = new Command(this.Previous, () => { return this.CanBrowse && this.customers.Count > 0 && !this.IsAtStart; });
     this.FirstCustomer = new Command(this.First, () => { return this.CanBrowse && this.customers.Count > 0 && !this.IsAtStart; });
     this.LastCustomer = new Command(this.Last, () => { return this.CanBrowse && this.customers.Count > 0 && !this.IsAtEnd; });
 }
Ejemplo n.º 2
0
        public ViewModel() 
        {
            this.currentCustomer = 0;
            this.IsAtStart = true;
            this.IsAtEnd = false;
            this.NextCustomer = new Command(this.Next, () => 
                { return this.customers.Count > 0 && !this.IsAtEnd; }); 
            this.PreviousCustomer = new Command(this.Previous, () => 
                { return this.customers.Count > 0 && !this.IsAtStart; });

            this.customers = DataSource.Customers;
        }
Ejemplo n.º 3
0
        public ViewModel() 
        {
            this.currentCustomer = 0;
            this.IsAtStart = true;
            this.IsAtEnd = false;
            this.NextCustomer = new Command(this.Next, () => 
                { return this.customers != null && this.customers.Count > 0 && !this.IsAtEnd; }); 
            this.PreviousCustomer = new Command(this.Previous, () => 
                { return this.customers != null && this.customers.Count > 0 && !this.IsAtStart; });
            this.FirstCustomer = new Command(this.First, () => 
                { return this.customers != null && this.customers.Count > 0 && !this.IsAtStart; });
            this.LastCustomer = new Command(this.Last, () => 
                { return this.customers != null && this.customers.Count > 0 && !this.IsAtEnd; });

            this.customers = null; 
            this.client = new HttpClient(); 
            this.client.BaseAddress = new Uri(ServerUrl); 
            this.client.DefaultRequestHeaders.Accept.Add(new MediaTypeWithQualityHeaderValue("application/json"));
        }