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); } }
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(); } }
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(); }