Exemplo n.º 1
0
        private void userMoveSelected()
        {
            string fromSlotKey = m_FromSlotButton.Key;
            string toSlotKey   = m_ToSlotButton.Key;

            m_FromSlotButton.ChangeSelectedStyle();
            m_ToSlotButton.ChangeSelectedStyle();
            m_FromSlotButton = null;
            m_ToSlotButton   = null;
            onUserMoveSelected(new UserMoveEventArgs(fromSlotKey, toSlotKey));
        }
Exemplo n.º 2
0
 private void setFromSlotButton(SlotButton i_SelectedSlotButton)
 {
     if (i_SelectedSlotButton.Content != null)
     {
         if (m_FromSlotButton != null)
         {
             if (i_SelectedSlotButton.Key.Equals(m_FromSlotButton.Key))
             {
                 m_FromSlotButton = null;
             }
             else
             {
                 m_FromSlotButton.ChangeSelectedStyle();
                 m_FromSlotButton = i_SelectedSlotButton;
             }
         }
         else
         {
             m_FromSlotButton = i_SelectedSlotButton;
         }
     }
 }
Exemplo n.º 3
0
        private void slotButton_Click(object i_Sender, EventArgs i_EventArgs)
        {
            SlotButton slotButton = i_Sender as SlotButton;

            if (slotButton.Content != null)
            {
                setFromSlotButton(slotButton);
            }
            else
            {
                if (setToSlotButton(slotButton))
                {
                    userMoveSelected();
                }
                else
                {
                    MessageBox.Show("First You Have To Choose Slot With Your Man Checker");
                    slotButton.ChangeSelectedStyle();
                }
            }
        }