コード例 #1
0
        private void CbPlanogramSize_SelectionChanged(object sender, SelectionChangedEventArgs e)
        {
            var a = sender as ComboBox;

            var s     = a.SelectedItem as ComboBoxItem;
            var scale = a.SelectedItem as Scale;
            var i     = scale.Name;

            if (i == "Small")
            {
                this.simSettings.NumItems   = SMALL_ITEMS_COUNT;
                this.simSettings.NumShelves = 1;
                this.simSettings.NumSlots   = 24;

                this.isSmallPlangoram = true;
                //this.dataPanel.NumItems = SMALL_ITEMS_COUNT;
                //this.dataPanel.NumShelves = 1;
                //this.dataPanel.NumSlots = 24;
            }
            else if (i == "Large")
            {
                this.simSettings.NumItems   = LARGE_ITEMS_COUNT;
                this.simSettings.NumShelves = 12;
                this.simSettings.NumSlots   = 24;

                this.isSmallPlangoram = false;
                //this.dataPanel.NumItems = LARGE_ITEMS_COUNT;
                //this.dataPanel.NumShelves = 12;
                //this.dataPanel.NumSlots = 24;
            }

            if (headToHead)
            {
                FillGrid(planogram, Colors.LightGray);
                FillGrid(planogramTensorflow, Colors.LightGray);
            }
            else
            {
                FillGrid(planogram, Colors.LightGray);
            }

            int count;

            using (PlanogramContext ctx = new PlanogramContext())
            {
                MockData data = new MockData(ctx);
                count = data.GetItemsCount();
            }

            if (count != simSettings.NumItems)
            {
                showDataPanelUntil();
            }
        }
コード例 #2
0
        public void setSelectedPlanogramSize()
        {
            int count;

            using (PlanogramContext ctx = new PlanogramContext())
            {
                MockData data = new MockData(ctx);
                count = data.GetItemsCount();
            }

            if (count == SMALL_ITEMS_COUNT)
            {
                CbPlanogramSize.SelectedIndex = 0;
            }
            else if (count == LARGE_ITEMS_COUNT)
            {
                CbPlanogramSize.SelectedIndex = 1;
            }
            else
            {
                showDataPanelUntil();
            }
        }