示例#1
0
        /// <summary>
        /// 创建货道
        /// </summary>
        private void CreateAsile(List <AsileModel> products)
        {
            panelAsile.Children.Clear();

            int index = 0;

            for (int i = 0; i < 4; i++)
            {
                for (int j = 0; j < 3; j++)
                {
                    GoodsWayProduct productControl = new GoodsWayProduct()
                    {
                        HorizontalAlignment = System.Windows.HorizontalAlignment.Stretch,
                        VerticalAlignment   = System.Windows.VerticalAlignment.Stretch,
                        Margin = new Thickness(5)
                    };
                    productControl.SetBackBackGroud(App.Current.Resources["AsileNormal"] as Brush);
                    productControl.SetCheckBackGround(App.Current.Resources["AsileTest"] as Brush);
                    Grid.SetRow(productControl, i);
                    Grid.SetColumn(productControl, j);
                    panelAsile.Children.Add(productControl);

                    productControl.MouseLeftButtonUp += (GoodsWayChecked);

                    if (index < products.Count)
                    {
                        productControl.SetCurrentGoodsWayProduct(products[index]);
                        productControl.SetOneText(products[index].PaCode);

                        productControl.SetSecondText(GetAsileStatus(products[index].PaStatus));
                    }
                    else
                    {
                        productControl.SetNoGoods(m_NoGoodsTitle);
                    }
                    index++;
                }
            }

            m_AsileCount = panelAsile.Children.Count;

            if (!m_IsTrdOper)
            {
                if (products.Count == 0)
                {
                    btnAsileTest_Begin.IsEnabled = btnAsileTest_Stop.IsEnabled = false;
                }
                else
                {
                    btnAsileTest_Begin.IsEnabled = true;
                    btnAsileTest_Stop.IsEnabled  = false;
                }
            }
        }
示例#2
0
        /// <summary>
        /// 创建货道
        /// </summary>
        private void CreateAsile(List <AsileModel> products)
        {
            panelAsile.Children.Clear();

            int index = 0;

            string strLeftRightCodeNum = string.Empty;

            ////string strLeftRightNumsTitle = string.Empty;
            for (int i = 0; i < 4; i++)
            {
                for (int j = 0; j < 3; j++)
                {
                    GoodsWayProduct productControl = new GoodsWayProduct()
                    {
                        HorizontalAlignment = System.Windows.HorizontalAlignment.Stretch,
                        VerticalAlignment   = System.Windows.VerticalAlignment.Stretch,
                        Margin = new Thickness(5)
                    };
                    productControl.SetBackBackGroud(App.Current.Resources["AsileNormal"] as Brush);
                    productControl.SetCheckBackGround(App.Current.Resources["AsileTest"] as Brush);
                    Grid.SetRow(productControl, i);
                    Grid.SetColumn(productControl, j);
                    panelAsile.Children.Add(productControl);

                    productControl.MouseLeftButtonUp += (GoodsWayChecked);

                    if (index < products.Count)
                    {
                        productControl.SetCurrentGoodsWayProduct(products[index]);
                        productControl.SetOneText(products[index].PaCode);

                        string strVendBoxCode  = products[index].VendBoxCode;
                        int    intVendBoxIndex = PubHelper.p_BusinOper.AsileOper.GetVendBoxIndex(strVendBoxCode);
                        strLeftRightCodeNum = PubHelper.p_BusinOper.AsileOper.UpDown_GetLeftRightCodeNum(strVendBoxCode,
                                                                                                         products[index].PaId.Substring(1, 1), PubHelper.p_BusinOper.AsileOper.VendBoxList[intVendBoxIndex].SellGoodsType,
                                                                                                         PubHelper.p_BusinOper.ConfigInfo.UpDownLeftRightNum_Left,
                                                                                                         PubHelper.p_BusinOper.ConfigInfo.UpDownLeftRightNum_Center,
                                                                                                         PubHelper.p_BusinOper.ConfigInfo.UpDownLeftRightNum_Right).ToString();
                        productControl.SetSecondText(strLeftRightCodeNum);
                    }
                    else
                    {
                        productControl.SetNoGoods(m_NoGoodsTitle);
                    }
                    index++;
                }
            }
        }