Exemplo n.º 1
0
        public dlgOrderCheck()
        {
            InitializeComponent();

            //DBManagment.GetInstance().Items.Add(new Item("אחר", true));
            //ItemAccessManager.GetInstance().AddItem(new Common.Item("אחר", true));

            //lsbProducts.ItemsSource = DBManagment.GetInstance().Items;
            lsbProducts.ItemsSource =
                ItemsCollectionProvider.GetInstance().Items;
        }
Exemplo n.º 2
0
        private void btnAccept_Click(object sender, RoutedEventArgs e)
        {
            // Update the run-time items list
            ItemsCollectionProvider.GetInstance().
            UpdateItemsList(m_lstTempItems);

            Dictionary <int, double> dicPricePerMin =
                new Dictionary <int, double>();

            foreach (ucPricePerMin item in spPrices.Children)
            {
                dicPricePerMin.Add(item.Min, item.Price);
            }

            SettingsXmlProvider.WritePriceGame(dicPricePerMin);

            Close();
        }
Exemplo n.º 3
0
        public dlgAddProducts()
        {
            InitializeComponent();

            ObservableCollection <Common.Item> lstItems =
                ItemsCollectionProvider.GetInstance().Items;

            this.DataContext = lstItems;

            m_lstTempItems = new List <Common.Item>();

            foreach (Common.Item item in lstItems)
            {
                m_lstTempItems.Add(new Common.Item(
                                       item.Name, item.Price, item.ItemId));
            }

            dgProducts.ItemsSource = m_lstTempItems;

            SetPricePerMin();
        }
Exemplo n.º 4
0
        public MainWindow()
        {
            try
            {
                InitializeComponent();

                m_bMouseClickOnObject = false;

                InitializeLogo();

                // Load all items from the db
                ItemsCollectionProvider.GetInstance().LoadItemsFromDB();

                // Read and save the prices for the game time
                CommonConfig.GetInstance().SetPricePerMin(
                    SettingsXmlProvider.ReadPriceGame());
            }
            catch (Exception)
            {

            }
        }