Пример #1
0
        private void GetPOutPortInfo()
        {
            _poutport = new OutPort(pindexno);
            _poutport.GetCustInfo();
            int onesum   = 0;
            int twosum   = 0;
            int threesum = 0;
            Dictionary <string, Color> ciginfo = _poutport.GetCigInfo(ref onesum, ref twosum, ref threesum);

            labponesum.Text    = onesum.ToString();
            labptwosum.Text    = twosum.ToString();
            labpthreesum.Text  = threesum.ToString();
            labponetwosum.Text = (onesum + twosum).ToString();

            labelX31.Text = _poutport["INDEXNO"];
            foreach (Control control in this.panel4.Controls)
            {
                if (control is LabelX && control.Tag != null)
                {
                    if (_poutport.ContainsKey(control.Tag.ToString()))
                    {
                        ((LabelX)control).Text = _poutport[control.Tag.ToString()];
                    }
                }
            }

            itemPanel2.BeginUpdate();
            itemPanel2.Items.Clear();

            foreach (var s in ciginfo)
            {
                LabelItem labelItem = new LabelItem();
                labelItem.Text = s.Key.Replace("(", " ").Replace(")", "");
                labelItem.Font = new System.Drawing.Font("黑体", 14);
                if (s.Key.Contains("*"))
                {
                    labelItem.ForeColor = Color.Red;
                }
                else
                {
                    labelItem.ForeColor = s.Value;
                }
                labelItem.BorderSide        = eBorderSide.All;
                labelItem.BorderType        = eBorderType.Bump;
                labelItem.TextLineAlignment = StringAlignment.Center;
                labelItem.Width             = 225;
                labelItem.Height            = 25;
                //labelItem.WordWrap = true;
                itemPanel2.Items.Add(labelItem);
            }
            itemPanel2.EndUpdate();
        }
Пример #2
0
        private void GetNOutPortInfo()
        {
            _noutport = new OutPort(nindexno);
            _noutport.GetCustInfo();
            int onesum   = 0;
            int twosum   = 0;
            int threesum = 0;
            Dictionary <string, Color> ciginfo = _noutport.GetCigInfo(ref onesum, ref twosum, ref threesum);

            labnonesum.Text    = onesum.ToString();
            labntwosum.Text    = twosum.ToString();
            labnthreesum.Text  = threesum.ToString();
            labnonetwosum.Text = (onesum + twosum).ToString();

            labelX29.Text = _noutport["INDEXNO"];
            foreach (Control control in this.panel5.Controls)
            {
                if (control is LabelX && control.Tag != null)
                {
                    if (_noutport.ContainsKey(control.Tag.ToString()))
                    {
                        ((LabelX)control).Text = _noutport[control.Tag.ToString()];
                    }
                }
            }


            if ((!string.IsNullOrEmpty(labncustname.Text)) && (labncustname.Text.Contains("×")) && (labncustname.Text != NCustName))
            {
                NCustName = labncustname.Text;
                SoundPlayer player = new SoundPlayer();
                player.SoundLocation = Application.StartupPath + "\\Sound\\下一订单.wav";
                player.Load();
                player.Play();
            }


            itemPanel3.BeginUpdate();
            itemPanel3.Items.Clear();

            foreach (var s in ciginfo)
            {
                LabelItem labelItem = new LabelItem();
                labelItem.Text = s.Key.Replace("(", " ").Replace(")", "");
                labelItem.Font = new System.Drawing.Font("黑体", 14);
                if (s.Key.Contains("*"))
                {
                    labelItem.ForeColor = Color.Red;
                }
                else
                {
                    labelItem.ForeColor = s.Value;
                }
                labelItem.BorderSide        = eBorderSide.All;
                labelItem.BorderType        = eBorderType.Bump;
                labelItem.TextLineAlignment = StringAlignment.Center;
                labelItem.Width             = 225;
                labelItem.Height            = 25;
                labelItem.WordWrap          = true;
                itemPanel3.Items.Add(labelItem);
            }
            itemPanel3.EndUpdate();
        }