public void StatusReset()
 {
     this.Dispatcher.Invoke(() =>
     {
         First_list.SetValue(BorderBrushProperty, Brushes.Silver);
         First_list.BorderThickness = new Thickness(1);
         Second_list.SetValue(BorderBrushProperty, Brushes.Silver);
         Second_list.BorderThickness = new Thickness(1);
     });
 }
        public void Reset()
        {
            this.Dispatcher.Invoke(() =>
            {
                teamToTrade.Children.Clear();
                WaitingTrade.Visibility = Visibility.Visible;
                Trade.Visibility        = Visibility.Collapsed;
                OnRequest.Visibility    = Visibility.Collapsed;

                FinalView.Visibility     = Visibility.Collapsed;
                TradeControls.Visibility = Visibility.Visible;
                teamToTrade.Visibility   = Visibility.Visible;

                First_list.SetValue(BorderBrushProperty, Brushes.Silver);
                First_list.BorderThickness = new Thickness(1);
                Second_list.SetValue(BorderBrushProperty, Brushes.Silver);
                Second_list.BorderThickness = new Thickness(1);
                First_list.ItemsSource      = null;
                Second_list.ItemsSource     = null;
            });
        }
        public void StatusChanged(string[] data)
        {
            string[] sdata = data[1].Split('|');
            if (sdata[0] == "1")
            {
                this.Dispatcher.Invoke(() =>
                {
                    First_list.SetValue(BorderBrushProperty, Brushes.ForestGreen);
                    First_list.BorderThickness = new Thickness(2);
                });
            }
            else if (sdata[0] == "0")
            {
                this.Dispatcher.Invoke(() =>
                {
                    First_list.SetValue(BorderBrushProperty, Brushes.Silver);
                    First_list.BorderThickness = new Thickness(2);
                });
            }

            if (sdata[1] == "1")
            {
                this.Dispatcher.Invoke(() =>
                {
                    Second_list.SetValue(BorderBrushProperty, Brushes.ForestGreen);
                    Second_list.BorderThickness = new Thickness(2);
                });
            }
            else if (sdata[1] == "0")
            {
                this.Dispatcher.Invoke(() =>
                {
                    Second_list.SetValue(BorderBrushProperty, Brushes.Silver);
                    Second_list.BorderThickness = new Thickness(2);
                });
            }
        }