Пример #1
0
 private void btnApiConn_Click(object sender, RoutedEventArgs e)
 {
     if (mwApiConn.IsConnected)
     {
         mwApiConn.Disconnect();
     }
     else
     {
         MwaMainDataGrid.Focus();
         InfoBlock.Text =
             " The data is a detail view of your recent matches.";
         mwApiConn.ViewControl    = dgAssocMain;
         mwApiConn.ConnectCommand = mwApiConn.GetVariantAssocMetric;
         mwApiConn.ConnectAndRefreshEvery(refreshrate);
     }
 }
Пример #2
0
        private void btnBuildConn_Click(object sender, RoutedEventArgs e)
        {
            buildApiConn.ConnectionState = (buildApiConn.IsConnected) ? ConnState.DISCONNECTED : ConnState.CONNECTED;
            tbBuildStatus.Fill           = buildApiConn.IsConnected
                ? System.Windows.Media.Brushes.LimeGreen
                : System.Windows.Media.Brushes.DimGray;
            imgBuildConn.Opacity         = (buildApiConn.IsConnected) ? 1 : .4;
            btnBuildConn.BorderThickness = new System.Windows.Thickness(0, 0, 0, 0);
            MwaMainDataGrid.Focus();
            if (buildApiConn.IsConnected)
            {
                InfoBlock.Text =
                    " The data above aggregates all matches published to the MWApis. This is not just your data. Coming Soon 'You vs The World' view!";


                buildApiConn.ConnectionState = ConnState.CONNECTING;
                tbBuildStatus.Fill           = System.Windows.Media.Brushes.Yellow;
                GetVariantData();
            }
        }
Пример #3
0
        private void btnLWConn_Click(object sender, RoutedEventArgs e)
        {
            InfoBlock.Text =
                "This will launch mechwarrior with match logging enabled.";
            lwConn.ConnectionState = (lwConn.IsConnected) ? ConnState.DISCONNECTED : ConnState.CONNECTED;
            if (lwConn.IsConnected)
            {
                lwConn.Connect();
            }
            else
            {
                lwConn.Disconnect();
            }

            tbLWStatus.Fill = lwConn.IsConnected
                ? System.Windows.Media.Brushes.LimeGreen
                : System.Windows.Media.Brushes.DimGray;
            imgLWConn.Opacity         = (lwConn.IsConnected) ? 1 : .4;
            btnLWConn.BorderThickness = new System.Windows.Thickness(0, 0, 0, 0);

            MwaMainDataGrid.Focus();
        }