Пример #1
0
 private void MyInputboxKeyDown(clientPack thisPack, KeyEventArgs e)
 {
     thisPack.InputBox.Background = Brushes.White;
     if (e.Key == Key.Enter)
     {
         MyInputClick(thisPack);
     }
 }
Пример #2
0
 private void CheckWin(clientPack thisPack, clientPack comparePack, string input)
 {
     for (int i = comparePack.LogList.Items.Count - 1; i >= 0; i--)
     {
         if (comparePack.LogList.Items[i].ToString() == input)
         {
             comparePack.MatchList.Items.Add(thisPack.ServerName + " " + input);
             break;
         }
     }
 }
Пример #3
0
        private void MyInputClick(clientPack thisPack)
        {
            if (thisPack.InputBox.Text.Length < 4)
            {
                thisPack.InputBox.Background = Brushes.Red;
                return;
            }
            CheckWin(thisPack, clientPacks[0], thisPack.InputBox.Text);
            CheckWin(thisPack, clientPacks[1], thisPack.InputBox.Text);
            CheckWin(thisPack, clientPacks[2], thisPack.InputBox.Text);
            CheckWin(thisPack, clientPacks[3], thisPack.InputBox.Text);
            thisPack.LogList.Items.Add(thisPack.InputBox.Text);
            if (++thisPack.LineCount > 5)
            {
                thisPack.LogList.Items.RemoveAt(0);
            }

            thisPack.InputBox.Text = "";
        }
Пример #4
0
        private void MatchClearButton3_Click(object sender, RoutedEventArgs e)
        {
            clientPack thisPack = clientPacks[3];

            thisPack.MatchList.Items.Clear();
        }
Пример #5
0
        private void InputBox3_KeyDown(object sender, KeyEventArgs e)
        {
            clientPack thisPack = clientPacks[3];

            MyInputboxKeyDown(thisPack, e);
        }
Пример #6
0
        private void InputButton3_Click(object sender, RoutedEventArgs e)
        {
            clientPack thisPack = clientPacks[3];

            MyInputClick(thisPack);
        }