Esempio n. 1
0
        private void TBHeight_KeyDown(object sender, KeyEventArgs e)
        {
            if (e.Key == Key.Enter)
            {
                float Size = 0;
                //台湾仓
                if (staff_region == "1")
                {
                    Size = float.Parse(TBLength.Text) * float.Parse(TBWidth.Text) * float.Parse(TBHeight.Text) / 6000;
                    if (TBweigh.Text != "")
                    {
                        Size = (Size + float.Parse(TBweigh.Text)) / 2;
                    }
                }

                //香港仓
                if (staff_region == "2")
                {
                    Size = float.Parse(TBLength.Text) * float.Parse(TBWidth.Text) * float.Parse(TBHeight.Text) / 6000;
                }

                TBSize.Text  = Size.ToString();
                TBNote.Text += " 【" + TBLength.Text + "*" + TBWidth.Text + "*" + TBHeight.Text + "=" + Size + "】 ";

                Weight_Size += Size;
                TBNote.Focus();

                //清空数据
                TBWidth.Clear();
                TBLength.Clear();
                TBHeight.Clear();
                TBSize.Clear();
            }
        }
Esempio n. 2
0
 private void TBWidth_KeyDown(object sender, KeyEventArgs e)
 {
     if (e.Key == Key.Enter)
     {
         TBHeight.Focus();
     }
 }