コード例 #1
0
 private void ChangeBtm_MouseDown(object sender, MouseButtonEventArgs e)
 {
     if (SelectedBuff != null && SelectedBuff.GetPosition() == 1)
     {
         InsertAmount.Text = Convert.ToString(SelectedBuff.GetAmount());
         ChangeRow.Height  = new GridLength(50);
     }
 }
コード例 #2
0
        private void PositionBlank_Click(object sender, MouseButtonEventArgs e)
        {
            if (sender is PositionBlank)
            {
                if (SelectedBuff != null)
                {
                    SelectedBuff.ChangeBackground(Brushes.LightGray);
                }

                if (SelectedBuff == sender as PositionBlank)
                {
                    ChangeRow.Height = new GridLength(0);
                    SelectedBuff     = null;
                }
                else
                {
                    //SelectedBuff.ChangeBackground(Brushes.LightGray);
                    SelectedBuff  = sender as PositionBlank;
                    ProdName.Text = SelectedBuff.GetNames();
                    if (SelectedBuff.GetPosition() == 1)
                    {
                        InsertAmount.Text = Convert.ToString(SelectedBuff.GetAmount());
                        ChangeRow.Height  = new GridLength(0);
                    }
                    else
                    {
                        InsertAmount.Text = "0";
                        ChangeRow.Height  = new GridLength(50);
                    }
                }
            }
        }