// Constructor
 public MainPage()
 {
     //  lstbox2.Items.Clear();
     InitializeComponent();
     Data                = new ObservableCollection <DataObjects>();
     client1             = new ServiceReference1.Service1Client();
     client2             = new ServiceReference2.Service2Client();
     client3             = new ServiceReference3.Service3Client();
     me                  = new ServiceReference3.Player();
     lstbox2.ItemsSource = Data;
     // Sample code to localize the ApplicationBar
     //BuildLocalizedApplicationBar();
 }
        // Constructor
        public MainPage()
        {
            //  lstbox2.Items.Clear();
            InitializeComponent();
            Data                = new ObservableCollection <DataObjects>();
            client1             = new ServiceReference1.Service1Client();
            client2             = new ServiceReference2.Service2Client();
            lstbox2.ItemsSource = Data;
            // Sample code to localize the ApplicationBar
            //BuildLocalizedApplicationBar();

            client2.GatAvailablePlayLobbiesCompleted += client2_GatAvailablePlayLobbiesCompleted;
            client2.GatAvailablePlayLobbiesAsync();
        }
Example #3
0
        public ActionResult PurchaseBook(double budget, int[] number, int[] amount)
        {
            ServiceReference2.Service2Client       pro  = new ServiceReference2.Service2Client();
            ServiceReference2.BookPurchaseInfo     info = new ServiceReference2.BookPurchaseInfo();
            ServiceReference2.BookPurchaseResponse res  = new ServiceReference2.BookPurchaseResponse();
            Dictionary <int, int> items = new Dictionary <int, int>();

            info.budget = budget;
            for (int i = 0; i < number.Count(); i++)
            {
                items.Add(number[i], amount[i]);
            }
            info.items       = items;
            res.response     = pro.PurchaseBooks(info.budget, info.items, out res.result);
            ViewBag.response = res.response;
            return(View());
        }