Esempio n. 1
0
 private void Events_RadioContextChanged(Events.RadioContextChangedEventArgs e)
 {
     if (this.Dispatcher.CheckAccess())
     {
         this._events_RadioContextChanged(e);
     }
     else
     {
         this.Dispatcher.Invoke(new Action <Events.RadioContextChangedEventArgs>(_events_RadioContextChanged), e);
     }
 }
Esempio n. 2
0
 private void _events_RadioContextChanged(Events.RadioContextChangedEventArgs e)
 {
     if (this.state.CurrentBand != e.CurrentBand || this.state.CurrentTx != e.CurrentTX)
     {
         this.state.CurrentBand   = e.CurrentBand;
         this.state.CurrentTx     = e.CurrentTX;
         this.tbRadioDetails.Text = string.Format("Band: {0}m - Antenna: {1}", e.CurrentBand, e.CurrentTX);
         this.state.LoadFromINI();
     }
     else
     {
         // we want to load the power from the INI, so the first time we ignore what we get from the radio
         if (!e.FirstEvent)
         {
             this.state.SetCurrentPower(e.CurrentTXPower);
             this.state.PersistStateToINI();
         }
     }
 }