/// <summary> /// Shows result of AT Commands supporting test. /// </summary> /// <param name="state">The state.</param> private void ShowTestResult(object state) { lock (state) { ResultRetievedEventArgs e = (ResultRetievedEventArgs)state; StackPanel sp = new StackPanel(); sp.Orientation = Orientation.Horizontal; sp.Margin = new System.Windows.Thickness(1, 2, 5, 2); TextBlock txtblock1 = new TextBlock(); txtblock1.Text = e.Response; TextBlock txtblock2 = new TextBlock(); txtblock2.Margin = new Thickness(5, 0, 5, 0); if (e.Success == true) { txtblock2.Foreground = Brushes.Green; txtblock2.Text = "Passed"; } else { txtblock2.Foreground = Brushes.Red; txtblock2.Text = "Failed"; } sp.Children.Add(txtblock1); sp.Children.Add(txtblock2); StackPanelAllTestOutput.Children.Add(sp); } }
/// <summary> /// Shows the model. /// </summary> /// <param name="state">The state.</param> private void ShowModel(object state) { ResultRetievedEventArgs e = (ResultRetievedEventArgs)state; TextBlockModel.Text = e.Response; }
/// <summary> /// Shows the signal quality. /// </summary> /// <param name="state">The state.</param> private void ShowSignalQuality(object state) { ResultRetievedEventArgs e = (ResultRetievedEventArgs)state; TextBlockSignal.Text = e.Response; }
/// <summary> /// Shows the IMEI. /// </summary> /// <param name="state">The state.</param> private void ShowIMEI(object state) { ResultRetievedEventArgs e = (ResultRetievedEventArgs)state; TextBlockIMEI.Text = e.Response; }
/// <summary> /// Shows the manufacturer. /// </summary> /// <param name="manufacturer">The manufacturer.</param> private void ShowManufacturer(object state) { ResultRetievedEventArgs e = (ResultRetievedEventArgs)state; TextBlockManufacturer.Text = e.Response; }
/// <summary> /// Shows the battery charge. /// </summary> /// <param name="state">The state.</param> private void ShowBatteryCharge(object state) { ResultRetievedEventArgs e = (ResultRetievedEventArgs)state; TextBlockBattery.Text = e.Response; }
/// <summary> /// Shows the firmware. /// </summary> /// <param name="state">The state.</param> private void ShowFirmware(object state) { ResultRetievedEventArgs e = (ResultRetievedEventArgs)state; TextBlockFirmware.Text = e.Response; }
void manage_TestCompleted(object sender, ResultRetievedEventArgs e) { MakeThreadSafe dd = new MakeThreadSafe(ShowTestResult); this.Dispatcher.BeginInvoke(dd, e); }
void manage_TerminalResponseRetrieved(object sender, ResultRetievedEventArgs e) { MakeThreadSafe dd = new MakeThreadSafe(ShowTerminalOutput); this.Dispatcher.BeginInvoke(dd, e.Response); }
void manage_SignalQualityRetrieved(object sender, ResultRetievedEventArgs e) { MakeThreadSafe dd = new MakeThreadSafe(ShowSignalQuality); this.Dispatcher.BeginInvoke(dd, e); }
void manage_ModelRetrieved(object sender, ResultRetievedEventArgs e) { MakeThreadSafe dd = new MakeThreadSafe(ShowModel); this.Dispatcher.BeginInvoke(dd, e); }
void manage_BatteryChargeRetrieved(object sender, ResultRetievedEventArgs e) { MakeThreadSafe dd = new MakeThreadSafe(ShowBatteryCharge); this.Dispatcher.BeginInvoke(dd, e); }