Ejemplo n.º 1
0
        /// <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);
            }
        }
Ejemplo n.º 2
0
        /// <summary>
        /// Shows the model.
        /// </summary>
        /// <param name="state">The state.</param>
        private void ShowModel(object state)
        {
            ResultRetievedEventArgs e = (ResultRetievedEventArgs)state;

            TextBlockModel.Text = e.Response;
        }
Ejemplo n.º 3
0
        /// <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;
        }
Ejemplo n.º 4
0
        /// <summary>
        /// Shows the IMEI.
        /// </summary>
        /// <param name="state">The state.</param>
        private void ShowIMEI(object state)
        {
            ResultRetievedEventArgs e = (ResultRetievedEventArgs)state;

            TextBlockIMEI.Text = e.Response;
        }
Ejemplo n.º 5
0
        /// <summary>
        /// Shows the manufacturer.
        /// </summary>
        /// <param name="manufacturer">The manufacturer.</param>
        private void ShowManufacturer(object state)
        {
            ResultRetievedEventArgs e = (ResultRetievedEventArgs)state;

            TextBlockManufacturer.Text = e.Response;
        }
Ejemplo n.º 6
0
        /// <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;
        }
Ejemplo n.º 7
0
        /// <summary>
        /// Shows the firmware.
        /// </summary>
        /// <param name="state">The state.</param>
        private void ShowFirmware(object state)
        {
            ResultRetievedEventArgs e = (ResultRetievedEventArgs)state;

            TextBlockFirmware.Text = e.Response;
        }
Ejemplo n.º 8
0
        void manage_TestCompleted(object sender, ResultRetievedEventArgs e)
        {
            MakeThreadSafe dd = new MakeThreadSafe(ShowTestResult);

            this.Dispatcher.BeginInvoke(dd, e);
        }
Ejemplo n.º 9
0
        void manage_TerminalResponseRetrieved(object sender, ResultRetievedEventArgs e)
        {
            MakeThreadSafe dd = new MakeThreadSafe(ShowTerminalOutput);

            this.Dispatcher.BeginInvoke(dd, e.Response);
        }
Ejemplo n.º 10
0
        void manage_SignalQualityRetrieved(object sender, ResultRetievedEventArgs e)
        {
            MakeThreadSafe dd = new MakeThreadSafe(ShowSignalQuality);

            this.Dispatcher.BeginInvoke(dd, e);
        }
Ejemplo n.º 11
0
        void manage_ModelRetrieved(object sender, ResultRetievedEventArgs e)
        {
            MakeThreadSafe dd = new MakeThreadSafe(ShowModel);

            this.Dispatcher.BeginInvoke(dd, e);
        }
Ejemplo n.º 12
0
        void manage_BatteryChargeRetrieved(object sender, ResultRetievedEventArgs e)
        {
            MakeThreadSafe dd = new MakeThreadSafe(ShowBatteryCharge);

            this.Dispatcher.BeginInvoke(dd, e);
        }