public void Bookmark()
 {
     if (this._controlInterface.IsPlaying)
     {
         MemoryEntry memoryEntry = new MemoryEntry();
         memoryEntry.DetectorType    = this._controlInterface.DetectorType;
         memoryEntry.CenterFrequency = this._controlInterface.CenterFrequency;
         memoryEntry.Frequency       = this._controlInterface.Frequency;
         memoryEntry.FilterBandwidth = this._controlInterface.FilterBandwidth;
         memoryEntry.Shift           = (this._controlInterface.FrequencyShiftEnabled ? this._controlInterface.FrequencyShift : 0);
         memoryEntry.GroupName       = "Misc";
         if (this._controlInterface.DetectorType == DetectorType.WFM)
         {
             string text = this._controlInterface.RdsProgramService.Trim();
             memoryEntry.Name = string.Empty;
             if (!string.IsNullOrEmpty(text))
             {
                 memoryEntry.Name = text;
             }
             else
             {
                 memoryEntry.Name = FrequencyManagerPanel.GetFrequencyDisplay(this._controlInterface.Frequency) + " " + memoryEntry.DetectorType;
             }
         }
         else
         {
             memoryEntry.Name = FrequencyManagerPanel.GetFrequencyDisplay(this._controlInterface.Frequency) + " " + memoryEntry.DetectorType;
         }
         memoryEntry.IsFavourite = true;
         this.DoEdit(memoryEntry, true);
     }
 }
 private void frequencyDataGridView_CellFormatting(object sender, DataGridViewCellFormattingEventArgs e)
 {
     if (this.frequencyDataGridView.Columns[e.ColumnIndex].DataPropertyName == "Frequency" && e.Value != null)
     {
         long frequency = (long)e.Value;
         e.Value             = FrequencyManagerPanel.GetFrequencyDisplay(frequency);
         e.FormattingApplied = true;
     }
 }
예제 #3
0
 public void Initialize(ISharpControl control)
 {
     _controlInterface      = control;
     _frequencyManagerPanel = new FrequencyManagerPanel(_controlInterface);
 }
예제 #4
0
 public void Initialize(ISharpControl control)
 {
     _controlInterface = control;
     _frequencyManagerPanel = new FrequencyManagerPanel(_controlInterface); 
 }