Ejemplo n.º 1
0
        /// <summary>
        /// Refresh debug token to device and registration file.
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void btnRefresh_Click(object sender, RoutedEventArgs e)
        {
            this.Cursor = Cursors.Wait;

            if (!(deployTokenData.refreshDevice(this)))
            {
                deployTokenData.Error = "";
                e.Handled             = true;
                btnAdd.IsEnabled      = false;
                btnRefresh.IsEnabled  = false;
            }
            else
            {
                btnAdd.IsEnabled     = false;
                btnRefresh.IsEnabled = true;
            }

            this.Cursor = Cursors.Arrow;
        }
Ejemplo n.º 2
0
        /// <summary>
        /// Refresh debug token to device and registration file.
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void btnRefresh_Click(object sender, RoutedEventArgs e)
        {
            Mouse.OverrideCursor = Cursors.Wait;

            if (!isRegistering)
            {
                isRegistering = true;

                if (!(deployTokenData.refreshDevice(this)))
                {
                    deployTokenData.Error = "";
                    e.Handled             = true;
                }

                btnAdd.IsEnabled     = !deployTokenData.AlreadyRegistered;
                btnRefresh.IsEnabled = deployTokenData.AlreadyRegistered;
            }

            isRegistering        = false;
            Mouse.OverrideCursor = Cursors.Arrow;
        }